Sign in Start for free

Feature Flags

Generates an evaluation preview of every feature flag in a project for a single tenant in a single environment

GET /api/{spaceId}/projects/{projectId}/feature-flags/evaluation-preview/environments/{environmentId}/tenants/{tenantId}/v2

Also reachable at /api/spaces/{spaceIdentifier}/projects/{projectId}/feature-flags/evaluation-preview/environments/{environmentId}/tenants/{tenantId}/v2.

Path Parameters

  • environmentId string (required)
  • projectId string (required)
  • spaceId string (required)
  • tenantId string (required)

Query Parameters

  • partialName string
    Filters results to feature flags whose name or slug contains this text.
  • skip integer (required)
    Number of items to skip. Defaults to zero. Minimum 0.
  • tags array of string
  • take integer (required)
    Number of items to take. Defaults to 30. Minimum 0.

Response

200 — The evaluated state of a project’s feature flags for a single tenant in a single environment.

  • Flags object
    • ItemType string
      The type of item in this list.
    • Items array of object
    • ItemsPerPage integer
    • LastPageNumber integer
    • NumberOfPages integer
    • TotalResults integer
  • Version string
    The release version the flags were evaluated against, taken from the release currently deployed to the environment for the tenant. Null when the tenant has nothing deployed there, in which case version conditions are treated as satisfied.

Example Response

JSON
{
  "Flags": {
    "ItemType": "FeatureFlagEvaluationPreview",
    "Items": [
      {
        "Id": "string",
        "Name": "string",
        "Reason": "string",
        "Slug": "string",
        "Value": false
      }
    ],
    "ItemsPerPage": 30,
    "LastPageNumber": 1,
    "NumberOfPages": 2,
    "TotalResults": 42
  },
  "Version": "string"
}

Lists all feature flags within a project

GET /api/{spaceId}/projects/{projectId}/feature-flags/v2

Also reachable at /api/spaces/{spaceIdentifier}/projects/{projectId}/feature-flags/v2.

Path Parameters

  • projectId string (required)
  • spaceId string (required)

Query Parameters

  • environments array of string
  • hasTargeting boolean
  • partialName string
    Filters results to feature flags whose name or slug contains this text.
  • rolloutGroups array of string
  • skip integer (required)
    Number of items to skip. Defaults to zero. Minimum 0.
  • tags array of string
  • take integer (required)
    Number of items to take. Defaults to 30. Minimum 0.

Response

200 — Success

  • ItemType string
    The type of item in this list.
  • Items array of object
    • Created string
      Format date-time.
    • DefaultIsEnabled boolean
    • Description string
    • Environments array of object
    • Id string
    • Name string
      Minimum length 1.
    • ProjectId string
    • RolloutGroupId string
    • Slug string
      Minimum length 1.
    • SpaceId string
    • Tags array of string
  • ItemsPerPage integer
  • LastPageNumber integer
  • NumberOfPages integer
  • TotalResults integer

Example Response

JSON
{
  "ItemType": "FeatureFlagSummary",
  "Items": [
    {
      "Created": "2020-01-01T00:00:00.000Z",
      "DefaultIsEnabled": false,
      "Description": "string",
      "Environments": [
        {}
      ],
      "Id": "string",
      "Name": "string",
      "ProjectId": "Projects-1",
      "RolloutGroupId": "string",
      "Slug": "string",
      "SpaceId": "Spaces-1",
      "Tags": [
        "string"
      ]
    }
  ],
  "ItemsPerPage": 30,
  "LastPageNumber": 1,
  "NumberOfPages": 2,
  "TotalResults": 42
}

Creates a feature flag

POST /api/{spaceId}/projects/{projectId}/feature-flags/v2

Also reachable at /api/spaces/{spaceIdentifier}/projects/{projectId}/feature-flags/v2.

Path Parameters

  • projectId string (required)
  • spaceId string (required)

Request Body

  • Description string
    Maximum length 1000.
  • Environments array of object (required)
    • DeploymentEnvironmentId string (required)
    • IsEnabled boolean (required)
    • Phases array of object (required)
  • Name string (required)
    Minimum length 1. Maximum length 200.
  • ProjectId string (required)
  • RolloutGroupId string
  • Slug string
    The slug for the feature flag. When not supplied, a slug is generated from the name. Maximum length 200.
  • SpaceId string (required)
  • Tags array of string

Response

201 — Created

  • Created string
    Format date-time.
  • DefaultIsEnabled boolean
  • Description string
  • Environments array of object
    • DeploymentEnvironmentId string
    • IsEnabled boolean
    • Phases array of object
  • Id string
  • Name string
    Minimum length 1.
  • ProjectId string
  • RolloutGroupId string
  • Slug string
    Minimum length 1.
  • SpaceId string
  • Tags array of string

Example Request

JSON
{
  "Description": "string",
  "Environments": [
    {
      "DeploymentEnvironmentId": "Environments-1",
      "IsEnabled": false,
      "Phases": [
        {}
      ]
    }
  ],
  "Name": "string",
  "ProjectId": "Projects-1",
  "RolloutGroupId": "string",
  "Slug": "string",
  "SpaceId": "Spaces-1",
  "Tags": [
    "string"
  ]
}

Example Response

JSON
{
  "Created": "2020-01-01T00:00:00.000Z",
  "DefaultIsEnabled": false,
  "Description": "string",
  "Environments": [
    {
      "DeploymentEnvironmentId": "Environments-1",
      "IsEnabled": false,
      "Phases": [
        {}
      ]
    }
  ],
  "Id": "string",
  "Name": "string",
  "ProjectId": "Projects-1",
  "RolloutGroupId": "string",
  "Slug": "string",
  "SpaceId": "Spaces-1",
  "Tags": [
    "string"
  ]
}

Clones a feature flag into the same project. The clone starts switched off in every environment with no phases enabled

POST /api/{spaceId}/projects/{projectId}/feature-flags/{featureFlagId}/clone/v2

Also reachable at /api/spaces/{spaceIdentifier}/projects/{projectId}/feature-flags/{featureFlagId}/clone/v2.

Path Parameters

  • featureFlagId string (required)
  • projectId string (required)
  • spaceId string (required)

Request Body

  • FeatureFlagId string (required)
  • Name string (required)
    Minimum length 1. Maximum length 200.
  • ProjectId string (required)
  • Slug string
    Maximum length 200.
  • SpaceId string (required)

Response

201 — Created

  • Created string
    Format date-time.
  • DefaultIsEnabled boolean
  • Description string
  • Environments array of object
    • DeploymentEnvironmentId string
    • IsEnabled boolean
    • Phases array of object
  • Id string
  • Name string
    Minimum length 1.
  • ProjectId string
  • RolloutGroupId string
  • Slug string
    Minimum length 1.
  • SpaceId string
  • Tags array of string

Example Request

JSON
{
  "FeatureFlagId": "string",
  "Name": "string",
  "ProjectId": "Projects-1",
  "Slug": "string",
  "SpaceId": "Spaces-1"
}

Example Response

JSON
{
  "Created": "2020-01-01T00:00:00.000Z",
  "DefaultIsEnabled": false,
  "Description": "string",
  "Environments": [
    {
      "DeploymentEnvironmentId": "Environments-1",
      "IsEnabled": false,
      "Phases": [
        {}
      ]
    }
  ],
  "Id": "string",
  "Name": "string",
  "ProjectId": "Projects-1",
  "RolloutGroupId": "string",
  "Slug": "string",
  "SpaceId": "Spaces-1",
  "Tags": [
    "string"
  ]
}

Generates an evaluation preview for a feature flag across all environments in all project lifecycles, sorted in lifecycle order. Optionally scoped to a specific tenant; when no tenant is provided, the untenanted case is evaluated

GET /api/{spaceId}/projects/{projectId}/feature-flags/{featureFlagId}/evaluation-preview/environments/v2

Also reachable at /api/spaces/{spaceIdentifier}/projects/{projectId}/feature-flags/{featureFlagId}/evaluation-preview/environments/v2.

Path Parameters

  • featureFlagId string (required)
  • projectId string (required)
  • spaceId string (required)

Query Parameters

  • channelId string
    Scopes the release version lookup to a single channel. When null, the most recently deployed release across all channels is used for each environment.
  • partialName string
    Filters results to environments whose name contains this text.
  • skip integer (required)
    Number of items to skip. Defaults to zero. Minimum 0.
  • take integer (required)
    Number of items to take. Defaults to 30. Minimum 0.
  • tenantId string
    Scopes the evaluation to a single tenant. When null, the untenanted case is evaluated.

Response

200 — Success

  • ItemType string
    The type of item in this list.
  • Items array of object
    • EnvironmentId string
    • Reason string
      A human-readable explanation of why the flag evaluated to the value it did. Minimum length 1.
    • Value boolean
      The value the flag evaluated to (true or false).
    • Version string
      The release version used to evaluate version conditions. Null when nothing has been deployed to the environment for the project (and tenant, when the preview is scoped to one).
  • ItemsPerPage integer
  • LastPageNumber integer
  • NumberOfPages integer
  • TotalResults integer

Example Response

JSON
{
  "ItemType": "EnvironmentFeatureFlagEvaluationPreview",
  "Items": [
    {
      "EnvironmentId": "Environments-1",
      "Reason": "string",
      "Value": false,
      "Version": "string"
    }
  ],
  "ItemsPerPage": 30,
  "LastPageNumber": 1,
  "NumberOfPages": 2,
  "TotalResults": 42
}

Generates an evaluation preview for an unsaved configuration of a feature flag across all environments in all project lifecycles, sorted in lifecycle order, alongside the evaluation for the flag’s saved configuration. Optionally scoped to a specific tenant; when no tenant is provided, the untenanted case is evaluated. Nothing is saved

POST /api/{spaceId}/projects/{projectId}/feature-flags/{featureFlagId}/evaluation-preview/environments/v2

Also reachable at /api/spaces/{spaceIdentifier}/projects/{projectId}/feature-flags/{featureFlagId}/evaluation-preview/environments/v2.

Path Parameters

  • featureFlagId string (required)
  • projectId string (required)
  • spaceId string (required)

Request Body

  • ChannelId string
    Scopes the release version lookup to a single channel. When null, the most recently deployed release across all channels is used for each environment.
  • DefaultIsEnabled boolean
    The unsaved default value of the flag.
  • Environments array of object (required)
    The unsaved rollout configuration of the flag, in the same shape the flag is modified with.
    • DeploymentEnvironmentId string (required)
    • IsEnabled boolean (required)
    • Phases array of object (required)
  • FeatureFlagId string (required)
  • PartialName string
    Filters results to environments whose name contains this text.
  • ProjectId string (required)
  • RolloutGroupId string
    The unsaved rollout group of the flag.
  • Skip integer (required)
    Number of items to skip. Defaults to zero. Minimum 0.
  • SpaceId string (required)
  • Take integer (required)
    Number of items to take. Defaults to 30. Minimum 0.
  • TenantId string
    Scopes the evaluation to a single tenant. When null, the untenanted case is evaluated.

Response

200 — Success

  • ItemType string
    The type of item in this list.
  • Items array of object
    • EnvironmentId string
    • Saved object
    • Unsaved object
    • Version string
      The release version used to evaluate version conditions. Null when nothing has been deployed to the environment for the project (and tenant, when the preview is scoped to one).
  • ItemsPerPage integer
  • LastPageNumber integer
  • NumberOfPages integer
  • TotalResults integer

Example Request

JSON
{
  "ChannelId": "Channels-1",
  "DefaultIsEnabled": false,
  "Environments": [
    {
      "DeploymentEnvironmentId": "Environments-1",
      "IsEnabled": false,
      "Phases": [
        {}
      ]
    }
  ],
  "FeatureFlagId": "string",
  "PartialName": "string",
  "ProjectId": "Projects-1",
  "RolloutGroupId": "string",
  "Skip": 0,
  "SpaceId": "Spaces-1",
  "Take": 0,
  "TenantId": "Tenants-1"
}

Example Response

JSON
{
  "ItemType": "EnvironmentFeatureFlagEvaluationComparison",
  "Items": [
    {
      "EnvironmentId": "Environments-1",
      "Saved": {
        "Reason": "string",
        "Value": false
      },
      "Unsaved": {
        "Reason": "string",
        "Value": false
      },
      "Version": "string"
    }
  ],
  "ItemsPerPage": 30,
  "LastPageNumber": 1,
  "NumberOfPages": 2,
  "TotalResults": 42
}

Generates an evaluation preview for a feature flag across all tenants connected to the given project and environment. The untenanted case is included as the first entry of the first page

GET /api/{spaceId}/projects/{projectId}/feature-flags/{featureFlagId}/evaluation-preview/tenants/v2

Also reachable at /api/spaces/{spaceIdentifier}/projects/{projectId}/feature-flags/{featureFlagId}/evaluation-preview/tenants/v2.

Path Parameters

  • featureFlagId string (required)
  • projectId string (required)
  • spaceId string (required)

Query Parameters

  • channelId string
    Scopes the release version lookup to a single channel. When null, the most recently deployed release across all channels is used for each tenant.
  • environmentId string (required)
  • partialName string
    Filters results to tenants whose name contains this text.
  • skip integer (required)
    Number of items to skip. Defaults to zero. Minimum 0.
  • take integer (required)
    Number of items to take. Defaults to 30. Minimum 0.

Response

200 — Success

  • ItemType string
    The type of item in this list.
  • Items array of object
    • Reason string
      A human-readable explanation of why the flag evaluated to the value it did. Minimum length 1.
    • TenantId string
    • Value boolean
      The value the flag evaluated to (true or false).
    • Version string
      The release version used to evaluate version conditions. Null when nothing has been deployed for the tenant in the project and environment.
  • ItemsPerPage integer
  • LastPageNumber integer
  • NumberOfPages integer
  • TotalResults integer

Example Response

JSON
{
  "ItemType": "TenantFeatureFlagEvaluationPreview",
  "Items": [
    {
      "Reason": "string",
      "TenantId": "Tenants-1",
      "Value": false,
      "Version": "string"
    }
  ],
  "ItemsPerPage": 30,
  "LastPageNumber": 1,
  "NumberOfPages": 2,
  "TotalResults": 42
}

Generates an evaluation preview for an unsaved configuration of a feature flag across all tenants connected to the given project and environment, alongside the evaluation for the flag’s saved configuration. The untenanted case is included as the first entry of the first page. Nothing is saved

POST /api/{spaceId}/projects/{projectId}/feature-flags/{featureFlagId}/evaluation-preview/tenants/v2

Also reachable at /api/spaces/{spaceIdentifier}/projects/{projectId}/feature-flags/{featureFlagId}/evaluation-preview/tenants/v2.

Path Parameters

  • featureFlagId string (required)
  • projectId string (required)
  • spaceId string (required)

Request Body

  • ChannelId string
    Scopes the release version lookup to a single channel. When null, the most recently deployed release across all channels is used for each tenant.
  • DefaultIsEnabled boolean
    The unsaved default value of the flag.
  • EnvironmentId string (required)
  • Environments array of object (required)
    The unsaved rollout configuration of the flag, in the same shape the flag is modified with.
    • DeploymentEnvironmentId string (required)
    • IsEnabled boolean (required)
    • Phases array of object (required)
  • FeatureFlagId string (required)
  • PartialName string
    Filters results to tenants whose name contains this text.
  • ProjectId string (required)
  • RolloutGroupId string
    The unsaved rollout group of the flag.
  • Skip integer (required)
    Number of items to skip. Defaults to zero. Minimum 0.
  • SpaceId string (required)
  • Take integer (required)
    Number of items to take. Defaults to 30. Minimum 0.

Response

200 — Success

  • ItemType string
    The type of item in this list.
  • Items array of object
    • Saved object
    • TenantId string
    • Unsaved object
    • Version string
      The release version used to evaluate version conditions. Null when nothing has been deployed for the tenant in the project and environment.
  • ItemsPerPage integer
  • LastPageNumber integer
  • NumberOfPages integer
  • TotalResults integer

Example Request

JSON
{
  "ChannelId": "Channels-1",
  "DefaultIsEnabled": false,
  "EnvironmentId": "Environments-1",
  "Environments": [
    {
      "DeploymentEnvironmentId": "Environments-1",
      "IsEnabled": false,
      "Phases": [
        {}
      ]
    }
  ],
  "FeatureFlagId": "string",
  "PartialName": "string",
  "ProjectId": "Projects-1",
  "RolloutGroupId": "string",
  "Skip": 0,
  "SpaceId": "Spaces-1",
  "Take": 0
}

Example Response

JSON
{
  "ItemType": "TenantFeatureFlagEvaluationComparison",
  "Items": [
    {
      "Saved": {
        "Reason": "string",
        "Value": false
      },
      "TenantId": "Tenants-1",
      "Unsaved": {
        "Reason": "string",
        "Value": false
      },
      "Version": "string"
    }
  ],
  "ItemsPerPage": 30,
  "LastPageNumber": 1,
  "NumberOfPages": 2,
  "TotalResults": 42
}

