Feature Flags

Get a Feature Flag by ID

Changed on

Retrieve the currently stored Feature Flag data for the given ID.

The result will be what is currently stored, ignoring any pending updates or deletes.

get/rest/featureflags/0.1/flag/{featureFlagId}

Request

  • Base URL
    https://your-domain.atlassian.net
  • URL
    https://your-domain.atlassian.net/rest/featureflags/0.1/flag/{featureFlagId}
  • Auth
    • HTTP basic
    • or OAuth 2
      Authorization code: https://auth.atlassian.com/authorize
      Token URL: https://auth.atlassian.com/oauth/token scopes: read:feature-flag-info:jira

Path parameters

featureFlagIdstring required

The ID of the Feature Flag to fetch.

Response

The Feature Flag data currently stored for the given ID.

schemaVersion'1.0'

The FeatureFlagData schema version used for this flag data.

Placeholder to support potential schema changes in the future.

idstring required

The identifier for the Feature Flag. Must be unique for a given Provider.

keystring required

The identifier that users would use to reference the Feature Flag in their source code etc.

Will be made available via the UI for users to copy into their source code etc.

updateSequenceIdinteger required

An ID used to apply an ordering to updates for this Feature Flag in the case of out-of-order receipt of update requests.

This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the Provider system, but other alternatives are valid (e.g. a Provider could store a counter against each Feature Flag and increment that on each update to Jira).

Updates for a Feature Flag that are received with an updateSqeuenceId lower than what is currently stored will be ignored.

displayNamestring

The human-readable name for the Feature Flag. Will be shown in the UI.

If not provided, will use the ID for display.

issueKeysstring[]

The Jira issue keys to associate the Feature Flag information with.

Example response

{
  "schemaVersion": "1.0",
  "id": "111-222-333",
  "key": "my-awesome-feature",
  "updateSequenceId": 1523494301448,
  "displayName": "Enable awesome feature",
  "issueKeys": [
    "ISSUE-123"
  ],
  "associations": [
    {
      "associationType": "issueIdOrKeys",
      "values": [
        "ABC-123",
        "ABC-456"
      ]
    }
  ],
  "summary": {
    "url": "https://example.com/project/feature-123/summary",
    "status": {
      "defaultValue": "Disabled",
      "rollout": {
        "percentage": 80
      }
    },
    "lastUpdated": "2018-01-20T23:27:25.000Z"
  },
  "details": [
    {
      "url": "https://example.com/project/feature-123/production",
      "lastUpdated": "2018-01-20T23:27:25.000Z",
      "environment": {
        "name": "prod-us-west",
        "type": "production"
      },
      "status": {
        "defaultValue": "Disabled",
        "rollout": {
          "percentage": 80
        }
      }
    }
  ]
}

Changes

    • breaking

      the response property became optional for the status

    • info

      the endpoint scheme security OAuth2 was added to the API

    • info

      the endpoint scheme security basicAuth was added to the API

    • info

      added the optional property to the response with the status

    • info

      response property issueKeys deprecated

    • info

      endpoint added