{"openapi":"3.0.2","info":{"title":"New public APIs","description":"New public APIs currently offering manual rules and templates functionality","version":"1.1"},"servers":[{"url":"https://api.atlassian.com/automation/public/{product}/{cloudid}/","description":"Primary entry point. Accepts API token authentication.","variables":{"product":{"description":"The product the API request is targetting","enum":["jira","confluence"],"default":"jira"},"cloudid":{"description":"The cloud ID of the site the API request is targetting.","default":"none"}}},{"url":"https://{siteurl}/gateway/api/automation/public/{product}/{cloudid}/","description":"Site-specific entry point. Accepts API token authentication and browser session auth.","variables":{"siteurl":{"description":"The site base URL of the site the API request is targetting.","default":"example.atlassian.net"},"product":{"description":"The product the API request is targetting","enum":["jira","confluence"],"default":"jira"},"cloudid":{"description":"The cloud ID of the site the API request is targetting.","default":"none"}}}],"paths":{"/rest/v1/rule/manual/search":{"get":{"operationId":"searchManualRulesWithGet","summary":"Search for manual rules","description":"Search for manually-triggered rules using the given query params.\n\n**Note:** Currently only `cursor` is allowed as parameter for the GET operation. \nUse the POST operation to perform the initial search.","tags":["Manual rules"],"parameters":[{"name":"cursor","in":"query","description":"The pagination cursor to use to fetch a page of results.\n\nCursors are obtained via requests to the search API and should not be constructed manually.","schema":{"type":"string"},"example":"AAAABBBBCCCC","required":true},{"name":"limit","in":"query","description":"Optional page size limit","schema":{"type":"number","minimum":1,"maximum":100,"default":50},"required":false}],"responses":{"200":{"description":"Return the manual rules that match the query AND \nthe requesting user has permissions for.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchManualRuleResponse"}}}},"400":{"description":"No query fields provided, or unsupported object type in query.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"User is not authenticated, or user is not permitted to \nfetch rules for the given target object."},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"operationId":"searchManualRulesWithPost","summary":"Search for manual rules","description":"Search for manually-triggered rules using the given criteria via POST.\n\nCurrently only `issue` and `alert` objects are supported.","tags":["Manual rules"],"requestBody":{"description":"Query parameters to search on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchManualRuleRequest"}}}},"responses":{"200":{"description":"Return the manual rules that match the query AND \nthe requesting user has permissions for.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchManualRuleResponse"}}}},"400":{"description":"No query fields provided, or unsupported object type in query.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"User is not authenticated, or user is not permitted to \nfetch rules for the given target object."},"500":{"$ref":"#/components/responses/ServerError"}}}},"/rest/latest/rule/manual/search":{"$ref":"#/paths/~1rest~1v1~1rule~1manual~1search"},"/rest/v1/rule/manual/{ruleId}/invocation":{"parameters":[{"name":"ruleId","in":"path","required":true,"description":"The ID of the rule to invoke","schema":{"type":"number"}}],"post":{"operationId":"invokeManualRule","summary":"Invoke a manual rule","description":"Invoke a manual rule with one or more target objects and optional inputs.\nA rule will be executed for each target object provided.","tags":["Manual rules"],"requestBody":{"description":"Parameters to use when invoking the rule.\n\nAt least one target `object` is required. If the rule requires `userInputs` these are also required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeManualRuleRequest"}}}},"responses":{"200":{"description":"Succesfully issued the invoke request.\n\nCheck the response body for individual execution results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeManualRuleResponse"}}}},"400":{"description":"Invalid request payload, or inputs not valid for the rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"User is not authenticated, or user is not permitted to \nexecute the rule for the given target object(s)."},"404":{"description":"Rule not found"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/rest/latest/rule/manual/{ruleId}/invocation":{"$ref":"#/paths/~1rest~1v1~1rule~1manual~1%7BruleId%7D~1invocation"},"/rest/v1/template/{templateId}":{"get":{"operationId":"getTemplateByTemplateId","summary":"Get template by template ID","description":"Performs a request to retrieve the metadata associated with the provided template ID.\nThis includes any parameters the template has.","tags":["Templates"],"parameters":[{"name":"templateId","in":"path","required":true,"description":"The ID of the template to retrieve","schema":{"type":"string"}}],"responses":{"200":{"description":"Succesfully issued the get request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"description":"Invalid template ID, or the template requested was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Rule not found"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/rest/latest/template/{templateId}":{"$ref":"#/paths/~1rest~1v1~1template~1%7BtemplateId%7D"},"/rest/v1/template/search":{"get":{"operationId":"searchTemplatesWithGet","summary":"Search for templates","description":"Search for templates rules using the given query params.\n\nAccepts either a combination of filter parameters, or a cursor, but not both.","tags":["Templates"],"parameters":[{"name":"cursor","in":"query","description":"The pagination cursor to use to fetch a page of results.\n\nCursors are obtained via requests to the search API and should not be constructed manually.","schema":{"type":"string"},"example":"ewogICJhZnRlck9iamVjdElkIjogIjExMTIxMTEiLAogICJvcmRlckJ5IjogIklEIiwKICAicGFnZVNpemUiOiA1Cn0"},{"name":"limit","in":"query","description":"Optional page size limit","schema":{"type":"number","minimum":1,"maximum":100,"default":50},"example":100},{"name":"categories","in":"query","description":"Optional categories filter parameter","schema":{"type":"array","items":{"type":"string"},"example":"jira-software.software","maxItems":50}},{"name":"ruleHome","in":"query","description":"If provided, only templates that apply to the ruleHome represented by the ARI will be returned.\n\nUsed to limit results to templates applicable for a given project or product etc.","schema":{"$ref":"#/components/schemas/ARI"}}],"responses":{"200":{"description":"Return the templates that match the query AND \nthe requesting user has permissions for.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchTemplatesResponse"}}}},"400":{"description":"No query fields provided, or a combination of filter parameters and cursor were provided. \nEither cursor or a combination of filter parameters are permitted, but not both.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"User is not authenticated, or user is not permitted to \nfetch templates for the given ruleHome."},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"operationId":"searchTemplatesWithPost","summary":"Search for templates","description":"Search for templates using the given criteria via POST.\n\nCurrently `categories` and `ruleHome ARI` filters are supported.","tags":["Templates"],"requestBody":{"description":"Query parameters to search on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchTemplatesRequest"}}}},"responses":{"200":{"description":"Return the templates that match the query AND \nthe requesting user has permissions for.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchTemplatesResponse"}}}},"400":{"description":"No query fields provided.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"User is not authenticated, or user is not permitted to \nfetch templates for the given target ruleHome ARI."},"500":{"$ref":"#/components/responses/ServerError"}}}},"/rest/latest/template/search":{"$ref":"#/paths/~1rest~1v1~1template~1search"},"/rest/v1/template/create":{"post":{"operationId":"createRuleFromTemplate","summary":"Create a rule from a template","description":"Create a rule from a template. This template may optionally accept parameters.","tags":["Templates"],"requestBody":{"description":"Parameters to use when creating the rule from the template.\n\nIf the rule has one or more `parameters`, values for these parameters are also required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRuleFromTemplateRequest"}}}},"responses":{"200":{"description":"Succesfully created a rule from the provided template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRuleFromTemplateResponse"}}}},"400":{"description":"Invalid request payload, or parameter values are not valid for the template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"User is not authenticated, or user is not permitted to \ncreate a rule for the given scope/template."},"500":{"$ref":"#/components/responses/ServerError"}}}},"/rest/latest/template/create":{"$ref":"#/paths/~1rest~1v1~1template~1create"}},"components":{"parameters":{"orderBy":{"name":"orderBy","in":"query","description":"Optionally specify the field to order results by.\nUse prefix '+' and '-' to denote 'ascending' or 'descending'. ","example":"+name","schema":{"type":"string"}}},"responses":{"ServerError":{"description":"A server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"schemas":{"PaginationLinks":{"type":"object","title":"Links","description":"Links to previous and next pages, if available.","properties":{"self":{"type":"string","description":"A link to this page of results.","nullable":true,"example":"https://example.com?cursor=bbbbbb"},"next":{"type":"string","description":"A link to the next page of results, or null of not available.","nullable":true,"example":"https://example.com?cursor=bbbbbb"},"prev":{"type":"string","description":"A link to the previous page of results, or null of not available.","nullable":true,"example":"https://example.com?cursor=bbbbbb"}},"required":["self","next","prev"]},"PaginatedResponse":{"type":"object","description":"An envelope for paginated responses using an opaque cursor for pagination.","allOf":[{"type":"object","title":"Links","description":"The pagination response links header.","properties":{"links":{"$ref":"#/components/schemas/PaginationLinks"}},"required":["links"]},{"type":"object","title":"Data","description":"A page of data. May be empty if there is no data.","properties":{"data":{"type":"array","description":"The data for this page of results","items":{}}}}]},"Error":{"type":"object","title":"Error","description":"A single error generated during an operation","properties":{"id":{"type":"string","description":"A unique identifier for this particular occurrence of the error. Can be used to correlate with logs.","example":"46afeec3-73c8-41fb-b27e-d953056ecd10"},"status":{"type":"number","description":"The HTTP status code applicable to this error.","example":400},"code":{"type":"string","description":"A code that specifies the type of error.","example":"api.validation.outside-range"},"title":{"type":"string","description":"The (translated) human-readable summary of the error.","example":"'limit' must be in the range [1,100]"},"detail":{"type":"string","description":"(Optional) Human-readable explanation specific to this occurrence of the error, and a suggested action to resolve it."},"field":{"type":"string","description":"(Optional) Field identifer for a field-based error. Expressed as a field-path from the root of the object.","example":"objects[1].displayName"}},"required":["id","status","code","title"]},"ErrorResponse":{"type":"object","title":"ErrorResponse","description":"An error response containing one or more errors.","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}},"ARI":{"type":"string","title":"ARI","description":"An Atlassian Resource Identifier (ARI)","example":"ari:cloud:jira:182b9218-d56a-453d-9659-3f29ea2aa7eb:issue/10001"},"RuleScope":{"type":"object","title":"RuleScope","description":"The set of resources or containers the rule is scoped to.","properties":{"resources":{"type":"array","items":{"$ref":"#/components/schemas/ARI"}}},"required":["resources"]},"SearchManualRuleRequest":{"type":"object","title":"SearchManualRuleRequest","description":"Params to use when fetching manual rules. Either \"objects\" or \"cursor\" is required, but not both.","oneOf":[{"type":"object","title":"SearchManualRuleInitialRequest","description":"Params to use when fetching an initial page of manual rules. ","properties":{"objects":{"description":"The object(s) to fetch manual rules for. Must be a supported object type, \nand only one type of object is allowed for a single request.\n\nCurrently only `issue` and `alert` objects are supported.","type":"array","items":{"$ref":"#/components/schemas/ARI"}},"limit":{"type":"number","description":"How many results to return per page of results","minimum":1,"maximum":100,"default":50,"example":50}},"required":["objects"]},{"type":"object","title":"SearchManualRuleWithCursorRequest","description":"Params to use when fetching a subsequent page of manual rules using a pagination cursor.","properties":{"cursor":{"type":"string","description":"The pagination cursor to use to fetch more results","example":"ewogICJhZnRlck9iamVjdElkIjogIjExMTIxMTEiLAogICJvcmRlckJ5IjogIklEIiwKICAicGFnZVNpemUiOiA1Cn0="},"limit":{"type":"number","description":"How many results to return per page of results","minimum":1,"maximum":100,"default":50,"example":50}},"required":["cursor"]}]},"SearchManualRuleResponse":{"type":"object","title":"SearchManualRuleResponse","description":"Result of a manual rule search. Contains 0 or more results.","properties":{"links":{"$ref":"#/components/schemas/PaginationLinks"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ManualTriggerRule"},"minItems":0}},"required":["data","links"]},"ManualTriggerInputType":{"type":"string","title":"ManualTriggerInputType","description":"The type of input prompt","enum":["NUMBER","BOOLEAN","TEXT","DROPDOWN","PARAGRAPH"]},"ManualTriggerInputPrompt":{"type":"object","description":"An input field that can be passed to a manual rule when invoking it.","properties":{"inputType":{"$ref":"#/components/schemas/ManualTriggerInputType","example":"TEXT"},"displayName":{"type":"string","description":"The human-readable name for an input prompt","example":"Assignee"},"required":{"type":"boolean","description":"Indicates if this input is required or not. \n\nManual rule invocation will fail if a required input is missing.","default":false},"variableName":{"type":"string","description":"The name of the smart value variable this input will be \navailable as when the rule executes","example":"issueAssignee"},"defaultValue":{"oneOf":[{"type":"string","description":"A default value to use for TEXT and PARAGRAPH types"},{"type":"number","description":"A default value to use for NUMBER types"},{"type":"boolean","description":"A default value to use for BOOLEAN types"},{"type":"array","description":"Values to use for DROPDOWN inputs","items":{"type":"string"}}],"description":"The default value that will be supplied if none is collected OR the list of valid values for a DROPDOWN input."}},"required":["inputType","displayName","required","variableName"]},"ManualTriggerInput":{"type":"object","title":"ManualTriggerInput","description":"An input supplied to a manual rule during execution","properties":{"inputType":{"description":"The type of input","$ref":"#/components/schemas/ManualTriggerInputType"},"value":{"description":"The value to supply for the input","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"ManualTriggerRule":{"type":"object","title":"ManualTriggerRule","description":"Details of a single manual rule, including what inputs are needed to execute it.","properties":{"id":{"type":"number","description":"The ID of the rule","example":1123},"name":{"type":"string","description":"The human-readable rule name","example":"Create issue for Alert"},"userInputs":{"type":"array","description":"Inputs to pass to the rule when executing","items":{"$ref":"#/components/schemas/ManualTriggerInputPrompt"}}},"required":["id","name"],"example":{"inputA":{"inputType":"TEXT","value":"Hello world!"}}},"InvokeManualRuleRequest":{"type":"object","title":"InvokeManualRuleRequest","description":"Parameters to supply when invoking a manual rule.\n\nAt least one `object` is required. If the rule requires inputs these are also required.\n\nAt present only `issue` and `alert` objects are allowed.","properties":{"objects":{"type":"array","description":"The object(s) to execute the rule against.\n\nOnly `issue` and `alert` objects are allowed, and only one type is allowed per request \n(e.g. all `issue` or all `alert`). All `objects` must come from the same container (e.g. the same `project` in the case of `issue`).","items":{"$ref":"#/components/schemas/ARI"},"minItems":1,"maxItems":50},"userInputs":{"type":"object","description":"Inputs to supply to the rule, if required, keyed by input name.","example":{"inputA":{"inputType":"TEXT","value":"Some value"},"inputB":{"inputType":"NUMBER","value":100}},"additionalProperties":{"$ref":"#/components/schemas/ManualTriggerInput"}}},"required":["objects"]},"ManualRuleCreateExecutionResult":{"type":"string","title":"ManualRuleCreateExecutionResult","description":"The result of an invocation of a manual rule for a single `object`.\n* `SUCCESS` - The invocation was successful and the rule will execute.\n* `INVALID_TARGET_OBJECT` - The invocation failed because the target `object` is not valid for the rule\n* `INVALID_RULE_OR_OBJECT` - The invocation failed because the rule given cannot be invoked with the given `object` OR the rule is in a state that can't be invoked (e.g. `disabled`)\n* `INVALID_LICENSE` - The invocation failed because rule execution limits have been reached\n* `INVALID_TARGET_SCOPE` - The invocation failed because the provided `object` is not in the same scope as the rule\n\n**Note**: A `SUCCESS` result only indicates that the invocation was successful. It does not indicate that the rule executed successfully.","enum":["SUCCESS","INVALID_TARGET_OBJECT","INVALID_RULE_OR_OBJECT","INVALID_LICENSE","INVALID_TARGET_SCOPE"]},"InvokeManualRuleResponse":{"type":"object","title":"InvokeManualRuleResponse","description":"Invocation results, keyed by object ARI, indicating if the invocation was successful or not. \n\nIt is possible for an invocation to fail if, for example, the provided target `object` is not valid\nfor the rule being invoked.","additionalProperties":{"$ref":"#/components/schemas/ManualRuleCreateExecutionResult"},"example":{"ari:cloud:jira:182b9218-d56a-453d-9659-3f29ea2aa7eb:issue/10001":"SUCCESS","ari:cloud:jira:182b9218-d56a-453d-9659-3f29ea2aa7eb:issue/10002":"INVALID_TARGET_OBJECT"}},"Template":{"type":"object","title":"Template","description":"Details of a single template, including what parameters are required to create a rule from the template.","properties":{"id":{"type":"string","example":"software_template_20"},"description":{"type":"string","example":"When a task is near due -> send an email to the Assignee of the task"},"categories":{"type":"array","items":{"$ref":"#/components/schemas/TemplateCategory"},"minItems":1,"example":[{"key":"jira-software.security","displayName":"Security"}]},"parameters":{"type":"array","description":"The list of parameters this template accepts upon rule creation.","items":{"$ref":"#/components/schemas/CreateRuleFromTemplateParameter"}},"displayMetadata":{"type":"object","title":"DisplayMetadata","description":"Metadata necessary for displaying the template in the UI (e.g. icon names).","properties":{"triggerIcons":{"type":"array","description":"The list of trigger icon names.","items":{"type":"string"},"example":["CalendarIcon"]},"actionIcons":{"type":"array","description":"The list of action icon names.","items":{"type":"string"},"example":["SmartValueIcon","IssuesIcon","EmailIcon"]}},"required":["triggerIcons","actionIcons"]}},"required":["id","description","categories","parameters","displayMetadata"]},"TemplateCategory":{"type":"object","title":"TemplateCategory","description":"Details of a single category, including its underlying key and display name","properties":{"key":{"type":"string","description":"The lookup key of the category, as used in the search operation","example":"jira-software.security"},"displayName":{"type":"string","description":"The translated display name of the category, as per the request's Locale."}},"example":{"key":"jira-software.security","displayName":"Security"},"required":["key","displayName"]},"SearchTemplatesRequest":{"type":"object","title":"SearchTemplatesRequest","description":"Perform a search request for templates according to a set of filters.\nCurrently, the list of supported filters is:\n - Category key(s)\n - Home ARI\nAn empty set of filters will return the whole list of templates.\n\nEither a combination of \"categories\" and \"home\" or a cursor are required, but not both.","oneOf":[{"$ref":"#/components/schemas/SearchTemplatesInitialRequest"},{"$ref":"#/components/schemas/SearchTemplatesWithCursorRequest"}]},"SearchTemplatesInitialRequest":{"type":"object","title":"SearchTemplatesInitialRequest","properties":{"categories":{"description":"The list of category keys to filter on","type":"array","items":{"type":"string"},"example":["jira-work-management.managing-project","jira-software.security"],"minItems":0,"maxItems":50},"ruleHome":{"description":"If provided, only templates that apply to the ruleHome (represented by ARI) will be returned.\nUsed to limit results to templates applicable for a given project or product etc.","$ref":"#/components/schemas/ARI"},"limit":{"type":"number","description":"How many entries to return per page of results","minimum":1,"maximum":100,"default":50,"example":50}}},"SearchTemplatesWithCursorRequest":{"type":"object","title":"SearchTemplatesWithCursorRequest","properties":{"cursor":{"type":"string","description":"The pagination cursor used to fetch more entries","example":"ewogICJhZnRlck9iamVjdElkIjogIjExMTIxMTEiLAogICJvcmRlckJ5IjogIklEIiwKICAicGFnZVNpemUiOiA1Cn0"},"limit":{"type":"number","description":"How many entries to return per page of results","minimum":1,"maximum":100,"default":50,"example":50}},"required":["cursor"]},"SearchTemplatesResponse":{"type":"object","title":"SearchTemplatesResponse","description":"Result of a templates search. Contains 0 or more entries.","properties":{"links":{"$ref":"#/components/schemas/PaginationLinks"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Template"},"minItems":0}},"required":["data","links"]},"CreateRuleFromTemplateRequest":{"type":"object","title":"CreateRuleFromTemplateRequest","description":"Params to use when creating a rule from a template.","properties":{"templateId":{"description":"The template ID matching the template the rule will be created from","type":"string","example":"software_template_20"},"ruleHome":{"description":"Specifies the scope to create the rule under.","$ref":"#/components/schemas/ARI"},"parameters":{"description":"The parameters used to set certain values in the rule config when created.\nSome templates require parameters.","type":"object","example":{"emailSubject":{"type":"TEXT","value":"An example email subject"},"emailBody":{"type":"TEXT","value":"An example email body"}},"additionalProperties":{"$ref":"#/components/schemas/CreateRuleFromTemplateParameterValue"}}},"required":["templateId","ruleHome"]},"CreateRuleFromTemplateResponse":{"type":"object","title":"CreateRuleFromTemplateResponse","description":"Result of a rule creation from a template.","properties":{"ruleId":{"description":"The ruleId property, which matches the newly created rule, is deprecated and will be removed soon. Please use the ruleUuid property instead","type":"number","example":1,"deprecated":true},"ruleUuid":{"description":"The uuid matching the newly created rule.","type":"string","example":"0000660c-24e5-710d-bc7b-626fc6bb83ff"}},"required":["ruleId"]},"CreateRuleFromTemplateParameter":{"type":"object","title":"CreateRuleFromTemplateParameter","description":"Specifies a parameter to be supplied when creating a rule from a template.","properties":{"type":{"description":"The type of parameter","$ref":"#/components/schemas/CreateRuleFromTemplateParameterType"},"key":{"description":"A unique key for the parameter","type":"string"},"required":{"description":"Indicates whether the parameter value is required for rule creation","type":"boolean"}},"example":{"type":"TEXT","key":"emailSubject","required":false}},"CreateRuleFromTemplateParameterType":{"type":"string","title":"CreateRuleFromTemplateParameterType","description":"The type of value provided at rule creation","enum":["TEXT","NUMBER","BOOLEAN"]},"CreateRuleFromTemplateParameterValue":{"type":"object","title":"CreateRuleFromTemplateParameterValue","description":"A parameter supplied to a template when creating a rule","properties":{"type":{"description":"The type of parameter","$ref":"#/components/schemas/CreateRuleFromTemplateParameterType"},"value":{"description":"The value to supply for the parameter. Text values must have a maximum length of 5000 characters.","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}}}},"x-atlassian-narrative":{"documents":[{"title":"About","anchor":"about","body":"This is the reference for the Automation REST API. \nThis API is the primary way to get and modify data in Automation across products. \nUse it to interact with Automation entities, like rules."},{"title":"Authentication and authorization","anchor":"auth","body":"**Authentication:** Authentication requires an API token or browser session cookies.\n\n**Authorization:** Authorization is based on the user making the request and the product-level permissions they have that relate to the entities they are interacting with.\n\nSee [Authentication](https://developer.atlassian.com/cloud/automation/security/authentication/) or [Authorization](https://developer.atlassian.com/cloud/automation/security/authorization/) for more details."},{"title":"Status codes","anchor":"status-code","body":"The Automation REST API uses the [standard HTTP status codes](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).\n\nResponses that return an error status code (400 or 5xx) will include a standard error response body, similar to the following:\n```json\n{\n \"errors\": [\n {\n \"id\": \"298f9da7-93e0-40d7-8a2d-e8e158996abc\",\n \"status\": 400,\n \"code\": \"some.error.code\",\n \"title\": \"Some error message\",\n \"field\": \"some[1].field\"\n }\n ]\n}\n```"},{"title":"Pagination","anchor":"pagination","body":"The Automation REST API uses cursor-based pagination: a method that returns a response with multiple objects can only return a limited number at one time. \nThis limits the size of responses and conserves server resources.\n\nUse the 'limit' parameter to specify the desired number of results per page.\n\nIf more results are available after the initial page a `links` section will include an opaque `cursor` that can be used request the next page of results.\n\nCursors are opaque and not intended to be constructed by an API consumer. Consumers must treat them as opaque strings. \nThe format of a cursor may change at any time and is not part of our API contract.\n\nCursors have a TTL after which they will not be valid for use. For most APIs this is 1 hour."},{"title":"Versioning","anchor":"versioning","body":"The Automation REST API path-based versioning.\n\nThe API version is included in the request path e.g. `/rest/v1/rule/manual/search`.\n\nA special version `latest` is an alias to the most recent version of a particular operation e.g. `/rest/latest/rule/manual/search`."}]}}