HTTP API

Remote Config

GET/api/v1/config
GET
/api/v1/config

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

q?string

Full-text search query

page?integer

1-indexed page number

Formatint64
Range0 <= value
page_size?integer

Page size

Formatint64
Range0 <= value
sort_by?string

Sort field (key, created_at, updated_at, version)

sort_order?string

Sort order (asc or desc)

Value in

  • "asc"
  • "desc"
filter?array<string>

Additional filter expressions in the form field:operator:value

prefix?string

Filter by key prefix

tags?array<string>

Filter by tags

environment?string

Filter by environment

include_values?boolean

Include values in response

Response Body

application/json

curl -X GET "https://example.com/api/v1/config"
{  "configs": [    {      "description": "string",      "environments": [        "string"      ],      "key": "string",      "type": "string",      "updated_at": "2019-08-24T14:15:22Z",      "value": null,      "version": 0    }  ],  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  }}
POST/api/v1/config
POST
/api/v1/config

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/config" \  -H "Content-Type: application/json" \  -d '{    "description": "string",    "key": "string",    "schema": null,    "value": null  }'
{  "created_at": "2019-08-24T14:15:22Z",  "created_by": "string",  "description": "string",  "id": "string",  "key": "string",  "metadata": null,  "schema": null,  "tags": [    "string"  ],  "updated_at": "2019-08-24T14:15:22Z",  "value": null,  "version": 0}
POST/api/v1/config/bulk-get
POST
/api/v1/config/bulk-get

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/config/bulk-get" \  -H "Content-Type: application/json" \  -d '{    "keys": [      "string"    ]  }'
{  "cache_ttl_seconds": 0,  "configs": {    "property1": {      "source": "default",      "value": null,      "version": 0    },    "property2": {      "source": "default",      "value": null,      "version": 0    }  },  "missing_keys": [    "string"  ]}
GET/api/v1/config/environments
GET
/api/v1/config/environments

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X GET "https://example.com/api/v1/config/environments"
[  {    "created_at": "2019-08-24T14:15:22Z",    "created_by": "string",    "description": "string",    "inherits_from": "string",    "name": "string",    "protected": true  }]
POST/api/v1/config/environments
POST
/api/v1/config/environments

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/config/environments" \  -H "Content-Type: application/json" \  -d '{    "description": "string",    "name": "string"  }'
{  "created_at": "2019-08-24T14:15:22Z",  "created_by": "string",  "description": "string",  "inherits_from": "string",  "name": "string",  "protected": true}
DELETE/api/v1/config/environments/{name}
DELETE
/api/v1/config/environments/{name}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

name*string

Environment name

Response Body

curl -X DELETE "https://example.com/api/v1/config/environments/string"
Empty
POST/api/v1/config/evaluate-batch
POST
/api/v1/config/evaluate-batch

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to evaluate multiple flags at once

Response Body

application/json

curl -X POST "https://example.com/api/v1/config/evaluate-batch" \  -H "Content-Type: application/json" \  -d '{    "context": {      "user_id": "string",      "property1": null,      "property2": null    },    "keys": [      "string"    ]  }'
{  "evaluation_time_ms": 0,  "evaluations": {    "property1": {      "enabled": true,      "reason": "default_enabled",      "rule_id": "string",      "variant": null    },    "property2": {      "enabled": true,      "reason": "default_enabled",      "rule_id": "string",      "variant": null    }  }}
POST/api/v1/config/validate
POST
/api/v1/config/validate

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/config/validate" \  -H "Content-Type: application/json" \  -d '{    "configs": [      {        "key": "string",        "value": null      }    ]  }'
{  "results": {    "property1": {      "errors": [        "string"      ],      "valid": true    },    "property2": {      "errors": [        "string"      ],      "valid": true    }  },  "valid": true}
GET/api/v1/config/{key}
GET
/api/v1/config/{key}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Configuration key

Query Parameters

environment?string

Environment name (defaults to 'base')

include_metadata?boolean

Include full metadata

Response Body

application/json

curl -X GET "https://example.com/api/v1/config/string"
{  "cache_ttl_seconds": 0,  "environment": "string",  "key": "string",  "metadata": null,  "source": "default",  "type": "string",  "updated_at": "2019-08-24T14:15:22Z",  "value": null,  "version": 0}
DELETE/api/v1/config/{key}
DELETE
/api/v1/config/{key}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Configuration key

