Kaiten

OFREP single flag evaluation contract

EvaluateVariant a single feature flag for a given key

POST
/ofrep/v1/evaluate/flags/{key}

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

Path Parameters

key*string

Request Body

application/json

Evaluation context

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://app.kaiten.sh/api/ofrep/v1/evaluate/flags/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "key": "string",
  "metadata": {
    "property1": null,
    "property2": null
  },
  "reason": "STATIC",
  "value": null,
  "variant": "string"
}
{
  "errorCode": "string",
  "errorDetails": "string",
  "key": "string",
  "metadata": {
    "property1": null,
    "property2": null
  }
}
{
  "errorCode": "string",
  "errorDetails": "string",
  "key": "string",
  "metadata": {
    "property1": null,
    "property2": null
  }
}