• Manual rules
  • Rule management
  • Templates
Cloud
Automation / Reference / REST API

Templates

Postman Collection
OpenAPI

This resource represents automation templates. Use this to search for templates, and create rules from a template.

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.

Forge and OAuth2 apps cannot access this REST resource.

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.

Forge and OAuth2 apps cannot access this REST resource.

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.

Forge and OAuth2 apps cannot access this REST resource.

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.

Forge and OAuth2 apps cannot access this REST resource.

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: