Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
stylenone

...

3.4 API details for mapping between Jira field options and Service now field options

Sr. No.API DescriptionRequest parametersEndpoint detailsResponse formatStatusRemark
1List api to get the now fields(Add service now field type to this api) NA



2List api to get the options for each service now field of the type dropdown

fieldId - service now field id





3List api to get list of all the mappings between Jira field options and service now field options

projectKey - key of the project

issueType - issue type related to the project

jiraFieldId - id of the Jira field

serviceNowFieldId - id of the service now field





4Create api to add mapping between the Jira field option and Service Now field option

projectKey - key of the project

issueType - issue type related to the project

jiraFieldId - id of the Jira field

serviceNowFieldId - id of the service now field

jiraOptionId - id of the Jira option pertaining to Jira field

serviceNowOptionId - Id of the service now option pertaining to service now field





5Delete api endpoint to delete data for the mapping between Jira field option and Service Now field option

projectKey - key of the project

issueType - issue type related to the project

jiraFieldId - id of the Jira field

serviceNowFieldId - id of the service now field

jiraOptionId - id of the Jira option pertaining to Jira field

serviceNowOptionId - Id of the service now option pertaining to service now field





6Get transition API Issue Keyhttp://empyratestqa.eastus.cloudapp.azure.com/rest/api/2/issue/COSD-4/transitions

It gives all possible transaction for the issues  
7Post  transition API


Code Block
{
    "update": {
        "comment": [
            {
                "add": {
                    "body": "Comment added when resolving issue"
                }
            }
        ]
    },
    "transition": {
        "id": "2"
    }
}


http://empyratestqa.eastus.cloudapp.azure.com/rest/api/2/issue/COSD-4/transitions

It updates transaction.

Reference to update other fields with transition 

https://docs.atlassian.com/software/jira/docs/api/REST/8.5.4/#api/2/issue-doTransition 

8Post attachments 


Code Block
 Header: 
Authorization: Basic c3Zpc2h3YWthcm1hOnN2aXNod2FrYXJtYQ==
X-Atlassian-Token: no-check
Content-Type: multipart/form-data; 

form-data:

name="file"; filename="Assig.PNG"
Content-Type: image/png




http://empyratestqa.eastus.cloudapp.azure.com/rest/api/2/issue/COSD-4/attachments

It creates an attachment for the issue.