Rate this page:

Feature Flags

Apis related to integrating Feature Flags with Jira Software. These apis are only available to Atlassian Connect apps. To use these apis you must have the Feature Flag module (see https://developer.atlassian.com/cloud/jira/software/modules/feature-flag/) in your app's descriptor

Submit Feature Flag data

POST /rest/featureflags/0.1/bulk

Update / insert Feature Flag data.

Feature Flags are identified by their ID, and existing Feature Flag data for the same ID will be replaced if it exists and the updateSequenceId of existing data is less than the incoming data.

Submissions are performed asynchronously. Submitted data will eventually be available in Jira; most updates are available within a short period of time, but may take some time during peak load and/or maintenance times. The getFeatureFlagById operation can be used to confirm that data has been stored successfully (if needed).

In the case of multiple Feature Flags being submitted in one request, each is validated individually prior to submission. Details of which Feature Flags failed submission (if any) are available in the response object.

Only apps that define the Feature Flags module can access this resource. This resource requires the 'WRITE' scope.

App scope requiredWRITE

Request

Header parameters
Authorization Required

string

All requests must be signed with a Connect JWT token that corresponds to the Provider app installed in Jira.

If the JWT token corresponds to an app that does not define Feature Flags module it will be rejected with a 403.

See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more details.

Pattern: JWT \S+
Body parameters

The payload used to submit (update / insert) Feature Flag data.

properties

Properties

Properties assigned to Feature Flag data that can then be used for delete / query operations.

Examples might be an account or user ID that can then be used to clean up data if an account is removed from the Provider system.

Properties are supplied as key/value pairs, a maximum of 5 properties can be supplied, and keys must not contain ':' or start with '_'.

Max properties: 5
flags Required

Array<FeatureFlagData>

A list of Feature Flags to submit to Jira. Each Feature Flag may be associated with 1 or more Jira issue keys, and will be associated with any properties included in this request.

Min items: 1
providerMetadata

ProviderMetadata

Information about the provider. This is useful for auditing, logging, debugging, and other internal uses. It is not considered private information. Hence, it may not contain personally identifiable information.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
curl --request POST \
  --url 'https://your-domain.atlassian.net/rest/featureflags/0.1/bulk' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "properties": {
    "accountId": "account-234",
    "projectId": "project-123"
  },
  "flags": [
    {
      "schemaVersion": "1.0",
      "id": "111-222-333",
      "key": "my-awesome-feature",
      "updateSequenceId": 1523494301448,
      "displayName": "Enable awesome feature",
      "issueKeys": [
        "ISSUE-123"
      ],
      "summary": {
        "url": "https://example.com/project/feature-123/summary",
        "status": {
          "enabled": true,
          "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": {
            "enabled": true,
            "defaultValue": "Disabled",
            "rollout": {
              "percentage": 80
            }
          }
        }
      ]
    }
  ],
  "providerMetadata": {
    "product": "Atlassian Release Platform 2.1.0"
  }
}'

Responses

Submission accepted. Each submitted Feature Flag that is of a valid format will be eventually available in Jira.

Details of which Feature Flags were submitted and which failed submission (due to data format problems etc.) are available in the response object.

Content typeValue
application/json

SubmitFeatureFlagsResponse

Delete Feature Flags by Property

DELETE /rest/featureflags/0.1/bulkByProperties

Bulk delete all Feature Flags that match the given request.

In addition to the optional updateSequenceId, one or more query params must be supplied to specify Properties to delete by. If more than one Property is provided, data will be deleted that matches ALL of the Properties (e.g. treated as an AND). See the documentation for the submitFeatureFlags operation for more details.

e.g. DELETE /bulkByProperties?accountId=account-123&createdBy=user-456

Deletion is performed asynchronously. The getFeatureFlagById operation can be used to confirm that data has been deleted successfully (if needed).

Only apps that define the Feature Flags module can access this resource. This resource requires the 'DELETE' scope.

App scope requiredDELETE

Request

Query parameters
_updateSequenceId

integer

An optional updateSequenceId to use to control deletion.

Only stored data with an updateSequenceId less than or equal to that provided will be deleted. This can be used help ensure submit/delete requests are applied correctly if issued close together.

If not provided, all stored data that matches the request will be deleted.

Format: int64
Header parameters
Authorization Required

string

All requests must be signed with a Connect JWT token that corresponds to the Provider app installed in Jira.

If the JWT token corresponds to an app that does not define Feature Flags module it will be rejected with a 403.

See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more details.

Pattern: JWT \S+

Example

1
2
curl --request DELETE \
  --url 'https://your-domain.atlassian.net/rest/featureflags/0.1/bulkByProperties'

Responses

Delete accepted. Data will eventually be removed from Jira.

A schema has not been defined for this response code.

Get a Feature Flag by ID

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

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. Only apps that define the Feature Flags module can access this resource. This resource requires the 'READ' scope.

App scope requiredREAD

Request

Path parameters
featureFlagId Required

string

The ID of the Feature Flag to fetch.

Max length: 255
Header parameters
Authorization Required

string

All requests must be signed with a Connect JWT token that corresponds to the Provider app installed in Jira.

If the JWT token corresponds to an app that does not define Feature Flags module it will be rejected with a 403.

See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more details.

Pattern: JWT \S+

Example

1
2
3
curl --request GET \
  --url 'https://your-domain.atlassian.net/rest/featureflags/0.1/flag/{featureFlagId}' \
  --header 'Accept: application/json'

Responses

The Feature Flag data currently stored for the given ID.

Content typeValue
application/json

FeatureFlagData

Delete a Feature Flag by ID

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

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

Deletion is performed asynchronously. The getFeatureFlagById operation can be used to confirm that data has been deleted successfully (if needed).

Only apps that define the Feature Flags module can access this resource. This resource requires the 'DELETE' scope.

App scope requiredDELETE

Request

Path parameters
featureFlagId Required

string

The ID of the Feature Flag to delete.

Max length: 255
Query parameters
_updateSequenceId

integer

An optional updateSequenceId to use to control deletion.

Only stored data with an updateSequenceId less than or equal to that provided will be deleted. This can be used help ensure submit/delete requests are applied correctly if issued close together.

Format: int64
Header parameters
Authorization Required

string

All requests must be signed with a Connect JWT token that corresponds to the Provider app installed in Jira.

If the JWT token corresponds to an app that does not define Feature Flags module it will be rejected with a 403.

See https://developer.atlassian.com/blog/2015/01/understanding-jwt/ for more details.

Pattern: JWT \S+

Example

1
2
curl --request DELETE \
  --url 'https://your-domain.atlassian.net/rest/featureflags/0.1/flag/{featureFlagId}'

Responses

Delete has been accepted. Data will eventually be removed from Jira if it exists.

A schema has not been defined for this response code.

Rate this page: