...
Info |
---|
The target and the source issue should not be the same. In this case, you will see the corresponding message in the audit log of the automation: |
Examples of the web request bodies for Jira automation for sending files to Asset
...
Send an attachment(s) of the source issue to the specific object (another instance)Send an attachment
Code Block { "aql": "Key = OBJ-1", "sourceKey": "{{issue.key}}" }
Send attachments of the last comment of the source issue to several specific objects (another instance)
When the object keys are initially known:
Code Block { "aql": "Key IN (OBJ-1, OBJ-2, OBJ-3)", "sourceKey": "{{issue.key}}", "commentId": "{{issue.comment.last.id}}" }
When the object keys are recorded in Jira issue of the source instance:
customfield_idCode Block { "aql": "Key IN ({{issue.
AssetField.key}})", "sourceKey": "{{issue.key}}", "commentId": "{{issue.comment.last.id}}" }
Send an attachment to a specific object (same or another instance) when the object name is known:
Code Block |
---|
{ "aql": "name = \"Object Name\"", "sourceKey": "{{issue.key}}" } |
Send an attachment to specific object (same or another instance) when object label is known:
asd
Code Block |
---|
{
"aql": "label = \"Object Label\"",
"sourceKey": "{{issue.key}}"
} |
Send an attachment to an object (same or another instance) of the same name that is selected in a the Assets field (A10) of on the source instance:
Code Block |
---|
{ "aql": "name in (\"{{issue.a10.name}}\"", "sourceKey": "{{issue.key}}" } |
Send an attachment to an object (same or another instance) of the same label that is selected in a an Assets field (A10) of on the source instance:
Code Block |
---|
{ "aql": "label in (\"{{issue.a10.label}}\"", "sourceKey": "{{issue.key}}" } |
Send an attachment(s) of the last issue comment to objects of known schema ID (431) and Object Type ID (5850), when the object is selected in a field on a source instance (A10). Attachemnt(s) will be sent to the objects with the same name as selected in the Assets field (A10):
Code Block |
---|
{ |
...
"aql": "objectSchemaId=431 and ObjectTypeId=5850 and label in (\"{{issue.a10.name}}\")", |
...
"sourceKey": "{{issue.key}}", |
...
"commentId": "{{issue.comment.last.id}}" |
...
} |
External application
Make a POST request with the generated URL endpoint. To authenticate your API requests, include an Authorization header in each request. The value of this header should be the API token generated from the API Tokens page. The sample request structure:
...