API ReferenceContext Repository
Get the project this key belongs to
Returns the identity of the project the calling key resolves to: its id and the environment that serves it.
GET /context/v1/project
Returns the identity of the project the calling key resolves to: its id and the environment that serves it. Call it before writing to confirm the key points at the project you intend. It takes no parameters and returns nothing about any other project.
Requires the context:read scope.
Responses
| Status | Meaning |
|---|---|
200 | The request succeeded. |
401 | The token is missing, expired or invalid. |
403 | The token does not carry the scope this operation requires. |
404 | No such project, or the token belongs to a different project. |
The 200 response body:
| Field | Type | Required | Description |
|---|---|---|---|
environment | string | yes | The environment serving this project, such as staging or demo. |
project_id | string | yes | The id of the project the key belongs to. |
Example
curl -sS "$API_URL/context/v1/project" \
-H "Authorization: Bearer $TOKEN"