Retrieves a feature flag by ID

GET /api/{spaceId}/projects/{projectId}/feature-flags/{id}/v2

Also reachable at /api/spaces/{spaceIdentifier}/projects/{projectId}/feature-flags/{id}/v2.

Path Parameters

  • id string (required)
  • projectId string (required)
  • spaceId string (required)

Response

200 — A feature flag.

  • Created string
    Format date-time.
  • DefaultIsEnabled boolean
  • Description string
  • Environments array of object
    • DeploymentEnvironmentId string
    • IsEnabled boolean
    • Phases array of object
  • Id string
  • Name string
    Minimum length 1.
  • ProjectId string
  • RolloutGroupId string
  • Slug string
    Minimum length 1.
  • SpaceId string
  • Tags array of string

Example Response

JSON
{
  "Created": "2020-01-01T00:00:00.000Z",
  "DefaultIsEnabled": false,
  "Description": "string",
  "Environments": [
    {
      "DeploymentEnvironmentId": "Environments-1",
      "IsEnabled": false,
      "Phases": [
        {}
      ]
    }
  ],
  "Id": "string",
  "Name": "string",
  "ProjectId": "Projects-1",
  "RolloutGroupId": "string",
  "Slug": "string",
  "SpaceId": "Spaces-1",
  "Tags": [
    "string"
  ]
}

Modifies a feature flag

PUT /api/{spaceId}/projects/{projectId}/feature-flags/{id}/v2

Also reachable at /api/spaces/{spaceIdentifier}/projects/{projectId}/feature-flags/{id}/v2.

Path Parameters

  • id string (required)
  • projectId string (required)
  • spaceId string (required)

Request Body

  • DefaultIsEnabled boolean
  • Description string
    Maximum length 1000.
  • Environments array of object (required)
    The complete set of per-environment configurations for the flag. This replaces the existing set: environments omitted here are removed from the flag.
    • DeploymentEnvironmentId string (required)
    • IsEnabled boolean (required)
    • Phases array of object (required)
  • Id string (required)
  • Name string (required)
    Minimum length 1. Maximum length 200.
  • ProjectId string (required)
  • RolloutGroupId string
  • Slug string (required)
    Minimum length 1. Maximum length 200.
  • SpaceId string (required)
  • Tags array of string

Response

200 — A feature flag.

  • Created string
    Format date-time.
  • DefaultIsEnabled boolean
  • Description string
  • Environments array of object
    • DeploymentEnvironmentId string
    • IsEnabled boolean
    • Phases array of object
  • Id string
  • Name string
    Minimum length 1.
  • ProjectId string
  • RolloutGroupId string
  • Slug string
    Minimum length 1.
  • SpaceId string
  • Tags array of string

Example Request

JSON
{
  "DefaultIsEnabled": false,
  "Description": "string",
  "Environments": [
    {
      "DeploymentEnvironmentId": "Environments-1",
      "IsEnabled": false,
      "Phases": [
        {}
      ]
    }
  ],
  "Id": "string",
  "Name": "string",
  "ProjectId": "Projects-1",
  "RolloutGroupId": "string",
  "Slug": "string",
  "SpaceId": "Spaces-1",
  "Tags": [
    "string"
  ]
}

Example Response

JSON
{
  "Created": "2020-01-01T00:00:00.000Z",
  "DefaultIsEnabled": false,
  "Description": "string",
  "Environments": [
    {
      "DeploymentEnvironmentId": "Environments-1",
      "IsEnabled": false,
      "Phases": [
        {}
      ]
    }
  ],
  "Id": "string",
  "Name": "string",
  "ProjectId": "Projects-1",
  "RolloutGroupId": "string",
  "Slug": "string",
  "SpaceId": "Spaces-1",
  "Tags": [
    "string"
  ]
}

Deletes a feature flag

DELETE /api/{spaceId}/projects/{projectId}/feature-flags/{id}/v2

Also reachable at /api/spaces/{spaceIdentifier}/projects/{projectId}/feature-flags/{id}/v2.

Path Parameters

  • id string (required)
  • projectId string (required)
  • spaceId string (required)

Response

200 — Response from deleting a rule-based (V2) feature flag

Example Response

JSON
{}