REST API
- 1 Authorization
- 2 Advanced Links
- 2.1 Get Links
- 2.2 Get Links: multiple links at once
- 2.2.1 Version 1.0
- 2.2.2 Version 2.0
- 2.3 Get Advanced Links configuration info
- 2.4 Create Link
- 2.5 Delete Link
- 3 Issue Filters
- 4 Database synchronisation
- 5 Parameters
- 5.1 Advanced Links
- 5.2 Issue Filters
- 6 Postman Collection
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
Version 1.0
Method: POST
Description: returns names of the Advanced Links fields and linked issue keys.
API call: https://apps.stagil.com/sajc/rest/saj/1.0/api/assets/issueLink/issue
Version 2.0
Method: POST
Description: returns the IDs and names of Advanced Links fields, along with the IDs and keys of the linked issues. This is more structured and detailed format, suitable for programmatic parsing.
API call: https://apps.stagil.com/sajc/rest/saj/2.0/api/assets/issueLink/issue
Body can contain max 100 issues per call.
Get Advanced Links configuration info
Method: GET
API call: https://apps.stagil.com/sajc/rest/saj/1.0/api/assets/relations?expandFieldContexts=true
Description: returns name of the Advanced Link, labels for outward/inward link direction, context configuration (project and issue types selected) along with their IDs.
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/projectParameter: customFieldId
Panel context: add new projects to the context
Method: Post
Description: updates the project list in the field context
https://apps.stagil.com/sajc/rest/saj/1.0/api/assets/context/:contextId/customField/:customFieldId/projectParameter: 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
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.