This is the swagger docs for the Core API. For an overview of the system - please read our overview guides. This API conforms to the JSON:API spec.
The steps will help you create and evaluate your first flag. In this guide, we assume you already have an instance of Flagbase Core running.
- Obtain your root user access token. In order to create a workspace, you'll need root user permissions, hence why we obtain root access to the service. If you want to create a root access key-secret pair, please refer to the getting started guide for the core.
- Create a workspace. Your projects will live inside here.
- Create admin access for your workspace. We will use this access token for all subsequent requests.
- Obtain your workspace admin access token you created in the previous step.
- Create a project. Your flags will live inside here.
- Create a flag. You can configure targeting for that flag if you wish.
- Evaluate your flags or get the non-evaluated flagset
Authenticate using the access key-secret pair and obtain an access token used to authorize your requests.
key | string Generated access key (make sure you save this key) |
secret | string Generated secret (make sure you save this secert). |
type | string Enum: "root" "admin" "user" "service" Access key type describes the level of permissions you get for a particular resource (root > user > service). |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
expiresAt | integer <int64> Unix time stating when this access expires. |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
{- "key": "string",
- "secret": "string",
- "type": "root",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
], - "expiresAt": 0,
- "name": "Example Name"
}
type | string Default: "service" Enum: "admin" "user" "service" Access key type describes the level of permissions you get for a particular resource (root > user > service). |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
expiresAt | integer <int64> Unix time stating when this access expires. |
{- "type": "admin",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
], - "expiresAt": 0
}
key | string The access key. |
secret | string The access secret. |
{- "key": "string",
- "secret": "string"
}
token | string |
object (Access) Access is a key/secret pair used to restrict operations on a particular resource via the policy enforcer. You can create and attach access to workspace, project and environment resources. |
{- "token": "string",
- "access": {
- "key": "string",
- "secret": "string",
- "type": "root",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
], - "expiresAt": 0,
- "name": "Example Name"
}
}
Obtain access token
Obtain a signed access token using an access key-secret pair.
Request Body schema: application/json
Access key-secret pair.
key required | string Unique access key |
secret required | string Access secret |
Responses
Request samples
- Payload
{- "key": "root",
- "secret": "toor"
}
Response samples
- 200
- 500
{- "data": {
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBY2Nlc3MiOiJleUpwWkNJNkltTTFOamcwWVdKaExUUTJPVFl0TkRRM1l5MDVZakF3TFRBelkyWTJNMkU1TmpnMlppSXNJbXRsZVNJNkluSnZiM1FpTENKelpXTnlaWFFpT2lJa01tRWtNVEFrUWpNMmREWm1NMFV3VEVVNVJrOUljMnRVTWtGcFpTOU1iR3ByZFM0NFpqbEtlR3BYTTJveVpHNVVWM0ppTjJscGRHOTZVVk1pTENKMGVYQmxJam9pY205dmRDSXNJbVY0Y0dseVpYTkJkQ0k2T1RJeU16TTNNakF6TmpnMU5EYzNOVGd3TjMwPSIsImV4cCI6MTYyNTA5MjQwN30.2wPy7mh7Q2ml9X3K6Mq8rEwVGyUzr7Qjk4D-Relax0U",
- "access": {
- "id": "c5684aba-4696-447c-9b00-03cf63a9686f",
- "key": "root",
- "secret": "**************",
- "type": "root",
- "expiresAt": 9223372036854776000
}
}
}
Workspaces represent a collection of projects. It can be used to group an individual or organisation's projects.
key required | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
{- "key": "example-key",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
Get workspace
Retreive a workspace, given the workspace key.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
Responses
Response samples
- 200
- 500
{- "data": {
- "type": "workspace",
- "id": "8904dc87-067a-448d-9678-5241a0c65103",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-workspace",
- "name": "Testing Workspace",
- "tags": [
- "example-tag"
]
}
}
}
Update workspace
Update an existing workspace.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
Request Body schema: application/json
Patch Document (RFC 6902)
op | string Enum: "add" "remove" "replace" "move" "copy" "test" The operation to be performed |
path | string A JSON-Pointer |
object or string or number or boolean The value to be used within the operations. | |
from | string A string containing a JSON Pointer value. |
Responses
Request samples
- Payload
[- {
- "op": "replace",
- "path": "/name",
- "value": "ECorp"
}
]
Response samples
- 200
- 500
{- "data": {
- "type": "workspace",
- "id": "8904dc87-067a-448d-9678-5241a0c65103",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-workspace",
- "name": "Testing Workspace",
- "tags": [
- "example-tag"
]
}
}
}
Delete workspace
Delete an existing workspace. This operation can not be undone. Please proceed with caution.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
Responses
Response samples
- 204
- 500
null
List workspaces
List all workspaces.
Note: you need root access to perform this operation.
Authorizations:
Responses
Response samples
- 200
- 500
{- "data": [
- {
- "type": "workspace",
- "id": "bce391e1-c54d-47b6-910e-6450720ac646",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-workspace",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}, - {
- "type": "workspace",
- "id": "f3c800fc-bc52-4c51-8768-164f3d2863bd",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-workspace-1",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}
]
}
Create workspace
Create a new workspace. Workspace keys must be unique.
Authorizations:
Request Body schema: application/json
Workspace Object
key required | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
Responses
Request samples
- Payload
{- "key": "example-key",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
Response samples
- 201
- 500
{- "data": {
- "type": "workspace",
- "id": "8904dc87-067a-448d-9678-5241a0c65103",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-workspace",
- "name": "Testing Workspace",
- "tags": [
- "example-tag"
]
}
}
}
A new workspace-access link should be created in order to enable the appropriate acess permissions to this resource and its children.
Projects represent a collection of feature flags and their respective rollout rules etc. Projects also have different contexts which are applied (i.e. environments).
key required | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
{- "key": "example-key",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
Get project
Get an existing project.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
Responses
Response samples
- 200
- 500
{- "data": {
- "type": "project",
- "id": "49af9f76-bf1d-4309-8070-a9e1318661e6",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-project",
- "name": "Example Name",
- "tags": [
- "some-project-tag"
]
}
}
}
Update project
Update an existing project.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
Request Body schema:
Patch Document (RFC 6902)
op | string Enum: "add" "remove" "replace" "move" "copy" "test" The operation to be performed |
path | string A JSON-Pointer |
object or string or number or boolean The value to be used within the operations. | |
from | string A string containing a JSON Pointer value. |
Responses
Request samples
- Payload
[- {
- "op": "add",
- "path": "string",
- "value": { },
- "from": "string"
}
]
Response samples
- 200
- 500
{- "data": {
- "type": "project",
- "id": "49af9f76-bf1d-4309-8070-a9e1318661e6",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-project",
- "name": "Example Name",
- "tags": [
- "some-project-tag"
]
}
}
}
Delete project
Delete an existing project.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
Responses
Response samples
- 204
- 500
{- "errors": [
- {
- "code": "string",
- "message ": "string"
}
]
}
Create project
Create a new project. The project will be created in the workspace accociated with the access key-secret pair being used.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
Request Body schema: application/json
Project Object
key required | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
Responses
Request samples
- Payload
{- "key": "example-key",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
Response samples
- 201
- 500
{- "data": {
- "type": "project",
- "id": "49af9f76-bf1d-4309-8070-a9e1318661e6",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-project",
- "name": "Example Name",
- "tags": [
- "some-project-tag"
]
}
}
}
List projects
List all projects in the workspace associated with this access key-secret pair.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
Responses
Response samples
- 200
- 500
{- "data": [
- {
- "type": "project",
- "id": "49af9f76-bf1d-4309-8070-a9e1318661e6",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-project",
- "name": "Example Name",
- "tags": [
- "some-project-tag"
]
}
}, - {
- "type": "project",
- "id": "8872a9cf-7062-4230-80c2-de639395ff16",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-project-1",
- "name": "Example Name",
- "tags": [
- "some-project-tag"
]
}
}
]
}
A new project-access link should be created in order to enable the appropriate acess permissions to this resource and its children.
Environments are used to maintain isolated contexts for project resources (such as feature flags, rollout rules etc). For example, you can have Test and Production environments, which contain completely separate rollout rules etc.
key required | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
{- "key": "example-key",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
Get environment
Get a project environment.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
Responses
Response samples
- 200
- 500
{- "data": {
- "type": "environment",
- "id": "ed741b53-720a-4d8a-b67c-57bb943ec7a7",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-env",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}
}
Update environment
Update an existing environment.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
Request Body schema: application/json
Patch Document (RFC 6902)
op | string Enum: "add" "remove" "replace" "move" "copy" "test" The operation to be performed |
path | string A JSON-Pointer |
object or string or number or boolean The value to be used within the operations. | |
from | string A string containing a JSON Pointer value. |
Responses
Request samples
- Payload
Response samples
- 200
- 500
{- "data": {
- "type": "environment",
- "id": "ed741b53-720a-4d8a-b67c-57bb943ec7a7",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-env",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}
}
Delete environment
Delete an existing environment.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
Responses
Response samples
- 500
{- "errors": [
- {
- "code": "string",
- "message ": "string"
}
]
}
List project environments
Retreive a list of a project's environments.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
Responses
Response samples
- 200
- 500
{- "data": [
- {
- "type": "environment",
- "id": "ed741b53-720a-4d8a-b67c-57bb943ec7a7",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-env",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}, - {
- "type": "environment",
- "id": "69d2bf3a-6e4c-41a4-a288-a901e48bdbc8",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-env-1",
- "name": "Prod",
- "tags": [
- "example-tag"
]
}
}
]
}
Create environment
Create a new project environment
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
Request Body schema: application/json
Environmnet Object
key required | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
Responses
Request samples
- Payload
{- "key": "example-key",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
Response samples
- 201
- 500
{- "data": {
- "type": "environment",
- "id": "ed741b53-720a-4d8a-b67c-57bb943ec7a7",
- "attributes": {
- "description": "This should be a description.",
- "key": "testing-env",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}
}
SDK keys are used by client and server-side SDKs and help identify a flagset in a particular project environment.
enabled | boolean Whether or not this SDK key is active |
expiresAt | number Time this key is no longer valid (unix timestamp) |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
description | string (Resource Description) Optional resource description. |
clientKey | string Client-side SDK key |
serverKey | string Server-side SDK key |
{- "enabled": true,
- "expiresAt": 0,
- "name": "Example Name",
- "tags": [
- "example-tag"
], - "description": "This should be a description.",
- "clientKey": "string",
- "serverKey": "string"
}
List SDK keys
Retrieve a list of sdk keys for that particular environment
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
Responses
Response samples
- 200
- 500
{- "data": [
- {
- "id": "dcb46332-ee5e-453a-8898-28218a17e92d",
- "type": "sdk_key",
- "attributes": {
- "enabled": true,
- "clientKey": "sdk-client_a0a016f0-e313-413f-8994-a87c9e455026",
- "serverKey": "sdk-server_e7349b68-0b8d-42e2-b56d-51a75013fef4",
- "expiresAt": 9223372036854776000,
- "name": "Prod SDK Key",
- "description": "Generated SDK for the production environment.",
- "tags": [
- "generated"
]
}
}, - {
- "id": "dcb46332-ee5e-453a-8898-28218a17e92d",
- "type": "sdk_key",
- "attributes": {
- "enabled": true,
- "clientKey": "sdk-client_a0a016f0-e313-413f-8994-a87c9e455026",
- "serverKey": "sdk-server_e7349b68-0b8d-42e2-b56d-51a75013fef4",
- "expiresAt": 9223372036854776000,
- "name": "Prod SDK Key (secondary)",
- "description": "Secondary SDK for the production environment.",
- "tags": [
- "generated"
]
}
}
]
}
Create SDK key
Create a sdk key for a particular project environment
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
Request Body schema: application/json
SDK Key request body
enabled | boolean Whether or not this SDK key is active |
expiresAt | number Time this key is no longer valid (unix timestamp) |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
description | string (Resource Description) Optional resource description. |
Responses
Request samples
- Payload
{- "enabled": true,
- "expiresAt": 9223372036854776000,
- "name": "Secondary SDK key (us-region)",
- "description": "This should only be used by servers / clients in the US region.",
- "tags": [
- "us-region"
]
}
Response samples
- 201
- 500
{- "data": [
- {
- "id": "dcb46332-ee5e-453a-8898-28218a17e92d",
- "type": "sdk_key",
- "attributes": {
- "enabled": true,
- "clientKey": "sdk-client_a0a016f0-e313-413f-8994-a87c9e455026",
- "serverKey": "sdk-server_e7349b68-0b8d-42e2-b56d-51a75013fef4",
- "expiresAt": 9223372036854776000,
- "name": "Prod SDK Key",
- "description": "Generated SDK for the production environment.",
- "tags": [
- "generated"
]
}
}, - {
- "id": "dcb46332-ee5e-453a-8898-28218a17e92d",
- "type": "sdk_key",
- "attributes": {
- "enabled": true,
- "clientKey": "sdk-client_a0a016f0-e313-413f-8994-a87c9e455026",
- "serverKey": "sdk-server_e7349b68-0b8d-42e2-b56d-51a75013fef4",
- "expiresAt": 9223372036854776000,
- "name": "Prod SDK Key (secondary)",
- "description": "Secondary SDK for the production environment.",
- "tags": [
- "generated"
]
}
}
]
}
List SDK keys
Retrieve a list of sdk keys for that particular environment
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
id required | string^[a-z0-9]+([_ -]?[a-z0-9])*$ Resource identifier |
Responses
Response samples
- 200
- 500
{- "data": {
- "id": "dcb46332-ee5e-453a-8898-28218a17e92d",
- "type": "sdk_key",
- "attributes": {
- "enabled": true,
- "clientKey": "sdk-client_a0a016f0-e313-413f-8994-a87c9e455026",
- "serverKey": "sdk-server_e7349b68-0b8d-42e2-b56d-51a75013fef4",
- "expiresAt": 9223372036854776000,
- "name": "Prod SDK Key",
- "description": "Generated SDK for the production environment.",
- "tags": [
- "generated"
]
}
}
}
Update SDK Key
Update SDK Key
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
id required | string^[a-z0-9]+([_ -]?[a-z0-9])*$ Resource identifier |
Request Body schema: application/json
Update sdk key
op | string Enum: "add" "remove" "replace" "move" "copy" "test" The operation to be performed |
path | string A JSON-Pointer |
object or string or number or boolean The value to be used within the operations. | |
from | string A string containing a JSON Pointer value. |
Responses
Request samples
- Payload
[- {
- "op": "replace",
- "path": "/description",
- "value": "Secondary SDK key (use in us-region only)"
}
]
Response samples
- 200
- 500
{- "data": {
- "id": "dcb46332-ee5e-453a-8898-28218a17e92d",
- "type": "sdk_key",
- "attributes": {
- "enabled": true,
- "clientKey": "sdk-client_a0a016f0-e313-413f-8994-a87c9e455026",
- "serverKey": "sdk-server_e7349b68-0b8d-42e2-b56d-51a75013fef4",
- "expiresAt": 9223372036854776000,
- "name": "Prod SDK Key",
- "description": "Generated SDK for the production environment.",
- "tags": [
- "generated"
]
}
}
}
Delete SDK Key
Delete SDK key
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
id required | string^[a-z0-9]+([_ -]?[a-z0-9])*$ Resource identifier |
Responses
Response samples
- 500
{- "errors": [
- {
- "code": "string",
- "message ": "string"
}
]
}
A feature flag (aka feature switch) represent the current state of a feature. Feature flags consists of variations (ie. boolean (true, false) or multi-variant (A, B, C)), where each variation represents a unique state of a particular feature.
key required | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
{- "key": "example-key",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
List feature flags
List feature flags in the project.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
Responses
Response samples
- 200
- 500
{- "data": [
- {
- "id": "b4a506b7-e911-4ccd-8645-c58f4b35d3c9",
- "key": "test-flag",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}, - {
- "id": "f8c33272-8911-4159-bd45-5f4754e85e35",
- "key": "test-flag-1",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}, - {
- "id": "a5575918-a07c-431a-9e4e-8a70ce7eda28",
- "key": "test-flag-4",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}, - {
- "id": "1b89b39d-b8e6-4e47-b01c-3895a7740bc9",
- "key": "test-flag-2",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}, - {
- "id": "a62469a7-36bb-4a4a-a551-ad758c4624ce",
- "key": "test-flag-3",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}, - {
- "id": "6d1bac9d-adb1-4be0-b0f1-b7515a84fc39",
- "key": "test-flag-5",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}, - {
- "id": "c06bbda2-ec5c-4448-ae2b-53861218acdd",
- "key": "test-flag-6",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}, - {
- "id": "2c605f40-b38e-4bca-8035-e6c47d37ac46",
- "key": "test-flag-7",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}, - {
- "id": "1fd2a9fb-9658-420e-bbff-85770d374edf",
- "key": "test-flag-8",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}, - {
- "id": "3b0dc296-a45f-45ad-84fa-380fa725081d",
- "key": "test-flag-9",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}, - {
- "id": "6a8da406-a57e-40d6-9d25-6d22479d0b11",
- "key": "test-flag-10",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
]
}
Create feature flag
Create a new feature flag in the specified project
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
Request Body schema: application/json
Flag Object
key required | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
Responses
Request samples
- Payload
{- "key": "example-key",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
Response samples
- 201
- 500
{- "data": {
- "id": "6a8da406-a57e-40d6-9d25-6d22479d0b11",
- "key": "test-flag",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
}
Get feature flag
Get a single feature flag using its key.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
Responses
Response samples
- 200
- 500
{- "data": {
- "id": "6a8da406-a57e-40d6-9d25-6d22479d0b11",
- "key": "test-flag",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
}
Update feature flag
Update an existing flag.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
Request Body schema: application/json
Patch Document (RFC 6902)
op | string Enum: "add" "remove" "replace" "move" "copy" "test" The operation to be performed |
path | string A JSON-Pointer |
object or string or number or boolean The value to be used within the operations. | |
from | string A string containing a JSON Pointer value. |
Responses
Request samples
- Payload
[- {
- "op": "add",
- "path": "string",
- "value": { },
- "from": "string"
}
]
Response samples
- 200
- 500
{- "data": {
- "id": "6a8da406-a57e-40d6-9d25-6d22479d0b11",
- "key": "test-flag",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
}
Delete feature flag
Delete an existing flag.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
Responses
Response samples
- 500
{- "errors": [
- {
- "code": "string",
- "message ": "string"
}
]
}
A variation represents a particular feature flag state. Feature flags usually consist of multiple variations (e.g. True and False). We can rollout different feature variations to particular users or user segments.
key required | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
{- "key": "example-key",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
List variations
List all variations of a specific flag.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
Responses
Response samples
- 200
- 500
{- "data": [
- {
- "type": "variation",
- "id": "62a70520-1959-4895-9d0f-6a92af8cf264",
- "attributes": {
- "description": "This should be a description.",
- "key": "test-variation",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}, - {
- "type": "variation",
- "id": "ecd1740d-5cc8-4320-aa40-8c0b0660f86c",
- "attributes": {
- "description": "This should be a description.",
- "key": "test-variation-1",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}, - {
- "type": "variation",
- "id": "541bcdb1-6209-45cf-87ff-be60c15ec809",
- "attributes": {
- "description": "This should be a description.",
- "key": "test-variation-2",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}
]
}
Create variation
Create a flag variation.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
Request Body schema: application/json
Flag variation
key required | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
Responses
Request samples
- Payload
{- "key": "control",
- "name": "Control",
- "description": "Default variation observed by the control group.",
- "tags": [
- "example-tag"
]
}
Response samples
- 201
- 500
{- "data": {
- "type": "variation",
- "id": "62a70520-1959-4895-9d0f-6a92af8cf264",
- "attributes": {
- "description": "This should be a description.",
- "key": "test-variation",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}
}
Get variation
Get a single variation of a specific flag.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
variationKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: control The variation key |
Responses
Response samples
- 200
- 500
{- "data": {
- "type": "variation",
- "id": "62a70520-1959-4895-9d0f-6a92af8cf264",
- "attributes": {
- "description": "This should be a description.",
- "key": "test-variation",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}
}
Update variation
Update a specific variation.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
variationKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: control The variation key |
Request Body schema: application/json
Patch Document (RFC 6902)
op | string Enum: "add" "remove" "replace" "move" "copy" "test" The operation to be performed |
path | string A JSON-Pointer |
object or string or number or boolean The value to be used within the operations. | |
from | string A string containing a JSON Pointer value. |
Responses
Request samples
- Payload
[- {
- "op": "add",
- "path": "string",
- "value": { },
- "from": "string"
}
]
Response samples
- 200
- 500
{- "data": {
- "type": "variation",
- "id": "62a70520-1959-4895-9d0f-6a92af8cf264",
- "attributes": {
- "description": "This should be a description.",
- "key": "test-variation",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}
}
Delete variation
Delete a single flag variation
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
variationKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: control The variation key |
Responses
Response samples
- 500
{- "errors": [
- {
- "code": "string",
- "message ": "string"
}
]
}
Evaluation is the process of deriving the variation of a flag / set of flags, given a particular context (i.e. user traits)
identifier required | string Unique identifier for the user |
traits required | object User attributes that will be used during evaluation |
{- "identifier": "string",
- "traits": { }
}
Get evaluation details
Get non-evaluated flagset rules, used for evaluation. The raw flagset contains the flag variations, rules etc. Using the raw flagset, we can compute the evaluated flagset using the user context (i.e. user traits & identifer).
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
Responses
Response samples
- 200
- 500
{- "data": [
- {
- "type": "raw_flag",
- "id": "8ab71914-9f10-4427-b257-6b30c7ad2846",
- "attributes": {
- "flagKey": "test-flag",
- "useFallthrough": false,
- "fallthroughVariations": [
- {
- "variationKey": "test-variation-2",
- "weight": 33
}, - {
- "variationKey": "test-variation",
- "weight": 33
}, - {
- "variationKey": "test-variation-1",
- "weight": 33
}
], - "rules": [
- {
- "ruleType": "segment",
- "traitKey": "some-trait-key",
- "traitValue": "some-trait-value",
- "operator": "equal",
- "negate": false,
- "ruleVariations": [
- {
- "variationKey": "test-variation",
- "weight": 50
}, - {
- "variationKey": "test-variation-1",
- "weight": 50
}
]
}, - {
- "ruleType": "segment",
- "traitKey": "some-trait-key",
- "traitValue": "some-trait-value",
- "operator": "equal",
- "negate": false,
- "ruleVariations": [
- {
- "variationKey": "test-variation",
- "weight": 50
}, - {
- "variationKey": "test-variation-1",
- "weight": 50
}
]
}, - {
- "ruleType": "trait",
- "traitKey": "some-trait-key",
- "traitValue": "((((((([[:graph:]]*.)+.)+.)+.)+.)+.)+.)+",
- "operator": "regex",
- "negate": false,
- "ruleVariations": [
- {
- "variationKey": "test-variation",
- "weight": 50
}, - {
- "variationKey": "test-variation-1",
- "weight": 50
}
]
}
]
}
}, - {
- "type": "raw_flag",
- "id": "323dsdf3-9f10-4427-b257-6b30c7a23sd46",
- "attributes": {
- "flagKey": "test-flag-1",
- "useFallthrough": false,
- "fallthroughVariations": [
- {
- "variationKey": "test-variation",
- "weight": 50
}, - {
- "variationKey": "test-variation-1",
- "weight": 50
}
], - "rules": [
- {
- "ruleType": "trait",
- "traitKey": "some-trait-key",
- "traitValue": "some-trait-value",
- "operator": "equal",
- "negate": false,
- "ruleVariations": [
- {
- "variationKey": "test-variation-1",
- "weight": 50
}, - {
- "variationKey": "test-variation",
- "weight": 50
}
]
}
]
}
}, - {
- "type": "raw_flag",
- "id": "13b71914-9f10-4427-b257-6b30c7ad2432",
- "attributes": {
- "flagKey": "test-flag-10",
- "useFallthrough": true,
- "fallthroughVariations": [
- {
- "variationKey": "control",
- "weight": 100
}
]
}
}, - {
- "type": "raw_flag",
- "id": "923sdf914-9f10-4427-b257-6b30c7ad2699",
- "attributes": {
- "flagKey": "test-flag-2",
- "useFallthrough": true,
- "fallthroughVariations": [
- {
- "variationKey": "control",
- "weight": 100
}
]
}
}, - {
- "type": "raw_flag",
- "id": "3471914-9f10-4427-b257-6b30c7ae46",
- "attributes": {
- "flagKey": "test-flag-3",
- "useFallthrough": true,
- "fallthroughVariations": [
- {
- "variationKey": "control",
- "weight": 100
}
]
}
}, - {
- "type": "raw_flag",
- "id": "854b71914-9f10-4427-b257-6b30cloud6999",
- "attributes": {
- "flagKey": "test-flag-4",
- "useFallthrough": true,
- "fallthroughVariations": [
- {
- "variationKey": "control",
- "weight": 100
}
]
}
}, - {
- "type": "raw_flag",
- "id": "8541914-9f10-4427-b257-4d30c7ad2816",
- "attributes": {
- "flagKey": "test-flag-5",
- "useFallthrough": true,
- "fallthroughVariations": [
- {
- "variationKey": "control",
- "weight": 100
}
]
}
}, - {
- "type": "raw_flag",
- "id": "8ab71914-9f10-4427-b257-6b30c7ad2846",
- "attributes": {
- "flagKey": "test-flag-6",
- "useFallthrough": true,
- "fallthroughVariations": [
- {
- "variationKey": "control",
- "weight": 100
}
]
}
}, - {
- "type": "raw_flag",
- "id": "35df71514-9f10-4427-b257-6b30c7ad2842",
- "attributes": {
- "flagKey": "test-flag-7",
- "useFallthrough": true,
- "fallthroughVariations": [
- {
- "variationKey": "control",
- "weight": 100
}
]
}
}, - {
- "type": "raw_flag",
- "id": "2as34dfd-9f10-4427-b257-6b30c7a23446",
- "attributes": {
- "flagKey": "test-flag-8",
- "useFallthrough": true,
- "fallthroughVariations": [
- {
- "variationKey": "control",
- "weight": 100
}
]
}
}, - {
- "type": "raw_flag",
- "id": "23fsd2f23-9f10-4427-b257-43df07ad2842",
- "attributes": {
- "flagKey": "test-flag-9",
- "useFallthrough": true,
- "fallthroughVariations": [
- {
- "variationKey": "control",
- "weight": 100
}
]
}
}
]
}
Evaluate flags
Evaluate flags given a particular context.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
Request Body schema: application/json
The evaluation context is required when evaluating a flagset.
identifier required | string Unique identifier for the user |
traits required | object User attributes that will be used during evaluation |
Responses
Request samples
- Payload
{- "identifier": "some-user-key",
- "traits": {
- "some-trait-key": "some-trait-value"
}
}
Response samples
- 200
- 500
{- "data": {
- "test-flag": {
- "flagKey": "test-flag",
- "variationKey": "test-variation",
- "reason": "FALLTHROUGH"
}, - "test-flag-1": {
- "flagKey": "test-flag-1",
- "variationKey": "test-variation-2",
- "reason": "FALLTHROUGH"
}, - "test-flag-10": {
- "flagKey": "test-flag-10",
- "variationKey": "control",
- "reason": "FALLTHROUGH"
}, - "test-flag-2": {
- "flagKey": "test-flag-2",
- "variationKey": "control",
- "reason": "FALLTHROUGH"
}, - "test-flag-3": {
- "flagKey": "test-flag-3",
- "variationKey": "control",
- "reason": "FALLTHROUGH"
}, - "test-flag-4": {
- "flagKey": "test-flag-4",
- "variationKey": "control",
- "reason": "FALLTHROUGH"
}, - "test-flag-5": {
- "flagKey": "test-flag-5",
- "variationKey": "control",
- "reason": "FALLTHROUGH"
}, - "test-flag-6": {
- "flagKey": "test-flag-6",
- "variationKey": "control",
- "reason": "FALLTHROUGH"
}, - "test-flag-7": {
- "flagKey": "test-flag-7",
- "variationKey": "control",
- "reason": "FALLTHROUGH"
}, - "test-flag-8": {
- "flagKey": "test-flag-8",
- "variationKey": "control",
- "reason": "FALLTHROUGH"
}, - "test-flag-9": {
- "flagKey": "test-flag-9",
- "variationKey": "control",
- "reason": "FALLTHROUGH"
}
}
}
Targeting is essentially a rollout configuration which defines how feature flag variations are rolled out to specific users. Rollout rules can target specific user or segments. After users "evaluate" a specific rollout rule and obtain a flag variation.
id | string |
enabled | boolean |
Array of objects (TargetingVariation) |
{- "id": "string",
- "enabled": true,
- "fallthroughVariations": [
- {
- "variationKey": "string",
- "weight": 0
}
]
}
variationKey | string |
weight | number Rollout weight to be applied for this variation (0-100) |
{- "variationKey": "string",
- "weight": 0
}
id | string |
type | string Enum: "trait" "identity" "segment" |
traitKey | string |
traitValue | string |
operator | string (RuleOperand) Enum: "equal" "greater_than" "greater_than_or_equal" "contains" "regex" Comporator operand used for rules |
negate | boolean |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
identityKey | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
segKey | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
Array of objects (TargetingVariation) |
{- "id": "string",
- "type": "trait",
- "traitKey": "string",
- "traitValue": "string",
- "operator": "equal",
- "negate": true,
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
], - "identityKey": "example-key",
- "segKey": "example-key",
- "ruleVariations": [
- {
- "variationKey": "string",
- "weight": 0
}
]
}
Get targeting
Get a specific flag's targeting configuration.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
Responses
Response samples
- 200
- 500
{- "data": {
- "type": "targeting",
- "id": "b05d0b54-b036-455b-9f77-64b215eb5b85",
- "attributes": {
- "enabled": true,
- "fallthroughVariations": [
- {
- "variationKey": "control",
- "weight": 50
}, - {
- "variationKey": "treatment",
- "weight": 50
}
]
}
}
}
Update targeting
Update a targeting configuration of a existing feature flag.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
Request Body schema: application/json
Patch Document (RFC 6902)
op | string Enum: "add" "remove" "replace" "move" "copy" "test" The operation to be performed |
path | string A JSON-Pointer |
object or string or number or boolean The value to be used within the operations. | |
from | string A string containing a JSON Pointer value. |
Responses
Request samples
- Payload
[- {
- "op": "replace",
- "path": "/enabled",
- "value": true
}, - {
- "op": "replace",
- "path": "/fallthroughVariations/0/weight",
- "value": 60
}, - {
- "op": "replace",
- "path": "/fallthroughVariations/1/weight",
- "value": 40
}
]
Response samples
- 200
- 500
{- "data": {
- "type": "targeting",
- "id": "b05d0b54-b036-455b-9f77-64b215eb5b85",
- "attributes": {
- "enabled": true,
- "fallthroughVariations": [
- {
- "variationKey": "control",
- "weight": 50
}, - {
- "variationKey": "treatment",
- "weight": 50
}
]
}
}
}
Create targeting
Create a targeting configuration for a particular flag per environment
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
Request Body schema: application/json
Targeting configuration
id | string |
enabled | boolean |
Array of objects (TargetingVariation) |
Responses
Request samples
- Payload
{- "id": "string",
- "enabled": true,
- "fallthroughVariations": [
- {
- "variationKey": "control",
- "weight": 50
}, - {
- "variationKey": "treatment",
- "weight": 50
}
]
}
Response samples
- 201
- 500
{- "data": {
- "type": "targeting",
- "id": "b05d0b54-b036-455b-9f77-64b215eb5b85",
- "attributes": {
- "enabled": true,
- "fallthroughVariations": [
- {
- "variationKey": "control",
- "weight": 50
}, - {
- "variationKey": "treatment",
- "weight": 50
}
]
}
}
}
Delete targeting
Delete a targeting configuration for a particular flag per environment
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
Responses
Response samples
- 200
- 500
{- "data": {
- "type": "targeting",
- "id": "b05d0b54-b036-455b-9f77-64b215eb5b85",
- "attributes": {
- "enabled": true,
- "fallthroughVariations": [
- {
- "variationKey": "control",
- "weight": 50
}, - {
- "variationKey": "treatment",
- "weight": 50
}
]
}
}
}
Targeting rules allow you to explicity define how you want to target feature flags to users. You are required to specify logical statements which are evaluated when serving flags to users.
id | string |
type | string Enum: "trait" "identity" "segment" |
traitKey | string |
traitValue | string |
operator | string (RuleOperand) Enum: "equal" "greater_than" "greater_than_or_equal" "contains" "regex" Comporator operand used for rules |
negate | boolean |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
identityKey | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
segKey | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
Array of objects (TargetingVariation) |
{- "id": "string",
- "type": "trait",
- "traitKey": "string",
- "traitValue": "string",
- "operator": "equal",
- "negate": true,
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
], - "identityKey": "example-key",
- "segKey": "example-key",
- "ruleVariations": [
- {
- "variationKey": "string",
- "weight": 0
}
]
}
Comporator operand used for rules
"equal"
List targeting rules
List the targeting rules of an existing flag in a specific environment.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
Responses
Response samples
- 200
- 500
{- "data": [
- {
- "type": "targeting_rule",
- "id": "6cbee271-4bbd-4071-9085-f034ef73198e",
- "attributes": {
- "description": "This should be a description.",
- "key": "test-targeting-rule",
- "name": "Example Name",
- "operator": "equal",
- "ruleVariations": [
- {
- "variationKey": "test-variation",
- "weight": 50
}, - {
- "variationKey": "test-variation-1",
- "weight": 50
}
], - "segmentKey": "test-segment-1",
- "tags": [
- "example-tag"
], - "traitKey": "some-trait-key",
- "traitValue": "some-trait-value",
- "type": "segment"
}
}, - {
- "type": "targeting_rule",
- "id": "ce95a1eb-d179-4434-8857-b9208b307318",
- "attributes": {
- "description": "This should be a description.",
- "key": "test-targeting-rule-1",
- "name": "Example Name",
- "operator": "regex",
- "ruleVariations": [
- {
- "variationKey": "test-variation",
- "weight": 50
}, - {
- "variationKey": "test-variation-1",
- "weight": 50
}
], - "tags": [
- "example-tag"
], - "traitKey": "some-trait-key",
- "traitValue": "((((((([[:graph:]]*.)+.)+.)+.)+.)+.)+.)+",
- "type": "trait"
}
}
]
}
Create targeting rule
Create a new targeting rule for a feature flag in a specific environment.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
Request Body schema: application/json
Targeting Rule
id | string |
type | string Enum: "trait" "identity" "segment" |
traitKey | string |
traitValue | string |
operator | string (RuleOperand) Enum: "equal" "greater_than" "greater_than_or_equal" "contains" "regex" Comporator operand used for rules |
negate | boolean |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
identityKey | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
segKey | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
Array of objects (TargetingVariation) |
Responses
Request samples
- Payload
{- "key": "test-targeting-rule-1",
- "name": "Example targeting rule",
- "description": "This should describe the purpose of the targeting rule.",
- "tags": [
- "example-tag"
], - "type": "trait",
- "traitKey": "some-trait-key",
- "traitValue": "some-trait-value",
- "operator": "equal",
- "ruleVariations": [
- {
- "variationKey": "control",
- "weight": 0
}, - {
- "variationKey": "treatment",
- "weight": 100
}
], - "segmentKey": "test-segment-1"
}
Response samples
- 201
- 500
{- "data": {
- "id": "6cbee271-4bbd-4071-9085-f034ef73198e",
- "key": "test-targeting-rule",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
], - "type": "trait",
- "traitKey": "some-trait-key",
- "traitValue": "some-trait-value",
- "operator": "equal",
- "ruleVariations": [
- {
- "variationKey": "test-variation",
- "weight": 50
}, - {
- "variationKey": "test-variation-1",
- "weight": 50
}
]
}
}
Get targeting rule
Get a targeting rule for a specific flag and its environment.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
ruleKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-rule-key The rule key |
Responses
Response samples
- 200
- 500
{- "data": {
- "id": "6cbee271-4bbd-4071-9085-f034ef73198e",
- "key": "test-targeting-rule",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
], - "type": "trait",
- "traitKey": "some-trait-key",
- "traitValue": "some-trait-value",
- "operator": "equal",
- "ruleVariations": [
- {
- "variationKey": "test-variation",
- "weight": 50
}, - {
- "variationKey": "test-variation-1",
- "weight": 50
}
]
}
}
Update targeting rule
Update an existing target rule.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
ruleKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-rule-key The rule key |
Request Body schema: application/json
Patch Document (RFC 6902)
op | string Enum: "add" "remove" "replace" "move" "copy" "test" The operation to be performed |
path | string A JSON-Pointer |
object or string or number or boolean The value to be used within the operations. | |
from | string A string containing a JSON Pointer value. |
Responses
Request samples
- Payload
[- {
- "op": "replace",
- "path": "/operator",
- "value": "contains"
}, - {
- "op": "replace",
- "path": "/ruleVariations/0/weight",
- "value": 20
}
]
Response samples
- 200
- 500
{- "data": {
- "id": "6cbee271-4bbd-4071-9085-f034ef73198e",
- "key": "test-targeting-rule",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
], - "type": "trait",
- "traitKey": "some-trait-key",
- "traitValue": "some-trait-value",
- "operator": "equal",
- "ruleVariations": [
- {
- "variationKey": "test-variation",
- "weight": 50
}, - {
- "variationKey": "test-variation-1",
- "weight": 50
}
]
}
}
Delete targeting rule
Delete an existing targeting rule.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
flagKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-flag The flag key |
ruleKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-rule-key The rule key |
Responses
Response samples
- 204
- 500
null
Segments represent a specific group of users based on their attributes. You can define a specific user segments using a set rules. Rules contain conditions that are applied to attributes.
key required | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
{- "key": "example-key",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
List segments
List a project's user segments.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
Responses
Response samples
- 200
- 500
{- "data": [
- {
- "type": "segment",
- "id": "1aee39f0-f753-482a-98d6-dbac6df00275",
- "attributes": {
- "description": "This should be a description.",
- "key": "test-segment",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}, - {
- "type": "segment",
- "id": "87871700-ab40-40c5-b8dc-1d4dcac38ca6",
- "attributes": {
- "description": "This should be a description.",
- "key": "test-segment-1",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}
]
}
Create segment
Create a user segment in a specific project.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
Request Body schema: application/json
key required | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
name | string (Resouce Name) <= 30 characters A name used to label resources. Ideally a human-readable version of the resource key. |
description | string (Resource Description) Optional resource description. |
tags | Array of strings (Resource Tags) Optional tags used to identify this resource. |
Responses
Request samples
- Payload
{- "id": "87871700-ab40-40c5-b8dc-1d4dcac38ca6",
- "key": "test-segment-1",
- "name": "Example Name",
- "description": "This should be a description.",
- "tags": [
- "example-tag"
]
}
Response samples
- 201
- 500
{- "data": {
- "type": "segment",
- "id": "87871700-ab40-40c5-b8dc-1d4dcac38ca6",
- "attributes": {
- "description": "This should describe a segment.",
- "key": "test-segment-1",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}
}
Get segment
Get a user segment from a project.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
segKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-segment-key The segment key |
Responses
Response samples
- 200
- 500
{- "data": {
- "type": "segment",
- "id": "87871700-ab40-40c5-b8dc-1d4dcac38ca6",
- "attributes": {
- "description": "This should describe a segment.",
- "key": "test-segment-1",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}
}
Update segment
Update an existing user segment in a specific project.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
segKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-segment-key The segment key |
Request Body schema: application/json
Patch Document (RFC 6902)
op | string Enum: "add" "remove" "replace" "move" "copy" "test" The operation to be performed |
path | string A JSON-Pointer |
object or string or number or boolean The value to be used within the operations. | |
from | string A string containing a JSON Pointer value. |
Responses
Request samples
- Payload
[- {
- "op": "replace",
- "path": "/name",
- "value": "Cool segment name"
}
]
Response samples
- 200
- 500
{- "data": {
- "type": "segment",
- "id": "87871700-ab40-40c5-b8dc-1d4dcac38ca6",
- "attributes": {
- "description": "This should describe a segment.",
- "key": "test-segment-1",
- "name": "Example Name",
- "tags": [
- "example-tag"
]
}
}
}
Delete segment
Delete an existing user segment.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
segKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-segment-key The segment key |
Responses
Response samples
- 500
{- "errors": [
- {
- "code": "string",
- "message ": "string"
}
]
}
Segment rules consists of conditions that need to match a specific user's attributes (i.e. identity traits) .
key | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
traitKey | string |
operator | string (RuleOperand) Enum: "equal" "greater_than" "greater_than_or_equal" "contains" "regex" Comporator operand used for rules |
traitValue | string |
{- "key": "example-key",
- "traitKey": "string",
- "operator": "equal",
- "traitValue": "string"
}
Comporator operand used for rules
"equal"
List segment rules
List segment rules for a particular segment.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
segKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-segment-key The segment key |
Responses
Response samples
- 200
- 500
{- "data": [
- {
- "id": "45326ac0-ac8f-46f2-9af4-f881407848f4",
- "type": "segment_rule",
- "attributes": {
- "key": "postcode-rule-entry",
- "traitKey": "postcode",
- "traitValue": "20322",
- "operator": "greater_than",
- "negate": false
}
}, - {
- "id": "45326ac0-ac8f-46f2-9af4-f881407848f4",
- "type": "segment_rule",
- "attributes": {
- "key": "postcode-rule-exit",
- "traitKey": "postcode",
- "traitValue": "20400",
- "operator": "greater_than_or_equal",
- "negate": true
}
}, - {
- "id": "45326ac0-ac8f-46f2-9af4-f881407848f4",
- "type": "segment_rule",
- "attributes": {
- "key": "some-other-segment-rule",
- "traitKey": "some-random-trait-key",
- "traitValue": "some-trait-value",
- "operator": "equal",
- "negate": false
}
}
]
}
Create segment rule
Create a new segment rule for a particular segment.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
segKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-segment-key The segment key |
Request Body schema: application/json
Segment Rules
key | string (Resource Key) [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ A unique key used to identify this resource. |
traitKey | string |
operator | string (RuleOperand) Enum: "equal" "greater_than" "greater_than_or_equal" "contains" "regex" Comporator operand used for rules |
traitValue | string |
Responses
Request samples
- Payload
{- "key": "some-segment-rule",
- "traitKey": "some-trait-key",
- "traitValue": "some-trait-value",
- "operator": "equal",
- "negate": false
}
Response samples
- 201
- 500
{- "data": {
- "id": "45326ac0-ac8f-46f2-9af4-f881407848f4",
- "type": "segment_rule",
- "attributes": {
- "key": "test-segment-rule",
- "traitKey": "some-random-trait-key",
- "traitValue": "some-trait-value",
- "operator": "equal",
- "negate": false
}
}
}
Get segment rule
Get a specific segment rule
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
segKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-segment-key The segment key |
ruleKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-rule-key The rule key |
Responses
Response samples
- 200
- 500
{- "data": {
- "id": "45326ac0-ac8f-46f2-9af4-f881407848f4",
- "type": "segment_rule",
- "attributes": {
- "key": "test-segment-rule",
- "traitKey": "some-random-trait-key",
- "traitValue": "some-trait-value",
- "operator": "equal",
- "negate": false
}
}
}
Update segment rule
Update an existing segment rule.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
segKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-segment-key The segment key |
ruleKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-rule-key The rule key |
Request Body schema: application/json
Patch Document (RFC 6902)
op | string Enum: "add" "remove" "replace" "move" "copy" "test" The operation to be performed |
path | string A JSON-Pointer |
object or string or number or boolean The value to be used within the operations. | |
from | string A string containing a JSON Pointer value. |
Responses
Request samples
- Payload
[- {
- "op": "replace",
- "path": "/traitKey",
- "value": "some-random-trait-key"
}
]
Response samples
- 200
- 500
{- "data": {
- "id": "45326ac0-ac8f-46f2-9af4-f881407848f4",
- "type": "segment_rule",
- "attributes": {
- "key": "test-segment-rule",
- "traitKey": "some-random-trait-key",
- "traitValue": "some-trait-value",
- "operator": "equal",
- "negate": false
}
}
}
Delete segment rule
Delete an existing segment rule
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
segKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-segment-key The segment key |
ruleKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: some-rule-key The rule key |
Responses
Response samples
- 500
{- "errors": [
- {
- "code": "string",
- "message ": "string"
}
]
}
An identity is an instance of a user. Identities are initially created when the first evaluate a feature flag (i.e. by using the SDK).
List identities
List project identities in a specific environment.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
Responses
Response samples
- 200
- 500
{- "data": [
- {
- "id": "string",
- "type": "string",
- "attributes": {
- "key": "string"
}
}
]
}
Get identity
Get a single identity from a project.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
identityKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ The identity key |
Responses
Response samples
- 200
- 500
{- "data": {
- "id": "string",
- "type": "string",
- "attributes": {
- "key": "string"
}
}
}
Delete identity
Delete an environment specific identity.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
identityKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ The identity key |
Responses
Response samples
- 204
- 500
null
Traits represent a particular characteristic of a particular identity (aka users). You can create segments using these traits. Traits can also be used to target variations to specific users.
Get trait
Get a trait within a specific environment.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
traitKey required | string [ 3 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ The trait key |
Responses
Response samples
- 200
- 500
{- "data": {
- "id": { },
- "type": "string",
- "attributes": {
- "key": "string",
- "isIdentifier": true
}
}
}
Update trait
Update an existing trait.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
traitKey required | string [ 3 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ The trait key |
Request Body schema: application/json
Patch Document (RFC 6902)
op | string Enum: "add" "remove" "replace" "move" "copy" "test" The operation to be performed |
path | string A JSON-Pointer |
object or string or number or boolean The value to be used within the operations. | |
from | string A string containing a JSON Pointer value. |
Responses
Request samples
- Payload
[- {
- "op": "replace",
- "path": "/key",
- "value": "test-trait"
}
]
Response samples
- 200
- 500
{- "data": {
- "id": { },
- "type": "string",
- "attributes": {
- "key": "string",
- "isIdentifier": true
}
}
}
Delete trait
Delete an existing trait.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
traitKey required | string [ 3 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ The trait key |
Responses
Response samples
- 500
{- "errors": [
- {
- "code": "string",
- "message ": "string"
}
]
}
List traits
Retreive a list of traits in a particular environment.
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
Responses
Response samples
- 200
- 500
{- "data": [
- {
- "id": "string",
- "type": "string",
- "attributes": {
- "key": "string",
- "isIdentifier": true
}
}
]
}
Create trait
Create a new trait for a particular environment
Authorizations:
path Parameters
wsKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-workspace The workspace key |
projKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: my-project The project key |
envKey required | string [ 4 .. 30 ] characters ^[a-z0-9]+([_ -]?[a-z0-9])*$ Example: staging The environment key |
Request Body schema: application/json
Environmnet Object
key required | string |
isIdentifier required | boolean |
Responses
Request samples
- Payload
{- "key": "some-trait-key",
- "isIdentifier": true
}
Response samples
- 201
- 500
{- "data": {
- "key": "string",
- "isIdentifier": true
}
}