Kaiten

Get the targeting context schema

Returns the identifiers a targeting rule may read, with their types and descriptions, including the organization's own entitlement slugs. Intended for an editor: it is what autocomplete and hover documentation are built from. The set is not closed — a rule may also target on attributes the caller supplies in its own evaluation context.

GET
/feature-flags/targeting/context

Authorization

bearerAuth read:feature_flags
AuthorizationBearer <token>

A JWT verified by the proxy in front of this API, or a Kaiten access token (ksh_...) — send either as Authorization: Bearer <token>. The scopes listed on each operation are the ones the token must carry; write:<module> implies read:<module>, and read:* / write:* are wildcards over every module. x-kaiten-scopes lists every scope such a token can carry, including those enforced by a service in front of this API rather than by one of its operations.

In: header

Scope: read:feature_flags

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://app.kaiten.sh/api/feature-flags/targeting/context"
{
  "roots": [
    {
      "description": "string",
      "entries": [
        {
          "description": "string",
          "entries": [],
          "fields": [
            {
              "description": "string",
              "entries": [],
              "fields": [],
              "knownKeys": [
                "string"
              ],
              "name": "string",
              "optional": true,
              "type": "string",
              "values": {
                "description": "string",
                "entries": [],
                "fields": [],
                "knownKeys": [
                  "string"
                ],
                "name": "string",
                "optional": true,
                "type": "string",
                "values": {}
              }
            }
          ],
          "knownKeys": [
            "string"
          ],
          "name": "string",
          "optional": true,
          "type": "string",
          "values": {
            "description": "string",
            "entries": [],
            "fields": [
              {
                "description": "string",
                "entries": [],
                "fields": [],
                "knownKeys": [
                  "string"
                ],
                "name": "string",
                "optional": true,
                "type": "string",
                "values": {}
              }
            ],
            "knownKeys": [
              "string"
            ],
            "name": "string",
            "optional": true,
            "type": "string",
            "values": {}
          }
        }
      ],
      "fields": [
        {
          "description": "string",
          "entries": [
            {
              "description": "string",
              "entries": [],
              "fields": [],
              "knownKeys": [
                "string"
              ],
              "name": "string",
              "optional": true,
              "type": "string",
              "values": {
                "description": "string",
                "entries": [],
                "fields": [],
                "knownKeys": [
                  "string"
                ],
                "name": "string",
                "optional": true,
                "type": "string",
                "values": {}
              }
            }
          ],
          "fields": [],
          "knownKeys": [
            "string"
          ],
          "name": "string",
          "optional": true,
          "type": "string",
          "values": {
            "description": "string",
            "entries": [
              {
                "description": "string",
                "entries": [],
                "fields": [],
                "knownKeys": [
                  "string"
                ],
                "name": "string",
                "optional": true,
                "type": "string",
                "values": {}
              }
            ],
            "fields": [],
            "knownKeys": [
              "string"
            ],
            "name": "string",
            "optional": true,
            "type": "string",
            "values": {}
          }
        }
      ],
      "knownKeys": [
        "string"
      ],
      "name": "string",
      "optional": true,
      "type": "string",
      "values": {
        "description": "string",
        "entries": [
          {
            "description": "string",
            "entries": [],
            "fields": [
              {
                "description": "string",
                "entries": [],
                "fields": [],
                "knownKeys": [
                  "string"
                ],
                "name": "string",
                "optional": true,
                "type": "string",
                "values": {}
              }
            ],
            "knownKeys": [
              "string"
            ],
            "name": "string",
            "optional": true,
            "type": "string",
            "values": {}
          }
        ],
        "fields": [
          {
            "description": "string",
            "entries": [
              {
                "description": "string",
                "entries": [],
                "fields": [],
                "knownKeys": [
                  "string"
                ],
                "name": "string",
                "optional": true,
                "type": "string",
                "values": {}
              }
            ],
            "fields": [],
            "knownKeys": [
              "string"
            ],
            "name": "string",
            "optional": true,
            "type": "string",
            "values": {}
          }
        ],
        "knownKeys": [
          "string"
        ],
        "name": "string",
        "optional": true,
        "type": "string",
        "values": {}
      }
    }
  ]
}
{
  "code": "License.NotFound",
  "detail": "license not found",
  "errorId": "3f6b1a2c-7c1e-4d0b-9d5f-2b0a1c4e8d31",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "/api/licenses/enterprise",
  "status": 404,
  "title": "Not Found",
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4"
}
{
  "code": "License.NotFound",
  "detail": "license not found",
  "errorId": "3f6b1a2c-7c1e-4d0b-9d5f-2b0a1c4e8d31",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "/api/licenses/enterprise",
  "status": 404,
  "title": "Not Found",
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4"
}
{
  "code": "License.NotFound",
  "detail": "license not found",
  "errorId": "3f6b1a2c-7c1e-4d0b-9d5f-2b0a1c4e8d31",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "/api/licenses/enterprise",
  "status": 404,
  "title": "Not Found",
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4"
}