Cloud
Automation / Reference / REST API

Rest

Postman Collection
OpenAPI
GET

Search for manual rules

Search for manually-triggered rules using the given query params.

Note: Currently only cursor is allowed as parameter for the GET operation. Use the POST operation to perform the initial search.

Request

Query parameters

cursor

string

Required
limit

number

Responses

Return the manual rules that match the query AND the requesting user has permissions for.

application/json

SearchManualRuleResponse

Result of a manual rule search. Contains 0 or more results.

GET/rest/v1/rule/manual/search
1 2 3 curl --request GET \ --url 'https://api.atlassian.com/automation/public/{product}/{cloudid}/rest/v1/rule/manual/search?cursor=AAAABBBBCCCC' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "links": { "self": "https://example.com?cursor=bbbbbb", "next": "https://example.com?cursor=bbbbbb", "prev": "https://example.com?cursor=bbbbbb" }, "data": [ { "inputA": { "inputType": "TEXT", "value": "Hello world!" } } ] }
POST

Search for manual rules

Search for manually-triggered rules using the given criteria via POST.

Currently only issue and alert objects are supported.

Request

Request bodyapplication/json

Query parameters to search on

oneOf [SearchManualRuleInitialRequest, SearchManualRuleWithCursorRequest]

SearchManualRuleInitialRequest

Params to use when fetching an initial page of manual rules.

SearchManualRuleWithCursorRequest

Params to use when fetching a subsequent page of manual rules using a pagination cursor.

Responses

Return the manual rules that match the query AND the requesting user has permissions for.

application/json

SearchManualRuleResponse

Result of a manual rule search. Contains 0 or more results.

POST/rest/v1/rule/manual/search
1 2 3 4 5 curl --request POST \ --url 'https://api.atlassian.com/automation/public/{product}/{cloudid}/rest/v1/rule/manual/search' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{}'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "links": { "self": "https://example.com?cursor=bbbbbb", "next": "https://example.com?cursor=bbbbbb", "prev": "https://example.com?cursor=bbbbbb" }, "data": [ { "inputA": { "inputType": "TEXT", "value": "Hello world!" } } ] }
POST

Invoke a manual rule

Invoke a manual rule with one or more target objects and optional inputs. A rule will be executed for each target object provided.

Request

Path parameters

ruleId

number

Required

Request bodyapplication/json

Parameters to use when invoking the rule.

At least one target object is required. If the rule requires userInputs these are also required.

objects

array<ARI>

Required
userInputs

object

Responses

Succesfully issued the invoke request. Check the response body for individual execution results.

application/json

InvokeManualRuleResponse

Invocation results, keyed by object ARI, indicating if the invocation was successful or not.

It is possible for an invocation to fail if, for example, the provided target object is not valid for the rule being invoked.

POST/rest/v1/rule/manual/{ruleId}/invocation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 curl --request POST \ --url 'https://api.atlassian.com/automation/public/{product}/{cloudid}/rest/v1/rule/manual/{ruleId}/invocation' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "objects": [ "ari:cloud:jira:182b9218-d56a-453d-9659-3f29ea2aa7eb:issue/10001" ], "userInputs": { "inputA": { "inputType": "TEXT", "value": "Some value" }, "inputB": { "inputType": "NUMBER", "value": 100 } } }'
200Response
1 2 3 4 { "ari:cloud:jira:182b9218-d56a-453d-9659-3f29ea2aa7eb:issue/10001": "SUCCESS", "ari:cloud:jira:182b9218-d56a-453d-9659-3f29ea2aa7eb:issue/10002": "INVALID_TARGET_OBJECT" }
GET

Get template by template ID

Performs a request to retrieve the metadata associated with the provided template ID. This includes any parameters the template has.

Request

Path parameters

templateId

string

Required

Responses

Succesfully issued the get request.

application/json

Template

Details of a single template, including what parameters are required to create a rule from the template.

