/
REST API

REST API

Authorization

Basic auth is used for authorization. Therefore you need to create an API token and use it as a username in the following format: tokenLabel@instanceName.atlassian.net. The password is API token itself. You can also use our Postman collection for this and define {{tokenLabel}}, {{instanceName}} and {{apiToken}} as variables:

To get an API token, go to Settings → Apps → STAGIL Assets → API tokens → Create API Token.

Advanced Links

Get Links

Method: GET

API call: https://apps.stagil.com/sajc/rest/saj/1.0/api/assets/issueLink/issue/:issueIdOrKey

Requires ‘Browse project’ permission.

Get Links: multiple links at once

Method: POST

API call: https://apps.stagil.com/sajc/rest/saj/1.0/api/assets/issueLink/issue

// Use an array of issue keys { "issues" : [ "LO-18", "LO-218", "LO-21", "LO-214", "LO-212", "LO-211", "LO-209", "LO-207", "LO-206", "LO-205", "LO-204", "LO-202", "LO-200", "LO-199", "LO-197", "LO-41" ] }

Body can contain max 100 issues per call.

Create Link

Method: Post

API call: https://apps.stagil.com/sajc/rest/saj/1.0/api/assets/issueLink/issue/:issueIdOrKey/customField/:customFieldId

Requires ‘Edit issue’ permission.

Delete Link

Method: Delete

API call: https://apps.stagil.com/sajc/rest/saj/1.0/api/assets/issueLink/customField/:customFieldId/issue/:issueIdOrKey/linkedIssue/:linkedIssueIdOrKey"

Issue Filters

Panel context: GET Projects in field context

Method: Get

Description: returns project IDs from the Issue Filter Panel.

https//apps.stagil.com/sajc/rest/saj/1.0/api/assets/context/customField/:customFieldId/project

Parameter: customFieldId

[ { "contextId": "60", "contextName": "All Projects:All Issue Types", "projectIds": [ "-1" ] } ]

Panel context: add new projects to the context

Method: Post

Description: updates the project list in the field context

Parameter: customFieldId, contextId

Database synchronisation

Trigger SQL database synchronisation

Method: Get

Description: starts database synchronisation.

API call: https://apps.stagil.com/sajc/rest/saj/1.0/api/assets/synchronizer/{id}/run

{id} - database synchroniser ID

SQL database synchronisation status

Method: Get

Description: shows database synchronisation status.

API call: https://apps.stagil.com/sajc/rest/saj/1.0/api/assets/synchronizer/{id}/status

Stop SQL database synchronisation

Method: Get

Description: stops database synchronisation status.

API call: https://apps.stagil.com/sajc//rest/saj/1.0/api/assets/synchronizer/{id}/stop

Parameters

Advanced Links

instanceName: Your Jira Cloud instance name (part of URL before the \".atlassian.net\" and after the \"https://\")

customFieldId: Id of the relation custom field.

issueIdOrKey: Id or key of the issue, where a relations table is present.

linkedIssueIdOrKey: Id or key of the linked issue.

Issue Filters

customFieldID

contextID

 

Postman Collection

Use apps.stagil.com as a base URL for your calls.

Related content

JQL Search and JQL Variables
JQL Search and JQL Variables
Read with this
REST API
More like this
Jira Automation, Scripting and REST API
Jira Automation, Scripting and REST API
More like this
Advanced Links
Read with this
Create and configure Advanced Links
Create and configure Advanced Links
More like this

© 2023, STAGIL