API data schemas

3 minute read

This reference documents the data structures used by the Feature Management API.

Flag

Represents a feature flag definition.

{ "id": "string", "name": "string", "description": "string", "flagType": "Boolean | String | Number", "variants": ["string"], "labels": ["string"], "isPermanent": false, "cascUrl": "string", "created": "2024-01-15T10:30:00Z", "updated": "2024-02-01T14:22:00Z", "configStates": [FlagConfigurationState] }
Field Type Description

id

string

Unique identifier

name

string

Flag name with namespace (e.g., default.myFlag)

description

string

Human-readable description

flagType

enum

Type: Boolean, String, or Number

variants

array

Available values for String/Number flags

labels

array

Labels for organization and filtering

isPermanent

boolean

Whether the flag is permanent (cannot be deleted)

cascUrl

string

URL to the CasC file in SCM (if managed via CasC)

created

datetime

Creation timestamp

updated

datetime

Last update timestamp

configStates

array

Configuration state per environment

FlagConfiguration

Represents a flag’s configuration in a specific environment.

{ "enabled": true, "defaultValue": "any", "conditions": [], "seed": "string", "stickinessProperty": "string", "variantsEnabled": false, "resourceId": "string", "cascUrl": "string", "created": "2024-01-15T10:30:00Z", "updated": "2024-02-01T14:22:00Z" }
Field Type Description

enabled

boolean

Whether the flag is enabled in this environment

defaultValue

any

Default value when no conditions match

conditions

array

Array of targeting conditions

seed

string

Seed for percentage-based randomization

stickinessProperty

string

Property for consistent percentage-based evaluation

variantsEnabled

boolean

Whether multiple variants are enabled

resourceId

string

Associated resource ID

cascUrl

string

URL to CasC file

created

datetime

Creation timestamp

updated

datetime

Last update timestamp

FlagConfigurationState

Represents the enabled state of a flag in an environment.

{ "environmentId": "string", "enabled": true, "updated": "2024-02-01T14:22:00Z" }
Field Type Description

environmentId

string

Environment identifier

enabled

boolean

Whether the flag is enabled

updated

datetime

Last update timestamp

TargetGroup

Represents a target group definition.

{ "id": "string", "name": "string", "description": "string", "conditions": { "operator": "and | or", "conditions": [Condition] }, "resourceId": "string", "cascUrl": "string" }
Field Type Description

id

string

Unique identifier

name

string

Target group name

description

string

Human-readable description

conditions

object

Targeting conditions

resourceId

string

Associated resource ID

cascUrl

string

URL to CasC file

CustomProperty

Represents a custom property definition.

{ "id": "string", "name": "string", "type": "Boolean | String | Number | Semver | DateTime", "description": "string", "resourceId": "string", "cascUrl": "string" }
Field Type Description

id

string

Unique identifier

name

string

Property name

type

enum

Data type: Boolean, String, Number, Semver, or DateTime

description

string

Human-readable description

resourceId

string

Associated resource ID

cascUrl

string

URL to CasC file

Condition

Represents a targeting condition.

Property Condition

{ "property": "string", "operator": "string", "operand": "any" }
Field Type Description

property

string

Property name to evaluate

operator

string

Comparison operator

operand

any

Value to compare against (not required for is-true, is-false, is-undefined)

Group Condition

{ "group": { "name": "string | [string]", "operator": "and | or | not" }, "value": "any" }

Dependency Condition

{ "dependency": { "flag": "string", "value": "any" }, "value": "any" }

Version Condition

{ "version": { "operator": "string", "semver": "string" }, "value": "any" }

Operators

Boolean Operators

Operator Description

is-undefined

Property has no value

is-true

Boolean property is true

is-false

Boolean property is false

Comparison Operators

Operator Description

eq

Equals

ne

Not equals

gt

Greater than

gte

Greater than or equal

lt

Less than

lte

Less than or equal

Array Operators

Operator Description

in-array

Value is in the provided array

String Operators

Operator Description

regex

Matches regular expression

Semantic Version Operators

Operator Description

semver-eq

Version equals

semver-ne

Version not equals

semver-gt

Version greater than

semver-gte

Version greater than or equal

semver-lt

Version less than

semver-lte

Version less than or equal

Error Response

Standard error response format.

{ "code": 3, "message": "Error message", "details": [] }
Field Type Description

code

integer

gRPC status code

message

string

Human-readable error message

details

array

Additional error details

Common Error Codes

Code HTTP Status Description

0

200

OK - Success

3

400

INVALID_ARGUMENT - Invalid parameters

5

404

NOT_FOUND - Resource not found

7

403

PERMISSION_DENIED - Insufficient permissions

16

401

UNAUTHENTICATED - Invalid or missing credentials

List Response Pattern

All list endpoints return paginated responses:

{ "items": [], "nextPageToken": "string", "totalCount": 0 }
Field Type Description

items

array

Array of items (flags, targetGroups, etc.)

nextPageToken

string

Token for fetching the next page (empty if no more pages)

totalCount

integer

Total number of items (if supported)