Issue operations in the Jira adapter
This topic provides input and output elements, and sample XML requests and responses for the operations in the Issue folder.
When you use a context item as an input for an adapter request, you must enclose the adapter request in the <request-data> elements. However, when you create a static request, <request-data> is not required and the adapter request starts with the <jira-adapter-request> element.
Get Meta Details for Creating an Issue
Retrieves metadata for creating a new issue in Jira.
The following table describes the input elements for the adapter wrapper process.
Input element | Description | Required |
|---|---|---|
adapter name | Specifies the name of the adapter as configured on the grid. Default value: Jira Adapter | No |
JSESSIONID | Specifies the Jira session ID that you obtained after running the Login request. | Yes |
query params | Specifies the query parameters based on which you want to retrieve the details. | Yes |
return data format | Specifies the data type for the adapter response | No |
If using the Call Adapter activity in the Development Studio, the following table describes the input elements for the adapter request.
Input element | Description |
|---|---|
<operation-name> | Specifies the name of the operation. Valid value: get-create-issue-meta |
<headers> | Specifies the header details for the adapter request, in a JSON format. Contains the URL, return-data-format, and other JSON headers. |
<cookie> | Specifies the JSESSIONID cookie obtained during the Login operation. |
<query-params> | Specifies the query parameters based on which you want to retrieve the details. If you do not specify any query parameters, all data is returned. |
<return-data-format> | Specifies the data type for the adapter response |
The following figure shows a sample XML request for the operation.
<headers><![CDATA[{
"query-params":"projectKeys%3DKey%26issuetypeNames%3DStory",
"return-data-format":"XML",
"headers":{
"Content-Type":"application/json",
"Cookie":"JSESSIONID=89749995BCFD60E149010B9E6C2229AF"
}
}]]></headers>
<operation-name><![CDATA[get-create-issue-meta]]></operation-name>
</jira-adapter-request>
The following figure shows the adapter response for the request.
<metadata>
<status>success</status>
</metadata>
<status-line>
<code>200</code>
<reason>200</reason>
</status-line>
<header-lines>
<Date>Sun, 01 Sep 2019 23:26:11 GMT</Date>
<Server>Apache/2.4.29 (Red Hat)</Server>
<X-AREQUESTID>1106x13431x1</X-AREQUESTID>
<X-ASESSIONID>1v87su1</X-ASESSIONID>
<X-ANODEID>phx-jiraqa-01</X-ANODEID>
<X-XSS-Protection>1; mode=block</X-XSS-Protection>
<X-Content-Type-Options>nosniff</X-Content-Type-Options>
<X-Frame-Options>SAMEORIGIN</X-Frame-Options>
<Content-Security-Policy>frame-ancestors 'self'</Content-Security-Policy>
<X-ASEN>SEN-L13798850</X-ASEN>
<X-Seraph-LoginReason>OK</X-Seraph-LoginReason>
<Set-Cookie>atlassian.xsrf.token=BXV8-9FAB-2I0V-4AN7_45e9841a90d14e1503445f989552dc8bffe902df_lin; Path=/</Set-Cookie>
<X-AUSERNAME>jiradev1</X-AUSERNAME>
<Cache-Control>no-cache, no-store, no-transform</Cache-Control>
<Vary>User-Agent</Vary>
<Content-Type>application/json;charset=UTF-8</Content-Type>
<Connection>close</Connection>
<Transfer-Encoding>chunked</Transfer-Encoding>
</header-lines>
<message-body>
<non-xml-data-response>{"expand":"projects","projects":[{"self":"http://jiraapi.com/rest/api/2/project/17400","id":"17400","key":"Key","name":"TSO JIRA Adaptor","avatarUrls":{"48x48":"http://jiraapi.com/secure/projectavatar?avatarId=16503","24x24":"http://jiraapi.com/secure/projectavatar?size=small&avatarId=16503","16x16":"http://jiraapi.com/secure/projectavatar?size=xsmall&avatarId=16503","32x32":"http://jiraapi.com/secure/projectavatar?size=medium&avatarId=16503"},"issuetypes":[{"self":"http://jiraapi.com/rest/api/2/issuetype/7","id":"7","description":"Created by Jira Software - do not edit or delete. Issue type for a user story.","iconUrl":"http://jiraapi.com/secure/viewavatar?size=xsmall&avatarId=10615&avatarType=issuetype","name":"Story","subtask":false}]}]}</non-xml-data-response>
</message-body>
</jira-adapter-response>
The following table describes the output elements for the adapter request.
Output element | Description |
|---|---|
status | Shows the status of the operation. Valid values: success, failure |
status code | Shows the status code of adapter response. Valid values: 200 (if the request is successful) |
error message | Shows the error message, in case the operation fails. |
response headers | Contains the adapter response for the operation. <header-lines> <Date>Wed, 16 Oct 2019 07:16:22 GMT</Date> <Server>Apache/2.4.29 (Red Hat)</Server> <X-AREQUESTID>136x954x1</X-AREQUESTID> <X-ASESSIONID>1qk1kkj</X-ASESSIONID> <X-ANODEID>phx-jiraqa-01</X-ANODEID> <X-XSS-Protection>1; mode=block</X-XSS-Protection> <X-Content-Type-Options>nosniff</X-Content-Type-Options> <X-Frame-Options>SAMEORIGIN</X-Frame-Options> <Content-Security-Policy>frame-ancestors 'self'</Content-Security-Policy> <X-ASEN>SEN-L13798850</X-ASEN> <X-Seraph-LoginReason>OK</X-Seraph-LoginReason> <Set-Cookie>atlassian.xsrf.token=BXV8-9FAB-2I0V-4AN7_6c7e4afc8475c896137f8e85ecdfad3adfacac20_lin; Path=/</Set-Cookie> <X-AUSERNAME>jiradev1</X-AUSERNAME> <Cache-Control>no-cache, no-store, no-transform</Cache-Control> <Vary>User-Agent</Vary> <Content-Type>application/json;charset=UTF-8</Content-Type> <Connection>close</Connection> <Transfer-Encoding>chunked</Transfer-Encoding> <X-RBT-SCAR>172.29.65.114:863845136:1000</X-RBT-SCAR> </header-lines> |
response body | Contains the body in the adapter response. <XML> <json> <expand>projects</expand> <projects> <issuetypes> <name>Story</name> <self>http://jiraapi.com/rest/api/2/issuetype/7</self> <description>Created by Jira Software - do not edit or delete. Issue type for a user story.</description> <id>7</id> <iconUrl>http://jiraapi.com/secure/viewavatar?size=xsmall&avatarId=10615&avatarType=issuetype</iconUrl> <subtask>false</subtask> </issuetypes> <avatarUrls> <_8x48>http://jiraapi.com/secure/projectavatar?avatarId=16503</_8x48> <_4x24>http://jiraapi.com/secure/projectavatar?size=small&avatarId=16503</_4x24> <_6x16>http://jiraapi.com/secure/projectavatar?size=xsmall&avatarId=16503</_6x16> <_2x32>http://jiraapi.com/secure/projectavatar?size=medium&avatarId=16503</_2x32> </avatarUrls> <name>TSO JIRA Adaptor</name> <self>http://jiraapi.com/rest/api/2/project/17400</self> <id>17400</id> <key>key</key> </projects> </json> </XML> |
Create Issue
Creates an issue in Jira.
The following table describes the input elements for the adapter wrapper process.
Input element | Description | Required |
|---|---|---|
adapter name | Specifies the name of the adapter as configured on the grid. Default value: Jira Adapter | No |
url | Specifies the URL for the JIRA server. | No |
JSESSIONID | Specifies the Jira session ID that you obtained after running the Login request. | Yes |
input data | Specifies the input data, in a JSON format, to create a new issue. { "fields":{ "project":{ "id":"17400" }, "summary":"Story 1", "issuetype":{ "id":"7" }, "description":"Description for the story", "assignee":{ "name":"jiradev1" } } } | Yes |
If using the Call Adapter activity in the Development Studio, the following table describes the input elements for the adapter request.
Input element | Description |
|---|---|
<operation-name> | Specifies the name of the operation. Valid value: create-issue |
<headers> | Specifies the header details for the adapter request, in a JSON format. Contains the URL, return-data-format, and other JSON headers. |
<cookie> | Specifies the JSESSIONID cookie obtained during the Login operation. |
<return-data-format> | Specifies the data type for the adapter response |
<body> | Specifies the details to be sent in the request body for creating a new issue in Jira. Example: { "fields":{ "project":{ "id":"17400" }, "summary":"Story 1", "issuetype":{ "id":"7" }, "description":"Description for the story", "assignee":{ "name":"jiradev1" } } } |
The following figure shows a sample XML request for the operation.
<operation-name>create-issue</operation-name>
<headers>{
"return-data-format":"XML",
"headers"
: {
"Content-Type":
"application/json",
"Cookie":
"JSESSIONID=798BF317B268C51E86B857A7D9B08F05"
}
}</headers>
<body>{
"fields":{
"project":{
"id":"17400"
},
"summary":"Story 1",
"issuetype":{
"id":"7"
},
"description":"description for Story",
"assignee":{
"name":"Allen"
}
}
}</body>
</jira-adapter-request>
The following figure shows the adapter response for the request.
<metadata>
<status>success</status>
</metadata>
<status-line>
<code>201</code>
<reason>201</reason>
</status-line>
<header-lines>
<Date>Thu, 08 Aug 2019 17:03:41 GMT</Date>
<Server>Apache/2.4.29 (Red Hat)</Server>
<X-AREQUESTID>723x5019x1</X-AREQUESTID>
<X-ASESSIONID>rkvwgl</X-ASESSIONID>
<X-ANODEID>phx-jiraqa-01</X-ANODEID>
<X-XSS-Protection>1; mode=block</X-XSS-Protection>
<X-Content-Type-Options>nosniff</X-Content-Type-Options>
<X-Frame-Options>SAMEORIGIN</X-Frame-Options>
<Content-Security-Policy>frame-ancestors 'self'</Content-Security-Policy>
<X-ASEN>SEN-L13798850</X-ASEN>
<X-Seraph-LoginReason>OK</X-Seraph-LoginReason>
<Set-Cookie>atlassian.xsrf.token=BXV8-9FAB-2I0V-4AN7_03b1866ab291712692134d954673abccda774a76_lin; Path=/</Set-Cookie>
<X-AUSERNAME>ashising</X-AUSERNAME>
<Cache-Control>no-cache, no-store, no-transform</Cache-Control>
<Vary>User-Agent</Vary>
<Content-Type>application/json;charset=UTF-8</Content-Type>
<Connection>close</Connection>
<Transfer-Encoding>chunked</Transfer-Encoding>
</header-lines>
<message-body>
<id>1171136</id>
<key>Key-37</key>
<self>http://jiraapi.com/rest/api/2/issue/1171136</self>
</message-body>
</jira-adapter-response>
The following table describes the output elements for the adapter request.
Output element | Description |
|---|---|
status | Shows the status of the operation. Valid values: success, failure |
status code | Shows the status code of adapter response. Valid values: 201 (if the request is successful) |
error message | Shows the error message, in case the operation fails. |
response headers | Contains the adapter response for the operation. <header-lines> <Date>Wed, 16 Oct 2019 07:27:55 GMT</Date> <Server>Apache/2.4.29 (Red Hat)</Server> <X-AREQUESTID>147x956x1</X-AREQUESTID> <X-ASESSIONID>wgfrnt</X-ASESSIONID> <X-ANODEID>phx-jiraqa-01</X-ANODEID> <X-XSS-Protection>1; mode=block</X-XSS-Protection> <X-Content-Type-Options>nosniff</X-Content-Type-Options> <X-Frame-Options>SAMEORIGIN</X-Frame-Options> <Content-Security-Policy>frame-ancestors 'self'</Content-Security-Policy> <X-ASEN>SEN-L13798850</X-ASEN> <X-Seraph-LoginReason>OK</X-Seraph-LoginReason> <Set-Cookie>atlassian.xsrf.token=BXV8-9FAB-2I0V-4AN7_82b848eb4c7c326d42380b95ae5f3ac295afa655_lin; Path=/</Set-Cookie> <X-AUSERNAME>jiradev1</X-AUSERNAME> <Cache-Control>no-cache, no-store, no-transform</Cache-Control> <Vary>User-Agent</Vary> <Content-Type>application/json;charset=UTF-8</Content-Type> <Connection>close</Connection> <Transfer-Encoding>chunked</Transfer-Encoding> <X-RBT-SCAR>172.29.65.114:863876622:1000</X-RBT-SCAR> </header-lines> |
response body | Contains the body in the adapter response. <message-body> <id>1172335</id> <key>key-756</key> <self>http://jiraapi.com/rest/api/2/issue/1172335</self> </message-body> |
Create Issues
Creates multiple issues in Jira.
The following table describes the input elements for the adapter wrapper process.
Input element | Description | Required |
|---|---|---|
adapter name | Specifies the name of the adapter as configured on the grid. Default value: Jira Adapter | No |
url | Specifies the URL for the JIRA server. | No |
JSESSIONID | Specifies the Jira session ID that you obtained after running the Login request. | Yes |
input data | Specifies the input data, in a JSON format, to create a new issue. | Yes |
If using the Call Adapter activity in the Development Studio, the following table describes the input elements for the adapter request.
Input element | Description |
|---|---|
<operation-name> | Specifies the name of the operation. Valid value: create-issues |
<headers> | Specifies the header details for the adapter request, in a JSON format. Contains the URL, return-data-format, and other JSON headers. |
<cookie> | Specifies the JSESSIONID cookie obtained during the Login operation. |
<return-data-format> | Specifies the data type for the adapter response |
<body> | Specifies the details to be sent in the request body for creating a new issue in Jira. Example: { "issueUpdates": [ { "fields": { "project": { "id": "17400" }, "summary": "Story 1 for bulk", "issuetype": { "id": "7" }, "description": "description for Story", "assignee": { "name": "jiradev1" } } }, { "fields": { "project": { "id": "17400" }, "summary": "Story 2 for bulk", "issuetype": { "id": "7" }, "description": "description for Story2", "assignee": { "name": "jiradev1" } } } ] } |
The following figure shows a sample XML request for the operation.
<operation-name>create-issue</operation-name>
<headers>{
"return-data-format":"XML",
"headers"
: {
"Content-Type":
"application/json",
"Cookie":
"JSESSIONID=798BF317B268C51E86B857A7D9B08F05"
}
}</headers>
<body>{
"issueUpdates":[
{
"fields":{
"project":{
"id":"17400"
},
"summary":"Story 1 for bulk",
"issuetype":{
"id":"7"
},
"description":"description for Story",
"assignee":{
"name":"jiradev1"
}
}
},
{
"fields":{
"project":{
"id":"17400"
},
"summary":"Story 2 for bulk",
"issuetype":{
"id":"7"
},
"description":"description for Story2",
"assignee":{
"name":"jiradev1"
}
}
}
]
}</body>
</jira-adapter-request>
The following figure shows the adapter response for the request.
<metadata>
<status>success</status>
</metadata>
<status-line>
<code>201</code>
<reason>201</reason>
</status-line>
<header-lines>
<Date>Thu, 08 Aug 2019 17:03:41 GMT</Date>
<Server>Apache/2.4.29 (Red Hat)</Server>
<X-AREQUESTID>723x5019x1</X-AREQUESTID>
<X-ASESSIONID>rkvwgl</X-ASESSIONID>
<X-ANODEID>phx-jiraqa-01</X-ANODEID>
<X-XSS-Protection>1; mode=block</X-XSS-Protection>
<X-Content-Type-Options>nosniff</X-Content-Type-Options>
<X-Frame-Options>SAMEORIGIN</X-Frame-Options>
<Content-Security-Policy>frame-ancestors 'self'</Content-Security-Policy>
<X-ASEN>SEN-L13798850</X-ASEN>
<X-Seraph-LoginReason>OK</X-Seraph-LoginReason>
<Set-Cookie>atlassian.xsrf.token=BXV8-9FAB-2I0V-4AN7_03b1866ab291712692134d954673abccda774a76_lin; Path=/</Set-Cookie>
<X-AUSERNAME>ashising</X-AUSERNAME>
<Cache-Control>no-cache, no-store, no-transform</Cache-Control>
<Vary>User-Agent</Vary>
<Content-Type>application/json;charset=UTF-8</Content-Type>
<Connection>close</Connection>
<Transfer-Encoding>chunked</Transfer-Encoding>
</header-lines>
<message-body>
<id>1171136</id>
<key>Key-37</key>
<self>http://jiraapi.com/rest/api/2/issue/1171136</self>
</message-body>
</jira-adapter-response>
The following table describes the output elements for the adapter request.
Output element | Description |
|---|---|
status | Shows the status of the operation. Valid values: success, failure |
status code | Shows the status code of adapter response. Valid values: 201 (if the request is successful) |
error message | Shows the error message, in case the operation fails. |
response headers | Contains the adapter response for the operation. <header-lines> <Date>Wed, 16 Oct 2019 07:30:46 GMT</Date> <Server>Apache/2.4.29 (Red Hat)</Server> <X-AREQUESTID>150x960x1</X-AREQUESTID> <X-ASESSIONID>r0wtfp</X-ASESSIONID> <X-ANODEID>phx-jiraqa-01</X-ANODEID> <X-XSS-Protection>1; mode=block</X-XSS-Protection> <X-Content-Type-Options>nosniff</X-Content-Type-Options> <X-Frame-Options>SAMEORIGIN</X-Frame-Options> <Content-Security-Policy>frame-ancestors 'self'</Content-Security-Policy> <X-ASEN>SEN-L13798850</X-ASEN> <X-Seraph-LoginReason>OK</X-Seraph-LoginReason> <Set-Cookie>atlassian.xsrf.token=BXV8-9FAB-2I0V-4AN7_13aec00b42d6a36b0800d2e07446330c7d8138cf_lin; Path=/</Set-Cookie> <X-AUSERNAME>jiradev1</X-AUSERNAME> <Cache-Control>no-cache, no-store, no-transform</Cache-Control> <Vary>User-Agent</Vary> <Content-Type>application/json;charset=UTF-8</Content-Type> <Connection>close</Connection> <Transfer-Encoding>chunked</Transfer-Encoding> <X-RBT-SCAR>172.29.65.114:863884688:1000</X-RBT-SCAR> </header-lines> |
response body | Contains the body in the adapter response. <message-body> <errors /> <issues> <e> <id>1172338</id> <key>key-759</key> <self>http://jiraapi.com/rest/api/2/issue/1172338</self> </e> <e> <id>1172339</id> <key>key-760</key> <self>http://jiraapi.com/rest/api/2/issue/1172339</self> </e> </issues> </message-body> |
Get Issue
Retrieves details for an issue from Jira.
The following table describes the input elements for the adapter wrapper process.
Input element | Description | Required |
|---|---|---|
adapter name | Specifies the name of the adapter as configured on the grid. Default value: Jira Adapter | No |
url | Specifies the URL for the JIRA server. | No |
JSESSIONID | Specifies the Jira session ID that you obtained after running the Login request. | Yes |
issue key | Specifies the issue key for which you want to retrieve details. | Yes |
query params | Contains the additional query parameters based on which you can retrieve issue details. Example: fields=summary,status&properties=tasks,tests&expand=changelog Here, fields specifies the fields available in Jira to filter and search for an issue. properties specifies the additional properties of an issue. expand specifies any hidden fields to include in the adapter response. These fields may be hidden by default. | No |
return data format | Specifies the data type for the adapter response | No |
If using the Call Adapter activity in the Development Studio, the following table describes the input elements for the adapter request.
Input element | Description |
|---|---|
<operation-name> | Specifies the name of the operation. Valid value: get-issue |
<headers> | Specifies the header details for the adapter request, in a JSON format. Contains the URL, return-data-format, and other JSON headers. |
<cookie> | Specifies the JSESSIONID cookie obtained during the Login operation. |
<path-params> | Specifies the issue key or issue ID. Example: Key-11. |
<query-params> | Contains the additional query parameters based on which you can retrieve issue details. fields=summary,status&properties=tasks,tests&expand=changelog |
The following figure shows a sample XML request for the operation.
<headers>
<![CDATA[{ "path-params":"IssueKey-1",
"query-params":"fields=summary,status&properties=tasks,tests&expand=changelog",
"headers" :
{ "Content-Type": "application/json", "Cookie": "JSESSIONID=091BBE1CA1E06DA684383AA06378EEC8"} }]]>
</headers>
<operation-name><![CDATA[get-issue]]></operation-name>
</jira-adapter-request>
The following figure shows the adapter response for the request.
"metadata":{
"status":"success"
},
"status-line":{
"code":"200",
"reason":"200"
},
"header-lines":{
"Date":"Tue, 10 Sep 2019 07:21:21 GMT",
"Server":"Apache/2.4.29 (Red Hat)",
"X-AREQUESTID":"141x17549x1",
"X-ASESSIONID":"168j79d",
"X-ANODEID":"phx-jiraqa-01",
"X-XSS-Protection":"1; mode=block",
"X-Content-Type-Options":"nosniff",
"X-Frame-Options":"SAMEORIGIN",
"Content-Security-Policy":"frame-ancestors 'self'",
"X-ASEN":"SEN-L13798850",
"X-Seraph-LoginReason":"OK",
"Set-Cookie":"atlassian.xsrf.token=BXV8-9FAB-2I0V-4AN7_2487790f768b81baeff4063592d0494fc66348dd_lin; Path=/",
"X-AUSERNAME":"jiradev1",
"Cache-Control":"no-cache, no-store, no-transform",
"Vary":"User-Agent",
"Content-Type":"application/json;charset=UTF-8",
"Connection":"close",
"Transfer-Encoding":"chunked"
},
"message-body":{
"expand":"renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
"id":"1171341",
"self":"http://jiraapi.com/rest/api/2/issue/1171341",
"key":"Key-142",
"fields":{
"summary":"story111111",
"status":{
"self":"http://jiraapi.com/rest/api/2/status/1",
"description":"The issue is open and ready for the assignee to start work on it.",
"iconUrl":"http://jiraapi.com/images/icons/statuses/open.png",
"name":"Open",
"id":"1",
"statusCategory":{
"self":"http://jiraapi.com/rest/api/2/statuscategory/2",
"id":2,
"key":"new",
"colorName":"blue-gray",
"name":"To Do"
}
}
},
"properties":{
"tests":{
"content":"Test if works on Jira Server",
"completed":1
},
"tasks":{
"content":"Test if works on Jira Server",
"completed":1
}
},
"changelog":{
"startAt":0,
"maxResults":0,
"total":0,
"histories":[ ]
}
}
}</jira-adapter-response>
The following table describes the output elements for the adapter request.
Output element | Description |
|---|---|
status | Shows the status of the operation. Valid values: success, failure |
status code | Shows the status code of the adapter response. Valid values: 200 (if the request is successful) |
error message | Shows the error message, in case the operation fails. |
response headers | Contains the adapter response for the operation. <header-lines> <Date>Wed, 16 Oct 2019 07:41:06 GMT</Date> <Server>Apache/2.4.29 (Red Hat)</Server> <X-AREQUESTID>161x970x1</X-AREQUESTID> <X-ASESSIONID>2xdj1r</X-ASESSIONID> <X-ANODEID>phx-jiraqa-01</X-ANODEID> <X-XSS-Protection>1; mode=block</X-XSS-Protection> <X-Content-Type-Options>nosniff</X-Content-Type-Options> <X-Frame-Options>SAMEORIGIN</X-Frame-Options> <Content-Security-Policy>frame-ancestors 'self'</Content-Security-Policy> <X-ASEN>SEN-L13798850</X-ASEN> <X-Seraph-LoginReason>OK</X-Seraph-LoginReason> <Set-Cookie>atlassian.xsrf.token=BXV8-9FAB-2I0V-4AN7_98315e93b12877829beeed12fc64101ecee4f508_lin; Path=/</Set-Cookie> <X-AUSERNAME>jiradev1</X-AUSERNAME> <Cache-Control>no-cache, no-store, no-transform</Cache-Control> <Vary>User-Agent</Vary> <Content-Type>application/json;charset=UTF-8</Content-Type> <Connection>close</Connection> <Transfer-Encoding>chunked</Transfer-Encoding> <X-RBT-SCAR>172.29.65.114:863913779:1000</X-RBT-SCAR> </header-lines> |
response body | Contains the body in the adapter response. <XML> <json> <expand>renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations</expand> <self>http://jiraapi.com/rest/api/2/issue/1171341</self> <changelog> <total>5</total> <maxResults>5</maxResults> <histories> <author> <emailAddress /> <avatarUrls> <_8x48>http://jiraapi.com/secure/useravatar?avatarId=16513</_8x48> <_4x24>http://jiraapi.com/secure/useravatar?size=small&avatarId=16513</_4x24> <_6x16>http://jiraapi.com/secure/useravatar?size=xsmall&avatarId=16513</_6x16> <_2x32>http://jiraapi.com/secure/useravatar?size=medium&avatarId=16513</_2x32> </avatarUrls> <displayName>Jira-dev1</displayName> <name>jiradev1</name> <self>http://jiraapi.com/rest/api/2/user?username=jiradev1</self> <active>true</active> <timeZone>America/Chicago</timeZone> <key>jiradev1</key> </author> <created>2019-10-11T03:45:55.057-0500</created> <id>8650900</id> <items> <field>Comment</field> <from>A comment with security level 'Administrators' was removed.</from> <toString>null</toString> <fromString>null</fromString> <to>null</to> <fieldtype>jira</fieldtype> </items> </histories> <histories> <author> <emailAddress /> <avatarUrls> <_8x48>http://jiraapi.com/secure/useravatar?avatarId=16513</_8x48> <_4x24>http://jiraapi.com/secure/useravatar?size=small&avatarId=16513</_4x24> <_6x16>http://jiraapi.com/secure/useravatar?size=xsmall&avatarId=16513</_6x16> <_2x32>http://jiraapi.com/secure/useravatar?size=medium&avatarId=16513</_2x32> </avatarUrls> <displayName>Jira-dev1</displayName> <name>jiradev1</name> <self>http://jiraapi.com/rest/api/2/user?username=jiradev1</self> <active>true</active> <timeZone>America/Chicago</timeZone> <key>jiradev1</key> </author> <created>2019-10-11T14:44:59.130-0500</created> <id>8650901</id> <items> <field>summary</field> <from>null</from> <toString>Bug in business logic</toString> <fromString>story111111</fromString> <to>null</to> <fieldtype>jira</fieldtype> </items> </histories> <histories> <author> <emailAddress /> <avatarUrls> <_8x48>http://jiraapi.com/secure/useravatar?avatarId=16513</_8x48> <_4x24>http://jiraapi.com/secure/useravatar?size=small&avatarId=16513</_4x24> <_6x16>http://jiraapi.com/secure/useravatar?size=xsmall&avatarId=16513</_6x16> <_2x32>http://jiraapi.com/secure/useravatar?size=medium&avatarId=16513</_2x32> </avatarUrls> <displayName>Jira-dev1</displayName> <name>jiradev1</name> <self>http://jiraapi.com/rest/api/2/user?username=jiradev1</self> <active>true</active> <timeZone>America/Chicago</timeZone> <key>jiradev1</key> </author> <created>2019-10-14T05:08:23.110-0500</created> <id>8650902</id> <items> <field>Comment</field> <from>A comment with security level 'Administrators' was removed.</from> <toString>null</toString> <fromString>null</fromString> <to>null</to> <fieldtype>jira</fieldtype> </items> </histories> <histories> <author> <emailAddress /> <avatarUrls> <_8x48>http://jiraapi.com/secure/useravatar?avatarId=16513</_8x48> <_4x24>http://jiraapi.com/secure/useravatar?size=small&avatarId=16513</_4x24> <_6x16>http://jiraapi.com/secure/useravatar?size=xsmall&avatarId=16513</_6x16> <_2x32>http://jiraapi.com/secure/useravatar?size=medium&avatarId=16513</_2x32> </avatarUrls> <displayName>Jira-dev1</displayName> <name>jiradev1</name> <self>http://jiraapi.com/rest/api/2/user?username=jiradev1</self> <active>true</active> <timeZone>America/Chicago</timeZone> <key>jiradev1</key> </author> <created>2019-10-15T03:18:48.073-0500</created> <id>8650903</id> <items> <field>summary</field> <from>null</from> <toString>Story 1</toString> <fromString>Bug in business logic</fromString> <to>null</to> <fieldtype>jira</fieldtype> </items> <items> <field>environment</field> <from>null</from> <toString> This is test environment</toString> <fromString>null</fromString> <to>null</to> <fieldtype>jira</fieldtype> </items> <items> <field>duedate</field> <from>null</from> <toString>2019-08-11 00:00:00.0</toString> <fromString>null</fromString> <to>2019-08-11</to> <fieldtype>jira</fieldtype> </items> <items> <field>description</field> <from>null</from> <toString> This is a Test description </toString> <fromString>null</fromString> <to>null</to> <fieldtype>jira</fieldtype> </items> <items> <field>assignee</field> <from>jiraqa11</from> <toString>Singh, Ashish</toString> <fromString>Jiraqa11</fromString> <to>ashising</to> <fieldtype>jira</fieldtype> </items> <items> <field>labels</field> <from>null</from> <toString>story story_test</toString> <fromString /> <to>null</to> <fieldtype>jira</fieldtype> </items> <items> <field>timeoriginalestimate</field> <from>null</from> <toString>600</toString> <fromString>null</fromString> <to>600</to> <fieldtype>jira</fieldtype> </items> <items> <field>timeestimate</field> <from>null</from> <toString>600</toString> <fromString>null</fromString> <to>600</to> <fieldtype>jira</fieldtype> </items> </histories> <histories> <author> <emailAddress /> <avatarUrls> <_8x48>http://jiraapi.com/secure/useravatar?avatarId=16513</_8x48> <_4x24>http://jiraapi.com/secure/useravatar?size=small&avatarId=16513</_4x24> <_6x16>http://jiraapi.com/secure/useravatar?size=xsmall&avatarId=16513</_6x16> <_2x32>http://jiraapi.com/secure/useravatar?size=medium&avatarId=16513</_2x32> </avatarUrls> <displayName>Jira-dev1</displayName> <name>jiradev1</name> <self>http://jiraapi.com/rest/api/2/user?username=jiradev1</self> <active>true</active> <timeZone>America/Chicago</timeZone> <key>jiradev1</key> </author> <created>2019-10-15T03:25:13.107-0500</created> <id>8650904</id> <items> <field>summary</field> <from>null</from> <toString>Bug in business logic</toString> <fromString>Story 1</fromString> <to>null</to> <fieldtype>jira</fieldtype> </items> </histories> <startAt>0</startAt> </changelog> <id>1171341</id> <fields> <summary>Bug in business logic</summary> <status> <name>Open</name> <self>http://jiraapi.com/rest/api/2/status/1</self> <description>The issue is open and ready for the assignee to start work on it.</description> <iconUrl>http://jiraapi.com/images/icons/statuses/open.png</iconUrl> <id>1</id> <statusCategory> <colorName>blue-gray</colorName> <name>To Do</name> <self>http://jiraapi.com/rest/api/2/statuscategory/2</self> <id>2</id> <key>new</key> </statusCategory> </status> </fields> <key>key-142</key> <properties> <tests> <completed>1</completed> Test if works on Jira Server </tests> <tasks> <completed>1</completed> Test if works on Jira Server </tasks> </properties> </json> </XML> |
Search Issues
Retrieves issues from Jira that match the specified search criteria.
The following table describes the input elements for the adapter wrapper process.
Input element | Description | Required |
|---|---|---|
adapter name | Specifies the name of the adapter as configured on the grid. Default value: Jira Adapter | No |
JSESSIONID | Specifies the Jira session ID that you obtained after running the Login request. | Yes |
query | Specifies a query string in a Jira Query Language to be used to search for issues. Example: assignee = currentUser() AND resolution = Unresolved order by updated DESC. | Yes |
start at | Specifies the index of the first issue to be returned. Valid values: 0 and above. Default value: 0 | No |
max results | Specifies the maximum number of issues to be returned in the response. Default value: 50. The maximum allowed value is dictated by the 'jira.search.views.default.max' Jira property. If you specify a value higher than this number, the search results will appear truncated. | No |
fields | Specifies the list of navigable fields to return for each issue. By default, all fields are returned. The values can be single or comma separated values within double quotes.
| No |
validate query | Specifies whether to validate the JQL query. Valid values: true (default), false | No |
return data format | Specifies the data type for the adapter response | No |
If using the Call Adapter activity in the Development Studio, the following table describes the input elements for the adapter request.
Input element | Description |
|---|---|
<operation-name> | Specifies the name of the operation. Valid value: search-issues |
<headers> | Specifies the header details for the adapter request, in a JSON format. Contains the URL, return-data-format, and other JSON headers. |
<cookie> | Specifies the JSESSIONID cookie obtained during the Login operation. |
<body> | Specifies the details to be sent in the request body for searching for issues. <![CDATA[ { "jql":"project = Key", "startAt":0, "maxResults":5, "fields":[ "summary", "status", "assignee"} ] }]]> |
The following figure shows a sample XML request for the operation.
<operation-name><![CDATA[search-issues]]></operation-name>
<headers><![CDATA[{"return-data-format":"XML","headers" : { "Content-Type": "application/json", "Cookie": "JSESSIONID=9483B972D9C2363C198FED5376994AF1"} }]]></headers>
<body><![CDATA[{
"jql":"project = Key",
"startAt":0,
"maxResults":5,
"fields":[
"summary",
"status",
"assignee"
]
}]]></body>
</jira-adapter-request>
The following figure shows the adapter response for the request.
<metadata>
<status>success</status>
</metadata>
<status-line>
<code>200</code>
<reason>200</reason>
</status-line>
<header-lines>
<Date>Mon, 07 Oct 2019 10:41:25 GMT</Date>
<Server>Apache/2.4.29 (Red Hat)</Server>
<X-AREQUESTID>341x26415x1</X-AREQUESTID>
<X-ASESSIONID>1fg81i2</X-ASESSIONID>
<X-ANODEID>phx-jiraqa-01</X-ANODEID>
<X-XSS-Protection>1; mode=block</X-XSS-Protection>
<X-Content-Type-Options>nosniff</X-Content-Type-Options>
<X-Frame-Options>SAMEORIGIN</X-Frame-Options>
<Content-Security-Policy>frame-ancestors 'self'</Content-Security-Policy>
<X-ASEN>SEN-L13798850</X-ASEN>
<X-Seraph-LoginReason>OK</X-Seraph-LoginReason>
<Set-Cookie>atlassian.xsrf.token=BXV8-9FAB-2I0V-4AN7_247123d6013d67ef058ee8ee69dffb519f7946f1_lin; Path=/</Set-Cookie>
<X-AUSERNAME>jiradev1</X-AUSERNAME>
<Cache-Control>no-cache, no-store, no-transform</Cache-Control>
<Vary>User-Agent</Vary>
<Content-Type>application/json;charset=UTF-8</Content-Type>
<Connection>close</Connection>
<Transfer-Encoding>chunked</Transfer-Encoding>
<X-RBT-SCAR>172.29.65.114:844460460:1000</X-RBT-SCAR>
</header-lines>
<message-body>
<expand>schema,names</expand>
<issues>
<e>
<expand>operations,versionedRepresentations,editmeta,changelog,renderedFields</expand>
<fields>
<status>
<description>The issue is open and ready for the assignee to start work on it.</description>
<iconUrl>http://jiraapi.com/images/icons/statuses/open.png</iconUrl>
<id>1</id>
<name>Open</name>
<self>http://jiraapi.com/rest/api/2/status/1</self>
<statusCategory>
<colorName>blue-gray</colorName>
<id>2</id>
<key>new</key>
<name>To Do</name>
<self>http://jiraapi.com/rest/api/2/statuscategory/2</self>
</statusCategory>
</status>
<summary>qwerty321</summary>
</fields>
<id>1172122</id>
<key>Key-720</key>
<self>http://jiraapi.com/rest/api/2/issue/1172122</self>
</e>
<e>
<expand>operations,versionedRepresentations,editmeta,changelog,renderedFields</expand>
<fields>
<status>
<description>The issue is open and ready for the assignee to start work on it.</description>
<iconUrl>http://jiraapi.com/images/icons/statuses/open.png</iconUrl>
<id>1</id>
<name>Open</name>
<self>http://jiraapi.com/rest/api/2/status/1</self>
<statusCategory>
<colorName>blue-gray</colorName>
<id>2</id>
<key>new</key>
<name>To Do</name>
<self>http://jiraapi.com/rest/api/2/statuscategory/2</self>
</statusCategory>
</status>
<summary>qwerty765</summary>
</fields>
<id>1172121</id>
<key>Key-719</key>
<self>http://jiraapi.com/rest/api/2/issue/1172121</self>
</e>
</issues>
<maxResults>2</maxResults>
<startAt>0</startAt>
<total>720</total>
</message-body>
</jira-adapter-response>
The following table describes the output elements for the adapter request.
Output element | Description |
|---|---|
status | Shows the status of the operation. Valid values: success, failure |
status code | Shows the status code of the adapter response. Valid values: 200 (if the request is successful) |
error message | Shows the error message, in case the operation fails. |
response headers | Contains the adapter response for the operation. <header-lines> <Date>Wed, 16 Oct 2019 07:44:52 GMT</Date> <Server>Apache/2.4.29 (Red Hat)</Server> <X-AREQUESTID>164x976x1</X-AREQUESTID> <X-ASESSIONID>8r9pzg</X-ASESSIONID> <X-ANODEID>phx-jiraqa-01</X-ANODEID> <X-XSS-Protection>1; mode=block</X-XSS-Protection> <X-Content-Type-Options>nosniff</X-Content-Type-Options> <X-Frame-Options>SAMEORIGIN</X-Frame-Options> <Content-Security-Policy>frame-ancestors 'self'</Content-Security-Policy> <X-ASEN>SEN-L13798850</X-ASEN> <X-Seraph-LoginReason>OK</X-Seraph-LoginReason> <Set-Cookie>atlassian.xsrf.token=BXV8-9FAB-2I0V-4AN7_d1526f44afbc8b983d3820f33ce21ddc45202d86_lin; Path=/</Set-Cookie> <X-AUSERNAME>jiradev1</X-AUSERNAME> <Cache-Control>no-cache, no-store, no-transform</Cache-Control> <Vary>User-Agent</Vary> <Content-Type>application/json;charset=UTF-8</Content-Type> <Connection>close</Connection> <Transfer-Encoding>chunked</Transfer-Encoding> <X-RBT-SCAR>172.29.65.114:863922749:1000</X-RBT-SCAR> </header-lines> |
response body | Contains the body in the adapter response. <message-body> <expand>schema,names</expand> <issues> <e> <expand>operations,versionedRepresentations,editmeta,changelog,renderedFields</expand> <fields> <status> <description>The issue is open and ready for the assignee to start work on it.</description> <iconUrl>http://jiraapi.com/images/icons/statuses/open.png</iconUrl> <id>1</id> <name>Open</name> <self>http://jiraapi.com/rest/api/2/status/1</self> <statusCategory> <colorName>blue-gray</colorName> <id>2</id> <key>new</key> <name>To Do</name> <self>http://jiraapi.com/rest/api/2/statuscategory/2</self> </statusCategory> </status> <summary>Story via automation5</summary> </fields> <id>1172334</id> <key>key-755</key> <self>http://jiraapi.com/rest/api/2/issue/1172334</self> </e> <e> <expand>operations,versionedRepresentations,editmeta,changelog,renderedFields</expand> <fields> <status> <description>The issue is open and ready for the assignee to start work on it.</description> <iconUrl>http://jiraapi.com/images/icons/statuses/open.png</iconUrl> <id>1</id> <name>Open</name> <self>http://jiraapi.com/rest/api/2/status/1</self> <statusCategory> <colorName>blue-gray</colorName> <id>2</id> <key>new</key> <name>To Do</name> <self>http://jiraapi.com/rest/api/2/statuscategory/2</self> </statusCategory> </status> <summary>Story via automation2</summary> </fields> <id>1172333</id> <key>key-754</key> <self>http://jiraapi.com/rest/api/2/issue/1172333</self> </e> </issues> <maxResults>2</maxResults> <startAt>0</startAt> <total>434</total> </message-body> |
Edit Issue
Updates an issue in Jira.
The following table describes the input elements for the adapter wrapper process.
Input element | Description | Required |
|---|---|---|
adapter name | Specifies the name of the adapter as configured on the grid. Default value: Jira Adapter | No |
JSESSIONID | Specifies the Jira session ID that you obtained after running the Login request. | Yes |
input data | Specifies the input data, in a JSON format, to edit an issue. { "update": { "summary": [{ "set": "Bug in business logic" }] } } | Yes |
issue key | Specifies the Jira issue ID or key. | Yes |
notify users | Specifies whether to send an email to notify users about the update. A notification is sent to users who are added as watchers for the issue. Valid values: true (default), false | No |
return data format | Specifies the data type for the adapter response | No |
If using the Call Adapter activity in the Development Studio, the following table describes the input elements for the adapter request.
Input element | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
<operation-name> | Specifies the name of the operation. Valid value: edit-issue | ||||||||
<headers> | Specifies the header details for the adapter request, in a JSON format. Contains the <issue-key>, <return-data-format>, and <query-params> elements.
| ||||||||
<cookie> | Specifies the JSESSIONID cookie obtained during the Login operation. | ||||||||
<body> | Specifies the details to be sent in the request body for updating an issue in Jira. Contains the Example: <![CDATA[{ "update": { "summary": [{ "set": "Bug in business logic" }] } }]]> |
The following figure shows a sample XML request for the operation.
<headers><![CDATA[{
"return-data-format":"XML",
"issue-key":"Key-142",
"query-params":"notifyUsers=tamefwfw",
"headers":{
"Content-Type":"application/json",
"Cookie":"JSESSIONID=E0BE245C6152B8876E3A4E3478891F3B"
}
}]]></headers>
<operation-name><![CDATA[edit-issue]]></operation-name>
<body><![CDATA[{
"update": {
"summary": [{
"set": "Bug in business logic"
}]
}
}]]></body>
</jira-adapter-request>
The following figure shows the adapter response for the request.
<metadata>
<status>success</status>
</metadata>
<status-line>
<code>204</code>
<reason>204</reason>
</status-line>
<header-lines>
<Date>Tue, 22 Oct 2019 07:27:29 GMT</Date>
<Server>Apache/2.4.29 (Red Hat)</Server>
<X-AREQUESTID>147x1554x1</X-AREQUESTID>
<X-ASESSIONID>t0l8gq</X-ASESSIONID>
<X-ANODEID>phx-jiraqa-01</X-ANODEID>
<X-XSS-Protection>1; mode=block</X-XSS-Protection>
<X-Content-Type-Options>nosniff</X-Content-Type-Options>
<X-Frame-Options>SAMEORIGIN</X-Frame-Options>
<Content-Security-Policy>frame-ancestors 'self'</Content-Security-Policy>
<X-ASEN>SEN-L13798850</X-ASEN>
<X-Seraph-LoginReason>OK</X-Seraph-LoginReason>
<Set-Cookie>atlassian.xsrf.token=BXV8-9FAB-2I0V-4AN7_d8de4886f1a62d92c199bde6bb63688c35bf6cbd_lin; Path=/</Set-Cookie>
<X-AUSERNAME>jiradev1</X-AUSERNAME>
<Cache-Control>no-cache, no-store, no-transform</Cache-Control>
<Content-Type>application/json;charset=UTF-8</Content-Type>
<Connection>close</Connection>
<X-RBT-SCAR>172.29.65.114:876072304:1000</X-RBT-SCAR>
</header-lines>
<message-body>
<non-xml-data-response></non-xml-data-response>
</message-body>
</jira-adapter-response>
The following table describes the output elements for the adapter request.
Output element | Description |
|---|---|
status | Shows the status of the operation. Valid values: success, failure |
status code | Shows the status code of the adapter response. Valid values: 204 (if the request is successful) |
error message | Shows the error message, in case the operation fails. |
response headers | Contains the adapter response for the operation. <header-lines> <Date>Tue, 22 Oct 2019 08:56:41 GMT</Date> <Server>Apache/2.4.29 (Red Hat)</Server> <X-AREQUESTID>236x1631x1</X-AREQUESTID> <X-ASESSIONID>16r4zro</X-ASESSIONID> <X-ANODEID>phx-jiraqa-01</X-ANODEID> <X-XSS-Protection>1; mode=block</X-XSS-Protection> <X-Content-Type-Options>nosniff</X-Content-Type-Options> <X-Frame-Options>SAMEORIGIN</X-Frame-Options> <Content-Security-Policy>frame-ancestors 'self'</Content-Security-Policy> <X-ASEN>SEN-L13798850</X-ASEN> <X-Seraph-LoginReason>OK</X-Seraph-LoginReason> <Set-Cookie>atlassian.xsrf.token=BXV8-9FAB-2I0V-4AN7_af76e54ca3c5ac882d3c08795aedb1ea3e607fd6_lin; Path=/</Set-Cookie> <X-AUSERNAME>jiradev1</X-AUSERNAME> <Cache-Control>no-cache, no-store, no-transform</Cache-Control> <Content-Type>application/json;charset=UTF-8</Content-Type> <Connection>close</Connection> <X-RBT-SCAR>172.29.65.114:876251566:1000</X-RBT-SCAR> </header-lines> |
response body | Contains the body in the adapter response. <message-body> <non-xml-data-response /> </message-body> |