Comment operations in the Jira adapter
This topic provides input and output elements, and sample XML requests and responses for the operations in the Comment 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.
Add Comment
Adds a comment on a specified issue.
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 |
issue key | Specifies the issue key or issue ID for which you want to add a comment. | Yes |
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. Use expand to include additional information about comments in the response. This parameter accepts renderedBody, which returns the comment body in HTML. | No |
input data | Contains the comment string. Example { "body": "Comment text here." } For more information, see the schema section in Jira API documentation, Add comment. | 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: add-comment | ||||||||
<headers> | Specifies the header details for the adapter request, in a JSON format. Contains the issue-key, return-data-format, and other query parameters.
| ||||||||
<cookie> | Specifies the JSESSIONID cookie obtained during the Login operation. | ||||||||
<body> | Contains the request body for adding a new comment for a specified issue. Example <![CDATA[{ "body": "Add comment text here" }]]> |
The following figure shows a sample XML request for the operation.
<headers><![CDATA[{
"return-data-format":"XML",
"issue-key":"TSO-142",
"query-params":"expand%3DrenderedBody",
"headers":{
"Content-Type":"application/json",
"Cookie":"JSESSIONID=DF16AE8E10E70B2626262E0CCCE1DF06"
}
}]]></headers>
<operation-name><![CDATA[add-comment]]></operation-name>
<body><![CDATA[{
"body": "Comment text here."
}]]></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>Tue, 22 Oct 2019 19:47:10 GMT</Date>
<Server>Apache/2.4.29 (Red Hat)</Server>
<X-AREQUESTID>887x1693x1</X-AREQUESTID>
<X-ASESSIONID>1opn9qt</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_1c0934516fe096881a559f6fd1c5aaa5c4472db4_lin; Path=/</Set-Cookie>
<X-AUSERNAME>jiradev1</X-AUSERNAME>
<Location>http://jiraapi.bmc.com/rest/api/2/issue/1171341/comment/1239006</Location>
<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:877626220:1000</X-RBT-SCAR>
</header-lines>
<message-body>
<non-xml-data-response>
{
"self":"http://jiraapi.bmc.com/rest/api/2/issue/1171341/comment/1239006",
"id":"1239006",
"author":{
"self":"http://jiraapi.bmc.com/rest/api/2/user?username=jiradev1",
"name":"jiradev1",
"key":"jiradev1",
"emailAddress":"",
"avatarUrls":{
"48x48":"http://jiraapi.bmc.com/secure/useravatar?avatarId=16513",
"24x24":"http://jiraapi.bmc.com/secure/useravatar?size=small&avatarId=16513",
"16x16":"http://jiraapi.bmc.com/secure/useravatar?size=xsmall&avatarId=16513",
"32x32":"http://jiraapi.bmc.com/secure/useravatar?size=medium&avatarId=16513"
},
"displayName":"Jira-dev1",
"active":true,
"timeZone":"America/Chicago"
},
"body":"Comment text here",
"renderedBody":"<p>Comment text here< /p>",
"updateAuthor":{
"self":"http://jiraapi.bmc.com/rest/api/2/user?username=jiradev1",
"name":"jiradev1",
"key":"jiradev1",
"emailAddress":"",
"avatarUrls":{
"48x48":"http://jiraapi.bmc.com/secure/useravatar?avatarId=16513",
"24x24":"http://jiraapi.bmc.com/secure/useravatar?size=small&avatarId=16513",
"16x16":"http://jiraapi.bmc.com/secure/useravatar?size=xsmall&avatarId=16513",
"32x32":"http://jiraapi.bmc.com/secure/useravatar?size=medium&avatarId=16513"
},
"displayName":"Jira-dev1",
"active":true,
"timeZone":"America/Chicago"
},
"created":"2019-10-22T14:47:11.067-0500",
"updated":"2019-10-22T14:47:11.067-0500"
}
</non-xml-data-response> </message-body>
</jira-adapter-response>
</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>Tue, 22 Oct 2019 20:13:56 GMT</Date> <Server>Apache/2.4.29 (Red Hat)</Server> <X-AREQUESTID>913x1697x1</X-AREQUESTID> <X-ASESSIONID>4gi376</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_0a96479e64f90bdfadc4c30fb3016fbe227e8d98_lin; Path=/</Set-Cookie> <X-AUSERNAME>jiradev1</X-AUSERNAME> <Location>http://jiraapiqa.bmc.com/rest/api/2/issue/1171341/comment/1239007</Location> <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:877653103:1000</X-RBT-SCAR> </header-lines> |
response body | Contains the body in the adapter response. <XML> <json> <renderedBody><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.</p></renderedBody> <author> <emailAddress /> <avatarUrls> <_8x48>http://jiraapiqa.bmc.com/secure/useravatar?avatarId=16513</_8x48> <_4x24>http://jiraapiqa.bmc.com/secure/useravatar?size=small&avatarId=16513</_4x24> <_6x16>http://jiraapiqa.bmc.com/secure/useravatar?size=xsmall&avatarId=16513</_6x16> <_2x32>http://jiraapiqa.bmc.com/secure/useravatar?size=medium&avatarId=16513</_2x32> </avatarUrls> <displayName>Jira-dev1</displayName> <name>jiradev1</name> <self>http://jiraapiqa.bmc.com/rest/api/2/user?username=jiradev1</self> <active>true</active> <timeZone>America/Chicago</timeZone> <key>jiradev1</key> </author> <created>2019-10-22T15:13:56.787-0500</created> <updateAuthor> <emailAddress /> <avatarUrls> <_8x48>http://jiraapiqa.bmc.com/secure/useravatar?avatarId=16513</_8x48> <_4x24>http://jiraapiqa.bmc.com/secure/useravatar?size=small&avatarId=16513</_4x24> <_6x16>http://jiraapiqa.bmc.com/secure/useravatar?size=xsmall&avatarId=16513</_6x16> <_2x32>http://jiraapiqa.bmc.com/secure/useravatar?size=medium&avatarId=16513</_2x32> </avatarUrls> <displayName>Jira-dev1</displayName> <name>jiradev1</name> <self>http://jiraapiqa.bmc.com/rest/api/2/user?username=jiradev1</self> <active>true</active> <timeZone>America/Chicago</timeZone> <key>jiradev1</key> </updateAuthor> <self>http://jiraapiqa.bmc.com/rest/api/2/issue/1171341/comment/1239007</self> <id>1239007</id> <body>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.</body> <updated>2019-10-22T15:13:56.787-0500</updated> </json> </XML> |
Get Comments
Gets a single or all comments on the specified issue.
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 |
issue key | Specifies the issue key or issue ID for which you want to add a comment. | Yes |
comment id | Specifies the comment ID if you want to retrieve a specific comment. | No |
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. To retrieve a single comment enclosed in HTML tags, use expand to include additional information about comments in the response. This parameter accepts renderedBody, which returns the comment body in HTML. Example: expand=renderedBody To retrieve multiple comments, use the following query parameters:
For example, if you want to retrieve maximum 4 comments on a specific issue, starting from the first comment, specify the following query parameters: | 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-comments | ||||||||
<headers> | Specifies the header details for the adapter request, in a JSON format. Contains the issue-key, return-data-format, and other query parameters.
| ||||||||
<cookie> | Specifies the JSESSIONID cookie obtained during the Login operation. |
The following figure shows a sample XML request for the operation.
<headers><![CDATA[{
"issue-key":"TSOADP-142",
"comment-id":"",
"query-params":"startAt%3D0%26maxResults%3D4",
"return-data-format":"xml",
"headers":{
"Content-Type":"application/json",
"Cookie":"JSESSIONID=01B7BB8666CA1FB19B3669FEF3D91F89"
}
}]]></headers>
<operation-name><![CDATA[get-comments]]></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>Thu, 24 Oct 2019 05:24:00 GMT</Date>
<Server>Apache/2.4.29 (Red Hat)</Server>
<X-AREQUESTID>24x1736x1</X-AREQUESTID>
<X-ASESSIONID>lxhlep</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_6929c2828fe6fec44f1302c89185afdb3ddbf44d_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:880837438:1000</X-RBT-SCAR>
</header-lines>
<message-body>
<non-xml-data-response>{
"startAt": 0,
"maxResults": 4,
"total": 7,
"comments": [{
"self": "http://jiraapiqa.bmc.com/rest/api/2/issue/1171341/comment/1239000",
"id": "1239000",
"author": {
"self": "http://jiraapiqa.bmc.com/rest/api/2/user?username=jiradev1",
"name": "jiradev1",
"key": "jiradev1",
"emailAddress": "",
"avatarUrls": {
"48x48": "http://jiraapiqa.bmc.com/secure/useravatar?avatarId=16513",
"24x24": "http://jiraapiqa.bmc.com/secure/useravatar?size=small&avatarId=16513",
"16x16": "http://jiraapiqa.bmc.com/secure/useravatar?size=xsmall&avatarId=16513",
"32x32": "http://jiraapiqa.bmc.com/secure/useravatar?size=medium&avatarId=16513"
},
"displayName": "Jira-dev1",
"active": true,
"timeZone": "America/Chicago"
},
"body": " Updated Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.",
"updateAuthor": {
"self": "http://jiraapiqa.bmc.com/rest/api/2/user?username=jiradev1",
"name": "jiradev1",
"key": "jiradev1",
"emailAddress": "",
"avatarUrls": {
"48x48": "http://jiraapiqa.bmc.com/secure/useravatar?avatarId=16513",
"24x24": "http://jiraapiqa.bmc.com/secure/useravatar?size=small&avatarId=16513",
"16x16": "http://jiraapiqa.bmc.com/secure/useravatar?size=xsmall&avatarId=16513",
"32x32": "http://jiraapiqa.bmc.com/secure/useravatar?size=medium&avatarId=16513"
},
"displayName": "Jira-dev1",
"active": true,
"timeZone": "America/Chicago"
},
"created": "2019-10-11T00:03:31.523-0500",
"updated": "2019-10-11T03:59:45.187-0500",
"visibility": {
"type": "role",
"value": "Administrators"
}
}]
}<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>Thu, 24 Oct 2019 05:24:00 GMT</Date> <Server>Apache/2.4.29 (Red Hat)</Server> <X-AREQUESTID>24x1736x1</X-AREQUESTID> <X-ASESSIONID>lxhlep</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_6929c2828fe6fec44f1302c89185afdb3ddbf44d_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:880837438:1000</X-RBT-SCAR> </header-lines> |
response body | Contains the body in the adapter response. <XML> <json> <total>1</total> <comments> <visibility> <type>role</type> <value>Administrators</value> </visibility> <author> <emailAddress /> <avatarUrls> <_8x48>http://jiraapiqa.bmc.com/secure/useravatar?avatarId=16513</_8x48> <_4x24>http://jiraapiqa.bmc.com/secure/useravatar?size=small&avatarId=16513</_4x24> <_6x16>http://jiraapiqa.bmc.com/secure/useravatar?size=xsmall&avatarId=16513</_6x16> <_2x32>http://jiraapiqa.bmc.com/secure/useravatar?size=medium&avatarId=16513</_2x32> </avatarUrls> <displayName>Jira-dev1</displayName> <name>jiradev1</name> <self>http://jiraapiqa.bmc.com/rest/api/2/user?username=jiradev1</self> <active>true</active> <timeZone>America/Chicago</timeZone> <key>jiradev1</key> </author> <created>2019-10-11T00:03:31.523-0500</created> <updateAuthor> <emailAddress /> <avatarUrls> <_8x48>http://jiraapiqa.bmc.com/secure/useravatar?avatarId=16513</_8x48> <_4x24>http://jiraapiqa.bmc.com/secure/useravatar?size=small&avatarId=16513</_4x24> <_6x16>http://jiraapiqa.bmc.com/secure/useravatar?size=xsmall&avatarId=16513</_6x16> <_2x32>http://jiraapiqa.bmc.com/secure/useravatar?size=medium&avatarId=16513</_2x32> </avatarUrls> <displayName>Jira-dev1</displayName> <name>jiradev1</name> <self>http://jiraapiqa.bmc.com/rest/api/2/user?username=jiradev1</self> <active>true</active> <timeZone>America/Chicago</timeZone> <key>jiradev1</key> </updateAuthor> <self>http://jiraapiqa.bmc.com/rest/api/2/issue/1171341/comment/1239000</self> <id>1239000</id> <body> Updated Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.</body> <updated>2019-10-11T03:59:45.187-0500</updated> </comments> <visibility> <type>role</type> <value>Administrators</value> </visibility> <author> <emailAddress /> <avatarUrls> <_8x48>http://jiraapiqa.bmc.com/secure/useravatar?avatarId=16513</_8x48> <_4x24>http://jiraapiqa.bmc.com/secure/useravatar?size=small&avatarId=16513</_4x24> <_6x16>http://jiraapiqa.bmc.com/secure/useravatar?size=xsmall&avatarId=16513</_6x16> <_2x32>http://jiraapiqa.bmc.com/secure/useravatar?size=medium&avatarId=16513</_2x32> </avatarUrls> <displayName>Jira-dev1</displayName> <name>jiradev1</name> <self>http://jiraapiqa.bmc.com/rest/api/2/user?username=jiradev1</self> <active>true</active> <timeZone>America/Chicago</timeZone> <key>jiradev1</key> </author> <created>2019-10-14T05:07:03.770-0500</created> <updateAuthor> <emailAddress /> <avatarUrls> <_8x48>http://jiraapiqa.bmc.com/secure/useravatar?avatarId=16513</_8x48> <_4x24>http://jiraapiqa.bmc.com/secure/useravatar?size=small&avatarId=16513</_4x24> <_6x16>http://jiraapiqa.bmc.com/secure/useravatar?size=xsmall&avatarId=16513</_6x16> <_2x32>http://jiraapiqa.bmc.com/secure/useravatar?size=medium&avatarId=16513</_2x32> </avatarUrls> <displayName>Jira-dev1</displayName> <name>jiradev1</name> <self>http://jiraapiqa.bmc.com/rest/api/2/user?username=jiradev1</self> <active>true</active> <timeZone>America/Chicago</timeZone> <key>jiradev1</key> </updateAuthor> <self>http://jiraapiqa.bmc.com/rest/api/2/issue/1171341/comment/1239003</self> <id>1239003</id> <body>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.</body> <updated>2019-10-14T05:07:03.770-0500</updated> </comments> <maxResults>4</maxResults> <startAt>0</startAt> </json> </XML> |
Update Comment
Updates a specific comment on an issue.
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 |
issue key | Specifies the issue key or issue ID for which you want to add a comment. | Yes |
comment id | Specifies the comment ID that you want to update. | Yes |
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. Use expand to include additional information about comments in the response. This parameter accepts renderedBody, which returns the comment body in HTML. | No |
input data | Contains the comment string. Example { "body": "Comment text here." } For more information, see the schema section in Jira API documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-updateComment | 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: update-comment | ||||||||||
<headers> | Specifies the header details for the adapter request, in a JSON format. Contains the issue-key, return-data-format, and other query parameters.
| ||||||||||
<cookie> | Specifies the cookie with the unique JSESSIONID obtained during the Login operation. | ||||||||||
<body> | Includes the request body for the update-comment operation. Example <![CDATA[{ "body": "Comment text here." }]]> |
The following figure shows a sample XML request for the operation.
<headers><![CDATA[{"issue-key":"TSOADP-142",
"comment-id":"1239000",
"query-params":"expand=renderedBody",
"return-data-format":"XML",
"headers" :
{ "Content-Type": "application/json",
"Cookie": "JSESSIONID=DE300FCAF459AD2B2FDD25C005CFDDDA"} }]]>
</headers>
<body><![CDATA[{
"body": "Add comment text here.",
"visibility": {
"type": "role",
"value": "Administrators"
}
}]]></body>
<operation-name><![CDATA[update-comment]]></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>Wed, 23 Oct 2019 06:29:40 GMT</Date>
<Server>Apache/2.4.29 (Red Hat)</Server>
<X-AREQUESTID>89x1699x1</X-AREQUESTID>
<X-ASESSIONID>sltmf1</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_6ca688b6c046d2435899cdbb17ebfec69bc940b9_lin; Path=/</Set-Cookie>
<X-AUSERNAME>jiradev1</X-AUSERNAME>
<Location>http://jiraapiqa.bmc.com/rest/api/2/issue/1171341/comment/1239000</Location>
<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:878437421:1000</X-RBT-SCAR>
</header-lines>
<message-body>
<non-xml-data-response>
{
"self":"http://jiraapiqa.bmc.com/rest/api/2/issue/1171341/comment/1239000",
"id":"1239000",
"author":{
"self":"http://jiraapiqa.bmc.com/rest/api/2/user?username=jiradev1",
"name":"jiradev1",
"key":"jiradev1",
"emailAddress":"",
"avatarUrls":{
"48x48":"http://jiraapiqa.bmc.com/secure/useravatar?avatarId=16513",
"24x24":"http://jiraapiqa.bmc.com/secure/useravatar?size=small&avatarId=16513",
"16x16":"http://jiraapiqa.bmc.com/secure/useravatar?size=xsmall&avatarId=16513",
"32x32":"http://jiraapiqa.bmc.com/secure/useravatar?size=medium&avatarId=16513"
},
"displayName":"Jira-dev1",
"active":true,
"timeZone":"America/Chicago"
},
"body":" Updated Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.",
"renderedBody":"<p> Updated Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.</p>",
"updateAuthor":{
"self":"http://jiraapiqa.bmc.com/rest/api/2/user?username=jiradev1",
"name":"jiradev1",
"key":"jiradev1",
"emailAddress":"",
"avatarUrls":{
"48x48":"http://jiraapiqa.bmc.com/secure/useravatar?avatarId=16513",
"24x24":"http://jiraapiqa.bmc.com/secure/useravatar?size=small&avatarId=16513",
"16x16":"http://jiraapiqa.bmc.com/secure/useravatar?size=xsmall&avatarId=16513",
"32x32":"http://jiraapiqa.bmc.com/secure/useravatar?size=medium&avatarId=16513"
},
"displayName":"Jira-dev1",
"active":true,
"timeZone":"America/Chicago"
},
"created":"2019-10-11T00:03:31.523-0500",
"updated":"2019-10-23T01:29:40.371-0500",
"visibility":{
"type":"role",
"value":"Administrators"
}
}
</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>Tue, 22 Oct 2019 20:13:56 GMT</Date> <Server>Apache/2.4.29 (Red Hat)</Server> <X-AREQUESTID>913x1697x1</X-AREQUESTID> <X-ASESSIONID>4gi376</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_0a96479e64f90bdfadc4c30fb3016fbe227e8d98_lin; Path=/</Set-Cookie> <X-AUSERNAME>jiradev1</X-AUSERNAME> <Location>http://jiraapiqa.bmc.com/rest/api/2/issue/1171341/comment/1239007</Location> <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:877653103:1000</X-RBT-SCAR> </header-lines> |
response body | Contains the body in the adapter response. <XML> <json> <renderedBody><p> Updated Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.</p></renderedBody> <visibility> <type>role</type> <value>Administrators</value> </visibility> <author> <emailAddress /> <avatarUrls> <_8x48>http://jiraapiqa.bmc.com/secure/useravatar?avatarId=16513</_8x48> <_4x24>http://jiraapiqa.bmc.com/secure/useravatar?size=small&avatarId=16513</_4x24> <_6x16>http://jiraapiqa.bmc.com/secure/useravatar?size=xsmall&avatarId=16513</_6x16> <_2x32>http://jiraapiqa.bmc.com/secure/useravatar?size=medium&avatarId=16513</_2x32> </avatarUrls> <displayName>Jira-dev1</displayName> <name>jiradev1</name> <self>http://jiraapiqa.bmc.com/rest/api/2/user?username=jiradev1</self> <active>true</active> <timeZone>America/Chicago</timeZone> <key>jiradev1</key> </author> <created>2019-10-11T00:03:31.523-0500</created> <updateAuthor> <emailAddress /> <avatarUrls> <_8x48>http://jiraapiqa.bmc.com/secure/useravatar?avatarId=16513</_8x48> <_4x24>http://jiraapiqa.bmc.com/secure/useravatar?size=small&avatarId=16513</_4x24> <_6x16>http://jiraapiqa.bmc.com/secure/useravatar?size=xsmall&avatarId=16513</_6x16> <_2x32>http://jiraapiqa.bmc.com/secure/useravatar?size=medium&avatarId=16513</_2x32> </avatarUrls> <displayName>Jira-dev1</displayName> <name>jiradev1</name> <self>http://jiraapiqa.bmc.com/rest/api/2/user?username=jiradev1</self> <active>true</active> <timeZone>America/Chicago</timeZone> <key>jiradev1</key> </updateAuthor> <self>http://jiraapiqa.bmc.com/rest/api/2/issue/1171341/comment/1239000</self> <id>1239000</id> <body> Updated Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.</body> <updated>2019-10-23T01:29:40.371-0500</updated> </json> </XML> |
Delete Comment
Deletes a comment on an issue.
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 |
issue key | Specifies the issue key or issue ID for which you want to add a comment. | Yes |
comment id | Specifies the comment ID that you want to update. | 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: delete-comment | ||||||||
<headers> | Specifies the header details for the adapter request, in a JSON format. Contains the issue-key, return-data-format, and other parameters.
|
The following figure shows a sample XML request for the operation.
<headers><![CDATA[{
"return-data-format":"XML",
"issue-key":"TSOADP-142",
"comment-id":"1239004",
"headers":{
"Content-Type":"application/json",
"Cookie":"JSESSIONID=3AA8A8961F34217BEE323826A406E661"
}
}]]></headers>
<operation-name><![CDATA[delete-comment]]></operation-name>
</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>Thu, 24 Oct 2019 06:52:57 GMT</Date>
<Server>Apache/2.4.29 (Red Hat)</Server>
<X-AREQUESTID>112x1742x1</X-AREQUESTID>
<X-ASESSIONID>1iiquu7</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_67f83759d2865e979ee50e801302a931e273a5ef_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:881012650: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 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>Thu, 24 Oct 2019 06:52:57 GMT</Date> <Server>Apache/2.4.29 (Red Hat)</Server> <X-AREQUESTID>112x1742x1</X-AREQUESTID> <X-ASESSIONID>1iiquu7</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_67f83759d2865e979ee50e801302a931e273a5ef_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:881012650:1000</X-RBT-SCAR> </header-lines> |
response body | Contains the body in the adapter response. <message-body> <non-xml-data-response /> </message-body> |