Contexts

Get context instances

GET
/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}

Get context instances by ID.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string

The project key

Formatstring
environmentKey*string

The environment key

Formatstring
id*string

The context instance ID

Formatstring

Query Parameters

limit?integer

Specifies the maximum number of context instances to return (max: 50, default: 20)

Formatint64
continuationToken?string

Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the next link we provide instead.

Formatstring
sort?string
Deprecated

Deprecated. This endpoint does not support sorting. Requests that include this parameter are rejected with a 400 response, so omit it.

Formatstring
filter?string

A comma-separated list of context filters. This endpoint only accepts an applicationId filter. To learn more about the filter syntax, read Filtering contexts and context instances.

Formatstring
includeTotalCount?boolean

Specifies whether to include or omit the total count of matching context instances. Defaults to true.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v2/projects/string/environments/string/context-instances/string"
{  "_links": {    "next": {      "href": "/api/v2/projects/my-project/environments/my-env/context-instances/organization:launch-darkly:user:henry?limit=2&continuationToken=2022-04-15T15:00:57.526470334Z",      "type": "application/json"    },    "self": {      "href": "/api/v2/projects/my-proj/environments/my-env/context-instances/organization:launch-darkly:user:henry-jacobs?limit=2",      "type": "application/json"    }  },  "totalCount": 100,  "_environmentId": "57be1db38b75bf0772d11384",  "continuationToken": "QAGFKH1313KUGI2351",  "items": [    {      "lastSeen": "2022-04-15T15:00:57.526470334Z",      "id": "b3JnOmxhdW5jaGRhcmtseQ",      "applicationId": "GoSDK/1.2",      "anonymousKinds": [        "device",        "privateKind"      ],      "context": "{\"kind\": \"user\", \"key\": \"context-key-123abc\", \"name\": \"Sandy Smith\", \"email\": \"sandy@example.com\"}",      "_links": {        "parent": {          "href": "/api/v2/projects/my-project/environments/my-environment",          "type": "application/json"        },        "self": {          "href": "/api/v2/projects/my-project/environments/my-env/context-instances/organization:launch-darkly:user:henry?filter=applicationid+equals+%22GoSDK%2F1.2%22",          "type": "application/json"        },        "site": {          "href": "/my-project/my-environment/context-instances/organization:launch-darkly:user:henry",          "type": "text/html"        }      },      "_access": {        "denied": [          {            "action": "string",            "reason": {              "resources": [                "proj/*:env/*;qa_*:/flag/*"              ],              "notResources": [                "string"              ],              "actions": [                "*"              ],              "notActions": [                "string"              ],              "effect": "allow",              "role_name": "string"            }          }        ],        "allowed": [          {            "action": "string",            "reason": {              "resources": [                "proj/*:env/*;qa_*:/flag/*"              ],              "notResources": [                "string"              ],              "actions": [                "*"              ],              "notActions": [                "string"              ],              "effect": "allow",              "role_name": "string"            }          }        ]      }    }  ]}