Jira Service Management integration
This integration uses Basic auth for the REST APIs authentication method, for details about this refer to:
Basic auth for REST APIs: https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/
Manage API tokens for your Atlassian account: https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/
The Jira Cloud platform REST API: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-group-issues
Reference documentation: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-post
Example:
Method: POST
Authorization: Basic Auth (Username and Password required. API token to be set as the password).
Body:
{"fields": { "summary": "Test Incident 6", "issuetype": { "id": "10001" }, "project": { "key": "DS2" }, "description":"Rule name failed on device X" } }
Response:
{ "id": "10031", "key": "DS2-7", "self": "https://1edev1.atlassian.net/rest/api/2/issue/10031" }
Reference documentation: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-transitions-post
Example:
Method: POST
URL: https://1edev1.atlassian.net/rest/api/2/issue/DS2-5/transitions
Authorization: Basic Auth (Username and Password required. API token to be set as the password).
Body:
Transitions id is the status of the issue. Different transitions id can be found through Get transitions API.
{ "update": { "comment": [ { "add": { "body": "It is time to finish this task" } } ] }, "transition":{ "id":"111" } }
Response: API returns a 201 status which is No-Content on success.
Refence documentation: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-get
Example:
Method: POST.
Authorization: Basic Auth (Username and Password required. API token to be set as the password).
No content in set in body.
Response:
{ "expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations", "id": "10026", "self": "https://1edev1.atlassian.net/rest/api/2/issue/10026", "key": "DS2-2", "fields": { "status": { "self": "https://1edev1.atlassian.net/rest/api/2/status/1", "description": "The issue is open and ready for the assignee to start work on it.", "iconUrl": "https://1edev1.atlassian.net/images/icons/statuses/open.png", "name": "Open", "id": "1", "statusCategory": { "self": "https://1edev1.atlassian.net/rest/api/2/statuscategory/2", "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } } } }
This version of integration uses Basic auth for REST APIs authentication method.
Basic auth for REST APIs: https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/
Manage API tokens for your Atlassian account: https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/