Get all features in a project
GET /api/admin/projects/:projectId/features
A list of all features for the specified project.
Request
Path Parameters
- projectId string required
- 200
- 400
- 401
- 403
projectFeaturesSchema
- application/json
- Schema
- Example (from schema)
Schema
- version integer required
The version of the feature's schema
features object[]required
A list of features
Array [name string requiredUnique feature name
type string requiredType of the flag e.g. experiment, kill-switch, release, operational, permission
description string nullable requiredDetailed description of the feature
stale boolean requiredtrue
if the feature is stale based on the age and feature type, otherwisefalse
.favorite boolean requiredtrue
if the feature was favorited, otherwisefalse
.impressionData boolean requiredtrue
if the impression data collection is enabled for the feature, otherwisefalse
.createdAt date-time requiredThe date the feature was created
lastSeenAt date-time nullable deprecatedThe date and time when metrics where last collected for this flag in any environment. This field was deprecated in v5. You should instead use the
lastSeenAt
property on the individual environments listed under theenvironments
property.environments object[]required
The list of environments where the feature can be used
Array [name string requiredThe name of the environment
type string requiredThe type of the environment
enabled boolean requiredtrue
if the feature is enabled for the environment, otherwisefalse
.sortOrder number requiredThe sort order of the feature environment in the feature environments list
variantCount number requiredThe number of defined variants
lastSeenAt date-time nullable requiredThe date when metrics where last collected for the feature environment
hasStrategies booleanWhether the feature has any strategies defined.
hasEnabledStrategies booleanWhether the feature has any enabled strategies defined.
]tags object[]nullable
The list of feature tags
Array [value string requiredPossible values:
>= 2 characters
and<= 50 characters
The value of the tag.
]]
{
"version": 0,
"features": [
{
"name": "disable-comments",
"type": "kill-switch",
"description": "Controls disabling of the comments section in case of an incident",
"stale": false,
"favorite": true,
"impressionData": false,
"createdAt": "2023-01-28T15:21:39.975Z",
"environments": [
{
"name": "my-dev-env",
"type": "development",
"enabled": true,
"sortOrder": 3,
"variantCount": 0,
"lastSeenAt": "2023-01-28T16:21:39.975Z",
"hasStrategies": true,
"hasEnabledStrategies": true
}
],
"tags": [
{
"value": "a-tag-value",
"type": "simple"
}
]
}
]
}
The request data does not match what we expect.
- application/json
- Schema
- Example (from schema)
Schema
- id string
The ID of the error instance
- name string
The name of the error kind
- message string
A description of what went wrong.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "ValidationError",
"message": "The request payload you provided doesn't conform to the schema. The .parameters property should be object. You sent []."
}
Authorization information is missing or invalid. Provide a valid API token as the authorization
header, e.g. authorization:*.*.my-admin-token
.
- application/json
- Schema
- Example (from schema)
Schema
- id string
The ID of the error instance
- name string
The name of the error kind
- message string
A description of what went wrong.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "AuthenticationRequired",
"message": "You must log in to use Unleash. Your request had no authorization header, so we could not authorize you. Try logging in at /auth/simple/login."
}
The provided user credentials are valid, but the user does not have the necessary permissions to perform this operation
- application/json
- Schema
- Example (from schema)
Schema
- id string
The ID of the error instance
- name string
The name of the error kind
- message string
A description of what went wrong.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "NoAccessError",
"message": "You need the \"UPDATE_ADDON\" permission to perform this action in the \"development\" environment."
}