Query Parameters

force?boolean

Force deletion

Response Body

curl -X DELETE "https://example.com/api/v1/config/string"
Empty
PUT/api/v1/config/{key}
PUT
/api/v1/config/{key}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Configuration key

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/api/v1/config/string" \  -H "Content-Type: application/json" \  -d '{    "value": null  }'
{  "cache_ttl_seconds": 0,  "environment": "string",  "key": "string",  "metadata": null,  "source": "default",  "type": "string",  "updated_at": "2019-08-24T14:15:22Z",  "value": null,  "version": 0}
GET/api/v1/config/{key}/analytics
GET
/api/v1/config/{key}/analytics

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Configuration key

Query Parameters

environment?string

Environment to read analytics for (defaults to 'base')

window?string

Day window in YYYY-MM-DD form (defaults to today)

Response Body

application/json

curl -X GET "https://example.com/api/v1/config/string/analytics"
{  "disabled_count": 0,  "enabled_count": 0,  "key": "string",  "reasons": {    "property1": 0,    "property2": 0  },  "total_evaluations": 0,  "unique_users": 0,  "window": "string"}
GET/api/v1/config/{key}/evaluate
GET
/api/v1/config/{key}/evaluate

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Configuration key

Query Parameters

user_id*string

User ID for evaluation

environment?string

Environment (defaults to 'base')

Response Body

application/json

curl -X GET "https://example.com/api/v1/config/string/evaluate?user_id=string"
{  "enabled": true,  "environment": "string",  "key": "string",  "reason": "default_enabled",  "rule_id": "string",  "variant": null}
GET/api/v1/config/{key}/history
GET
/api/v1/config/{key}/history

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Configuration key

Query Parameters

limit?integer

Number of entries (default: 20)

Formatint32
Range0 <= value
environment?string

Filter by environment

Response Body

application/json

curl -X GET "https://example.com/api/v1/config/string/history"
[  {    "changed_at": "2019-08-24T14:15:22Z",    "changed_by": "string",    "environment": "string",    "key": "string",    "previous_value": null,    "reason": "string",    "value": null,    "version": 0  }]
POST/api/v1/config/{key}/rollback
POST
/api/v1/config/{key}/rollback

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Configuration key

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/config/string/rollback" \  -H "Content-Type: application/json" \  -d '{    "reason": "string",    "version": 0  }'
{  "cache_ttl_seconds": 0,  "environment": "string",  "key": "string",  "metadata": null,  "source": "default",  "type": "string",  "updated_at": "2019-08-24T14:15:22Z",  "value": null,  "version": 0}
GET/api/v1/config/{key}/rules
GET
/api/v1/config/{key}/rules

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Configuration key

Query Parameters

environment?string

Environment to read env-scoped rules from (falls back to global)

Response Body

application/json

curl -X GET "https://example.com/api/v1/config/string/rules"
{  "default_enabled": true,  "default_variant": "string",  "environment": "string",  "key": "string",  "rules": [    {      "description": "string",      "id": "string",      "sticky": true,      "type": "percentage",      "value": 0,      "variant": null    }  ],  "updated_at": "2019-08-24T14:15:22Z"}
DELETE/api/v1/config/{key}/rules
DELETE
/api/v1/config/{key}/rules

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Configuration key

Query Parameters

environment?string

Environment to delete env-scoped rules from (omit for global)

Response Body

curl -X DELETE "https://example.com/api/v1/config/string/rules"
Empty
PUT/api/v1/config/{key}/rules
PUT
/api/v1/config/{key}/rules

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Configuration key

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to set rules on a config (making it a feature flag)

Response Body

application/json

curl -X PUT "https://example.com/api/v1/config/string/rules" \  -H "Content-Type: application/json" \  -d '{    "rules": [      {        "type": "percentage",        "value": 0      }    ]  }'
{  "default_enabled": true,  "default_variant": "string",  "environment": "string",  "key": "string",  "rules": [    {      "description": "string",      "id": "string",      "sticky": true,      "type": "percentage",      "value": 0,      "variant": null    }  ],  "updated_at": "2019-08-24T14:15:22Z"}
GET/api/v1/config/{key}/schema
GET
/api/v1/config/{key}/schema

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Configuration key

Response Body

application/json

curl -X GET "https://example.com/api/v1/config/string/schema"
{  "examples": [    null  ],  "key": "string",  "schema": null,  "type": "string"}

On this page