Use this API to serve feature flags to an Unleash-compatible client, and to register that client and receive its metrics. Generally these endpoints are used by an Unleash client and are not meant for manual consumption.

Get Unleash features

GET /api/v4/feature_flags/unleash/{project_id}

Parameters

NameTypeDescription
project_id
Path, required
StringThe ID of a project
instance_id
Query
StringThe instance ID of Unleash Client
app_name
Query
StringThe application name of Unleash Client

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
404Not Found—

Get a list of features

GET /api/v4/feature_flags/unleash/{project_id}/client/features

Parameters

NameTypeDescription
project_id
Path, required
StringThe ID of a project
instance_id
Query
StringThe instance ID of Unleash Client
app_name
Query
StringThe application name of Unleash Client

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
404Not Found—

Report Unleash client metrics

POST /api/v4/feature_flags/unleash/{project_id}/client/metrics

Parameters

NameTypeDescription
project_id
Path, required
StringThe ID of a project

Request body (application/json)

PropertyTypeDescription
app_nameStringThe application name of Unleash Client
instance_idStringThe instance ID of Unleash Client

Responses

CodeDescriptionSchema
201Created—
400Bad Request—
404Not Found—

Register Unleash client

POST /api/v4/feature_flags/unleash/{project_id}/client/register

Parameters

NameTypeDescription
project_id
Path, required
StringThe ID of a project

Request body (application/json)

PropertyTypeDescription
app_nameStringThe application name of Unleash Client
instance_idStringThe instance ID of Unleash Client

Responses

CodeDescriptionSchema
201Created—
400Bad Request—
404Not Found—

Get a list of features (v2 client support) (deprecated)

GET /api/v4/feature_flags/unleash/{project_id}/features

Deprecated in GitLab 15.6

Parameters

NameTypeDescription
project_id
Path, required
StringThe ID of a project
instance_id
Query
StringThe instance ID of Unleash Client
app_name
Query
StringThe application name of Unleash Client

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
404Not Found—