GET/rest/v1/template/{templateId}
1 2 3 curl --request GET \ --url 'https://api.atlassian.com/automation/public/{product}/{cloudid}/rest/v1/template/{templateId}' \ --header 'Accept: application/json'
200Response
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 { "id": "software_template_20", "description": "When a task is near due -> send an email to the Assignee of the task", "categories": [ { "key": "jira-software.security", "displayName": "Security" } ], "parameters": [ { "type": "TEXT", "key": "emailSubject", "required": false } ], "displayMetadata": { "triggerIcons": [ "CalendarIcon" ], "actionIcons": [ "SmartValueIcon", "IssuesIcon", "EmailIcon" ] } }
GET

Search for templates

Search for templates rules using the given query params. Accepts either a combination of filter parameters, or a cursor, but not both.

Request

Query parameters

cursor

string

limit

number

categories

array<string>

ruleHome

ARI

Responses

Return the templates that match the query AND the requesting user has permissions for.

application/json

SearchTemplatesResponse

Result of a templates search. Contains 0 or more entries.

GET/rest/v1/template/search
1 2 3 curl --request GET \ --url 'https://api.atlassian.com/automation/public/{product}/{cloudid}/rest/v1/template/search' \ --header 'Accept: application/json'
200Response
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 { "links": { "self": "https://example.com?cursor=bbbbbb", "next": "https://example.com?cursor=bbbbbb", "prev": "https://example.com?cursor=bbbbbb" }, "data": [ { "id": "software_template_20", "description": "When a task is near due -> send an email to the Assignee of the task", "categories": [ { "key": "jira-software.security", "displayName": "Security" } ], "parameters": [ { "type": "TEXT", "key": "emailSubject", "required": false } ], "displayMetadata": { "triggerIcons": [ "CalendarIcon" ], "actionIcons": [ "SmartValueIcon", "IssuesIcon", "EmailIcon" ] } } ] }
POST

Search for templates

Search for templates using the given criteria via POST.

Currently categories and ruleHome ARI filters are supported.

Request

Request bodyapplication/json

Query parameters to search on

oneOf [SearchTemplatesInitialRequest, SearchTemplatesWithCursorRequest]

SearchTemplatesInitialRequest
SearchTemplatesWithCursorRequest

Responses

Return the templates that match the query AND the requesting user has permissions for.

application/json

SearchTemplatesResponse

Result of a templates search. Contains 0 or more entries.

POST/rest/v1/template/search
1 2 3 4 5 curl --request POST \ --url 'https://api.atlassian.com/automation/public/{product}/{cloudid}/rest/v1/template/search' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{}'
200Response
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 { "links": { "self": "https://example.com?cursor=bbbbbb", "next": "https://example.com?cursor=bbbbbb", "prev": "https://example.com?cursor=bbbbbb" }, "data": [ { "id": "software_template_20", "description": "When a task is near due -> send an email to the Assignee of the task", "categories": [ { "key": "jira-software.security", "displayName": "Security" } ], "parameters": [ { "type": "TEXT", "key": "emailSubject", "required": false } ], "displayMetadata": { "triggerIcons": [ "CalendarIcon" ], "actionIcons": [ "SmartValueIcon", "IssuesIcon", "EmailIcon" ] } } ] }
POST

Create a rule from a template

Create a rule from a template. This template may optionally accept parameters.

Request

Request bodyapplication/json

Parameters to use when creating the rule from the template.

If the rule has one or more parameters, values for these parameters are also required.

templateId

string

Required
ruleHome

ARI

Required
parameters

object

Responses

Succesfully created a rule from the provided template.

application/json

CreateRuleFromTemplateResponse

Result of a rule creation from a template.

POST/rest/v1/template/create
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 curl --request POST \ --url 'https://api.atlassian.com/automation/public/{product}/{cloudid}/rest/v1/template/create' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "templateId": "software_template_20", "ruleHome": "ari:cloud:jira:182b9218-d56a-453d-9659-3f29ea2aa7eb:issue/10001", "parameters": { "emailSubject": { "type": "TEXT", "value": "An example email subject" }, "emailBody": { "type": "TEXT", "value": "An example email body" } } }'
200Response
1 2 3 4 { "ruleId": 1, "ruleUuid": "0000660c-24e5-710d-bc7b-626fc6bb83ff" }

Rate this page: