Jira Connector Reference¶
The following operations allow you to work with the Jira Connector. Click an operation name to see parameter details and samples on how to use it.
init
The init operation configures the connection parameters used to establish a connection to the Jira server.
Parameter Name | Description | Required |
---|---|---|
username | The username of the user. | Yes |
password | The password of the user. | Yes |
uri | The instance URI of Jira account. | Yes |
blocking | This property helps the connector perform blocking invocations to Jira. | Yes |
Sample configuration
<jira.init>
<username>{$ctx:username}</username>
<password>{$ctx:password}</password>
<uri>{$ctx:uri}</uri>
<blocking>{$ctx:blocking}</blocking>
</jira.init>
Sample request
The following sample REST request can be handled by the init operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"blocking":"false"
}
getDashboards
This operation returns a JSON representation of the list of dashboards, including their names, IDs, and more.
Parameter Name | Description | Required |
---|---|---|
maxResults | The maximum number of dashboards to return, up to 1000 (default is 50). | Yes |
startAt | The index of the first dashboard to return (0-based). Must be 0 or a multiple of maxResults. | Yes |
filter | An optional filter that is applied to the list of dashboards. | Yes |
Sample configuration
<jira.getDashboards>
<maxResults>{$ctx:maxResults}</maxResults>
<filter>{$ctx:filter}</filter>
<startAt>{$ctx:startAt}</startAt>
</jira.getDashboards>
Sample request
The following is a sample REST/JSON request that can be handled by the getDashboards operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"maxResults":"50",
"filter":"favourite"
}
Sample response
Given below is a sample response for the getDashboards operation.
{
"startAt": 0,
"maxResults": 50,
"total": 1,
"dashboards": [
{
"id": "10100",
"name": "test",
"self": "http://localhost:8080/rest/api/2/dashboard/10100",
"view": "http://localhost:8080/secure/Dashboard.jspa?selectPageId=10100"
}
]
}
getDashboardById
This operation returns a JSON representation of the dashboard details, including its name, ID, and more.
Parameter Name | Description | Required |
---|---|---|
id | Identifies the dashboard that you want to get. | Yes |
Sample configuration
<jira.getDashboardById>
<id>{$ctx:id}</id>
</jira.getDashboardById>
Sample request
The following is a sample REST/JSON request that can be handled by the getDashboardById
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"id":"10100"
}
Sample response
Given below is a sample response for the getDashboardById
operation.
{
"id": "10100",
"name": "test",
"self": "http://localhost:8080/rest/api/2/dashboard/10100",
"view": "http://localhost:8080/secure/Dashboard.jspa?selectPageId=10100"
}
getFilterById
To get information about a specific filter, use getFilterById
and specify the filter ID. This operation returns a JSON representation of the filter information, including the name, ID, search URL, and more.
Parameter Name | Description | Required |
---|---|---|
filterId | Identifies the filter that you want to get. | Yes |
expand | The parameters to expand. | Yes |
Sample configuration
<jira.getFilterById>
<filterId>{$ctx:filterId}</filterId>
<expand>{$ctx:expand}</expand>
</jira.getFilterById>
Sample request
The following is a sample REST/JSON request that can be handled by the getFilterById
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"filterId":"10100"
}
Sample response
Given below is a sample response for the getFilterById
operation.
{
"self": "http://localhost:8080/rest/api/2/filter/10100",
"id": "10100",
"name": "All Open Bugs",
"description": "Lists all open bugs",
"owner": {
"self": "http://localhost:8080/rest/api/2/user?username=admin",
"key": "admin",
"name": "admin",
"avatarUrls": {
"48x48": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=48",
"24x24": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=24",
"16x16": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=16",
"32x32": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=32"
},
"displayName": "admin@gmail.com",
"active": true
},
"jql": "type = Bug AND resolution is EMPTY",
"viewUrl": "http://localhost:8080/issues/?filter=10100",
"searchUrl": "http://localhost:8080/rest/api/2/search?jql=type+%3D+Bug+AND+resolution+is+EMPTY",
"favourite": true,
"sharePermissions": [],
"editable": true,
"sharedUsers": {
"size": 0,
"items": [],
"max-results": 1000,
"start-index": 0,
"end-index": 0
},
"subscriptions": {
"size": 0,
"items": [],
"max-results": 1000,
"start-index": 0,
"end-index": 0
}
}
getFavouriteFilters
To get the favorite filters of the current user, use getFavouriteFilter
. This operation returns a JSON representation of the filters, including their names, IDs, search URLs, and more.
Parameter Name | Description | Required |
---|---|---|
expand | The parameters to expand. | Yes |
Sample configuration
<jira.getFavouriteFilters>
<expand>{$ctx:expand}</expand>
</jira.getFavouriteFilters>
Sample request
The following is a sample REST/JSON request that can be handled by the getFavouriteFilters
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080"
}
Sample response
Given below is a sample response for the getFavouriteFilters
operation.
[
{
"self": "http://localhost:8080/rest/api/2/filter/10100",
"id": "10100",
"name": "All Open Bugs",
"description": "Lists all open bugs",
"owner": {
"self": "http://localhost:8080/rest/api/2/user?username=admin",
"key": "admin",
"name": "admin",
"avatarUrls": {
"48x48": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=48",
"24x24": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=24",
"16x16": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=16",
"32x32": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=32"
},
"displayName": "admin@gmail.com",
"active": true
},
"jql": "type = Bug AND resolution is EMPTY",
"viewUrl": "http://localhost:8080/issues/?filter=10100",
"searchUrl": "http://localhost:8080/rest/api/2/search?jql=type+%3D+Bug+AND+resolution+is+EMPTY",
"favourite": true,
"sharePermissions": [],
"editable": true,
"sharedUsers": {
"size": 0,
"items": [],
"max-results": 1000,
"start-index": 0,
"end-index": 0
},
"subscriptions": {
"size": 0,
"items": [],
"max-results": 1000,
"start-index": 0,
"end-index": 0
}
}
]
createFilter
To create a new filter, use createFilter
and attach the JSON representation of the filter as the payload of the request.
Parameter Name | Description | Required |
---|---|---|
filterName | The name of the filter. | Yes |
description | The description of the filter. | Yes |
jqlType | The jql type of the filter. | Yes |
favourite | Specify whether the filter is a favourite. | Yes |
Sample configuration
<jira.createFilter>
<filterName>{$ctx:filterName}</filterName>
<description>{$ctx:description}</description>
<jqlType>{$ctx:jqlType}</jqlType>
<favourite>{$ctx:favourite}</favourite>
</jira.createFilter>
Sample request
The following is a sample REST/JSON request that can be handled by the createFilter
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"filterName":"All Open Bugs",
"description":"Lists all open bugs",
"jqlType":"Bug and resolution is empty",
"favourite":"true"
}
Sample response
Given below is a sample response for the createFilter
operation.
{
"self": "http://localhost:8080/rest/api/2/filter/10100",
"id": "10100",
"name": "All Open Bugs",
"description": "Lists all open bugs",
"owner": {
"self": "http://localhost:8080/rest/api/2/user?username=admin",
"key": "admin",
"name": "admin",
"avatarUrls": {
"48x48": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=48",
"24x24": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=24",
"16x16": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=16",
"32x32": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=32"
},
"displayName": "admin@gmail.com",
"active": true
},
"jql": "type = Bug AND resolution is EMPTY",
"viewUrl": "http://localhost:8080/issues/?filter=10100",
"searchUrl": "http://localhost:8080/rest/api/2/search?jql=type+%3D+Bug+AND+resolution+is+EMPTY",
"favourite": true,
"sharePermissions": [],
"editable": true,
"sharedUsers": {
"size": 0,
"items": [],
"max-results": 1000,
"start-index": 0,
"end-index": 0
},
"subscriptions": {
"size": 0,
"items": [],
"max-results": 1000,
"start-index": 0,
"end-index": 0
}
}
updateFilterById
To update an existing filter, use updateFilterById
with the filter ID.
Parameter Name | Description | Required |
---|---|---|
filterId | The id of the filter. | Yes |
filterName | The name of the filter. | Yes |
description | The description of the filter. | Yes |
jqlType | The jql type of the filter. | Yes |
favourite | Specify whether the filter is a favourite. | Yes |
expand | The parameters to expand. | Yes |
Sample configuration
<jira.updateFilterById>
<filterId>{$ctx:filterId}</filterId>
<filterName>{$ctx:filterName}</filterName>
<description>{$ctx:description}</description>
<jqlType>{$ctx:jqlType}</jqlType>
<favourite>{$ctx:favourite}</favourite>
</jira.updateFilterById>
Sample request
The following is a sample REST/JSON request that can be handled by the updateFilterById
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"filterName":"All Bugs",
"description":"Lists all bugs",
"jqlType":"Bug and resolution is empty",
"favourite":"true",
"filterId":"10101"
}
Sample response
Given below is a sample response for the updateFilterById
operation.
{
"self": "http://localhost:8080/rest/api/2/filter/10101",
"id": "10101",
"name": "All Bugs",
"description": "Lists all bugs",
"owner": {
"self": "http://localhost:8080/rest/api/2/user?username=admin",
"key": "admin",
"name": "admin",
"avatarUrls": {
"48x48": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=48",
"24x24": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=24",
"16x16": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=16",
"32x32": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=32"
},
"displayName": "admin@gmail.com",
"active": true
},
"jql": "type = Bug AND resolution is EMPTY",
"viewUrl": "http://localhost:8080/issues/?filter=10101",
"searchUrl": "http://localhost:8080/rest/api/2/search?jql=type+%3D+Bug+AND+resolution+is+EMPTY",
"favourite": true,
"sharePermissions": [],
"editable": true,
"sharedUsers": {
"size": 0,
"items": [],
"max-results": 1000,
"start-index": 0,
"end-index": 0
},
"subscriptions": {
"size": 0,
"items": [],
"max-results": 1000,
"start-index": 0,
"end-index": 0
}
}
deleteFilter
To delete a filter, use deleteFilter
and specify the filter ID.
Parameter Name | Description | Required |
---|---|---|
filterId | Identifies the filter that you want to delete. | Yes |
Sample configuration
<jira.deleteFilter>
<filterId>{$ctx:filterId}</filterId>
</jira.deleteFilter>
Sample request
The following is a sample REST/JSON request that can be handled by the deleteFilter
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"https://testcon.atlassian.net",
"filterId":"10101"
}
Sample response
For the successful response, you will get 204 No Content status code without any body.
getGroup
This operation returns a JSON representation of the list of groups, including their names, IDs, and more.
Parameter Name | Description | Required |
---|---|---|
groupName | The name of the group that you want to get. | Yes |
expand | The parameters to expand. | Yes |
Sample configuration
<jira.getGroup>
<groupName>{$ctx:groupName}</groupName>
<expand>{$ctx:expand}</expand>
</jira.getGroup>
Sample request
The following is a sample REST/JSON request that can be handled by the getGroup
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"groupName":"jira-administrators",
"expand":"users"
}
Sample response
Given below is a sample response for the getGroup
operation.
{
"name": "jira-administrators",
"self": "http://localhost:8080/rest/api/2/group?groupname=jira-administrators",
"users": {
"size": 1,
"items": [],
"max-results": 50,
"start-index": 0,
"end-index": 0
},
"expand": "users"
}
listGroupPicker
This operation retrieves groups with substrings matching a given query.
Parameter Name | Description | Required |
---|---|---|
query | The query to match groups against. | Yes |
exclude | Exclude from the result. | Yes |
maxResults | The max results to return. | Yes |
Sample configuration
<jira.listGroupPicker>
<query>{$ctx:query}</query>
<exclude>{$ctx:exclude}</exclude>
<maxResults>{$ctx:maxResults}</maxResults>
</jira.listGroupPicker>
Sample request
The following is a sample REST/JSON request that can be handled by the listGroupPicker
operation.
{
"uri": "http://localhost:8080",
"username": "admin",
"password": "1qaz2wsx@",
"query": "administrators",
"exclude": "system-administrators",
"maxResults": "2"
}
Sample response
Given below is a sample response for the listGroupPicker
operation.
{
"header": "Showing 1 of 1 matching groups",
"total": 1,
"groups": [
{
"name": "jira-administrators",
"html": "<b>jira-administrators</b>",
"labels": [
{
"text": "Admin",
"title": "Users added to this group will be given administrative access",
"type": "ADMIN"
},
{
"text": "Jira Software",
"title": "Users added to this group will be given access to <strong>Jira Software</strong>",
"type": "SINGLE"
}
]
}
]
}
listGroupUserPicker
This operation retrieves a list of users and groups matching a query.
Parameter Name | Description | Required |
---|---|---|
query | A string used to search. This can be username, name, or email address. | Yes |
maxResults | The maximum number of users to return. | Yes |
isShowAvatar | The boolean value to show avatar. | Yes |
Sample configuration
<jira.listGroupUserPicker>
<query>{$ctx:query}</query>
<maxResults>{$ctx:maxResults}</maxResults>
<isShowAvatar>{$ctx:isShowAvatar}</isShowAvatar>
</jira.listGroupUserPicker>
Sample request
The following is a sample REST/JSON request that can be handled by the listGroupUserPicker
operation.
{
"uri": "http://localhost:8080",
"username": "admin",
"password": "1qaz2wsx@",
"query": "admin",
"maxResults": "1",
"isShowAvatar": "true"
}
Sample response
Given below is a sample response for the listGroupUserPicker
operation.
{
"users": {
"users": [],
"total": 0,
"header": "Showing 0 of 0 matching users"
},
"groups": {
"header": "Showing 1 of 1 matching groups",
"total": 1,
"groups": [
{
"name": "jira-administrators",
"html": "jira-<b>admin</b>istrators",
"labels": [
{
"text": "Admin",
"title": "Users added to this group will be given administrative access.",
"type": "ADMIN"
},
{
"text": "Jira Software",
"title": "Users added to this group will be given access to <strong>Jira Software</strong>.",
"type": "SINGLE"
}
]
}
]
}
}
getIssue
To get an existing issue, use getIssue
and specify the issue ID.
Parameter Name | Description | Required |
---|---|---|
issueIdOrKey | Identifies the issue to retrieve. This can be an issue ID, or an issue key. | Yes |
fields | The list of fields to return for the issue. | Yes |
expand | The parameters to expand. | Yes |
Sample configuration
<jira.getIssue>
<issueIdOrKey>{$ctx:issueIdOrKey}</issueIdOrKey>
<fields>{$ctx:fields}</fields>
<expand>{$ctx:expand}</expand>
</jira.getIssue>
Sample request
The following is a sample REST/JSON request that can be handled by the getIssue
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"issueIdOrKey":"EX-1"
}
Sample response
Given below is a sample response for the getIssue
operation.
{
"id": "10002",
"self": "http://localhost:8080/jira/rest/api/2/issue/10002",
"key": "EX-1",
"fields": {
"sub-tasks": [],
"timetracking": {
"originalEstimate": "10m",
"remainingEstimate": "3m",
"timeSpent": "6m",
"originalEstimateSeconds": 600,
"remainingEstimateSeconds": 200,
"timeSpentSeconds": 400
},
"project": {
"self": "http://localhost:8080/jira/rest/api/2/project/EX",
"id": "10000",
"key": "EX",
"name": "Example",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/projectavatar?size=small&pid=10000",
"16x16": "http://localhost:8080/jira/secure/projectavatar?size=xsmall&pid=10000",
"32x32": "http://localhost:8080/jira/secure/projectavatar?size=medium&pid=10000",
"48x48": "http://localhost:8080/jira/secure/projectavatar?size=large&pid=10000"
}
},
"updated": 1,
"description": "example bug report",
"issuelinks": [
{
"id": "10001",
"type": {
"id": "10000",
"name": "Dependent",
"inward": "depends on",
"outward": "is depended by"
},
"outwardIssue": {
"id": "10004L",
"key": "PRJ-2",
"self": "http://localhost:8080/jira/rest/api/2/issue/PRJ-2",
"fields": {
"status": {
"iconUrl": "http://localhost:8080/jira//images/icons/statuses/open.png",
"name": "Open"
}
}
}
}
],
"attachment": [],
"watcher": {
"self": "http://localhost:8080/jira/rest/api/2/issue/EX-1/watchers",
"isWatching": false,
"watchCount": 1,
"watchers": []
},
"comment": [],
"worklog": []
}
}
createIssue
To create a new issue (or task), use createIssue
and set the following properties.
Parameter Name | Description | Required |
---|---|---|
projectKey | The key (unique identifier) of the project in which you are creating the issue. | Yes |
issueFields | Fields of the issue. | Yes |
Sample configuration
<jira.createIssue>
<projectKey>{$ctx:projectKey}</projectKey>
<issueFields>{$ctx:issueFields}</issueFields>
</jira.createIssue>
Sample request
The following is a sample REST/JSON request that can be handled by the createIssue
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"issueFields":{
"fields": {
"project":{
"key": "TEST1"
},
"summary": "Hello",
"description": "test issue",
"issuetype": {
"id": "10000"
}
}
}
}
Sample response
Given below is a sample response for the createIssue
operation.
{
"id": "10000",
"key": "TEST1",
"self": "http://localhost:8080/jira/rest/api/2/issue/10000"
}
updateIssue
To update an issue, use updateIssue
and specify the issue ID.
Parameter Name | Description | Required |
---|---|---|
issueIdOrKey | The key (unique identifier) of the issue. | Yes |
issueFields | Fields of the issue. | Yes |
Sample configuration
<jira.updateIssue>
<issueIdOrKey>{$ctx:issueIdOrKey}</issueIdOrKey>
<issueFields>{$ctx:issueFields}</issueFields>
</jira.updateIssue>
Sample request
The following is a sample REST/JSON request that can be handled by the updateIssue
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"issueIdOrKey":"TEST-6",
"issueFields":{
"update":{
"summary":[
{
"set":"Bug in business logic"
}
],
"labels":[
{
"add":"triaged"
},
{
"remove":"blocker"
}
]
}
}
}
Sample response
200 will be returned if it updated the issue succesfully.
updateIssueAssignee
To assign an issue to another user, use updateIssueAssignee
and specify the issue ID.
Parameter Name | Description | Required |
---|---|---|
issueIdOrKey | Identifies the issue to update. This can be an issue ID or an issue key. | Yes |
name | The username of the user. | Yes |
Sample configuration
<jira.updateIssueAssignee>
<name>{$ctx:name}</name>
<issueIdOrKey>{$ctx:issueIdOrKey}</issueIdOrKey>
</jira.updateIssueAssignee>
Sample request
The following is a sample request that can be handled by the updateIssueAssignee
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"name":"admin",
"issueIdOrKey":"TEST-2"
}
Sample response
Returned 204 if the issue is successfully assigned.
getTransitions
To get a list of the possible transitions the current user can perform for an issue, use getTransitions
and specify the issue ID.
Parameter Name | Description | Required |
---|---|---|
issueIdOrKey | Identifies the issue to update. This can be an issue ID or an issue key. | Yes |
expand | The parameters to expand. | Yes |
Sample configuration
<jira.getTransitions>
<issueIdOrKey>{$ctx:issueIdOrKey}</issueIdOrKey>
<expand>{$ctx:expand}</expand>
</jira.getTransitions>
Sample request
The following is a sample REST/JSON request that can be handled by the getTransitions
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"issueIdOrKey":"TEST-2"
}
Sample response
Given below is a sample response for the getTransitions
operation.
{
"transitions": [
{
"id": "2",
"name": "Close Issue",
"to": {
"self": "http://localhost:8080/jira/rest/api/2.0/status/10000",
"description": "The issue is currently being worked on.",
"iconUrl": "http://localhost:8080/jira/images/icons/progress.gif",
"name": "In Progress",
"id": "10000",
"statusCategory": {
"self": "http://localhost:8080/jira/rest/api/2.0/statuscategory/1",
"id": 1,
"key": "in-flight",
"colorName": "yellow"
}
},
"fields": {...},
{
"id": "711",
"name": "QA Review",
"to": {
"self": "http://localhost:8080/jira/rest/api/2.0/status/5",
"description": "The issue is closed.",
"iconUrl": "http://localhost:8080/jira/images/icons/closed.gif",
"name": "Closed",
"id": "5",
"statusCategory": {
"self": "http://localhost:8080/jira/rest/api/2.0/statuscategory/9",
"id": 9,
"key": "completed",
"colorName": "green"
}
},
"fields": {
...
}
}
]
}
doTransition
To perform a transition on an issue, use doTransition
. Specify the issue ID and include the transition ID along with any other updates you want to make. Use the following properties:
Parameter Name | Description | Required |
---|---|---|
issueIdOrKey | Identifies the issue to update. This can be an issue ID, or an issue key. | Yes |
issueFields | Fields of the issue. | Yes |
Sample configuration
<jira.doTransition>
<issueIdOrKey>{$ctx:issueIdOrKey}</issueIdOrKey>
<issueFields>{$ctx:issueFields}</issueFields>
</jira.doTransition>
Sample request
The following is a sample request that can be handled by the doTransitions
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"issueIdOrKey":"TEST-2"
"issueFields":{
"update": {
"comment": [
{
"add": {
"body": "Bug has been fixed."
}
}
]
},
"transition": {
"id": "11"
}
}
}
Sample response
Returned 204 if the transition was successful.
getComments
To get the comments for an issue, use getComments
with the issue ID.
Parameter Name | Description | Required |
---|---|---|
issueIdOrKey | Identifies the issue that has the comments. This can be an issue ID, or an issue key. | Yes |
expand | The parameters to expand. | Yes |
Sample configuration
<jira.getComments>
<issueIdOrKey>{$ctx:issueIdOrKey}</issueIdOrKey>
<expand>{$ctx:expand}</expand>
</jira.getComments>
Sample request
The following is a sample request that can be handled by the getComments
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"issueIdOrKey":"TEST-2"
}
Sample response
Given below is a sample response for the getComments operation.
{
"startAt": 0,
"maxResults": 1,
"total": 1,
"comments": [
{
"self": "http://localhost:8080/jira/rest/api/2/issue/10010/comment/10000",
"id": "10000",
"author": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"displayName": "Fred F. User",
"active": false
},
"body": "Testing.",
"updateAuthor": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"displayName": "Fred F. User",
"active": false
},
"created": "2013-08-23T16:57:35.982+0200",
"updated": "2013-08-23T16:57:35.983+0200",
"visibility": {
"type": "role",
"value": "Administrators"
}
}
]
}
postComment
To post a comment to an issue, use postComment
with the following properties.
Parameter Name | Description | Required |
---|---|---|
issueIdOrKey | Identifies the issue to which you are adding this comment. This can be an issue ID or an issue key. | Yes |
Comment | The text to post as the comment. | Yes |
visibleRole | User role that can view the comment. | Yes |
expand | The parameters to expand. | Yes |
Sample configuration
<jira.postComment>
<issueIdOrKey>{$ctx:issueIdOrKey}</issueIdOrKey>
<comment>{$ctx:comment}</comment>
<visibleRole>{$ctx:visibleRole}</visibleRole>
<expand>{$ctx:expand}</expand>
</jira.postComment>
Sample request
The following is a sample request that can be handled by the postComment
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"issueIdOrKey":"TEST-1",
"comment":"Waiting to hear back from the legal department.",
"visibleRole":"Administrators"
}
Sample response
Given below is a sample response for the postComment
operation.
{
"self": "http://localhost:8080/jira/rest/api/2/issue/10010/comment/10000",
"id": "10000",
"author": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"displayName": "Fred F. User",
"active": false
},
"body": "Testing issue",
"updateAuthor": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"displayName": "Fred F. User",
"active": false
},
"created": "2013-08-23T16:57:35.982+0200",
"updated": "2013-08-23T16:57:35.983+0200",
"visibility": {
"type": "role",
"value": "Administrators"
}
}
updateComment
To update an existing comment, use the updateComment
operation.
Parameter Name | Description | Required |
---|---|---|
issueIdOrKey | Identifies the issue with the comments you want to update. This can be an issue ID, or an issue key. If the issue cannot be found via an exact match, Jira will also look for the issue in a case-insensitive way, or by looking to see if the issue was moved. | Yes |
commentId | Identifies the comment you are updating. | Yes |
comment | A string containing the comment to be posted. | Yes |
visibleRole | A String containing the visible role. | Yes |
expand | The parameters to expand. The 'renderedBody' optional parameter provides the body rendered in HTML. | Yes |
Sample configuration
<jira.updateComment>
<commentId>{$ctx:commentId}</commentId>
<issueIdOrKey>{$ctx:issueIdOrKey}</issueIdOrKey>
<comment>{$ctx:comment}</comment>
<visibleRole>{$ctx:visibleRole}</visibleRole>
</jira.updateComment>
Sample request
The following is a sample request that can be handled by the updateComment
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"issueIdOrKey":"TEST-1",
"commentId":"10000",
"comment":"is this a bug?",
"visibleRole":"Administrators"
}
Sample response
Given below is a sample response for the updateComment operation.
{
"self": "http://localhost:8080/jira/rest/api/2/issue/10010/comment/10000",
"id": "10000",
"author": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"displayName": "Fred F. User",
"active": false
},
"body": "Testing.",
"updateAuthor": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"displayName": "Fred F. User",
"active": false
},
"created": "2013-08-23T16:57:35.982+0200",
"updated": "2013-08-23T16:57:35.983+0200",
"visibility": {
"type": "role",
"value": "Administrators"
}
}
deleteComment
To delete an existing comment, use deleteComment
.
Parameter Name | Description | Required |
---|---|---|
issueIdOrKey | Identifies the issue with the comments that you want to delete. This can be an issue ID or an issue key. | Yes |
commentId | Identifies the comment you are deleting. | Yes |
Sample configuration
<jira.deleteComment>
<issueIdOrKey>{$ctx:issueIdOrKey}</issueIdOrKey>
<commentId>{$ctx:commentId}</commentId>
</jira.deleteComment>
Sample request
The following is a sample request that can be handled by the deleteComment
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"issueIdOrKey":"TEST-2",
"commentId":"10000"
}
Sample response
Returned 204 if delete is successful.
addAttachmentToIssueId
To add one or more attachments to an issue, use addAttachmentToIssueId
with the issue ID.
Parameter Name | Description | Required |
---|---|---|
issueIdOrKey | Identifies the issue to which you are adding attachments. This can be an issue ID or an issue key. | Yes |
Info
Multipart/form-data cannot be processed inside the server. Therefore, the Micro Integrator/ESB should be in a content-unaware status. To achieve this, configure a pass-through proxy, build the message from the client end, and then send it to the proxy.
Sample configuration
<jira.addAttachmentToIssueId>
<issueIdOrKey>{$url:issueIdOrKey}</issueIdOrKey>
</jira.addAttachmentToIssueId>
Sample response
Given below is a sample response to the addAttachmentToIssueId
operation.
[
{
"self": "http://localhost:8080/jira/rest/api/2.0/attachments/10000",
"filename": "picture.jpg",
"author": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
"created": "2013-08-23T16:57:35.977+0200",
"size": 23123,
"mimeType": "image/jpeg",
"content": "http://localhost:8080/jira/attachments/10000",
"thumbnail": "http://localhost:8080/jira/secure/thumbnail/10000"
}
]
getIssuePriorities
To get the priorities available for issues, use getIssuePriorities
. This operation returns detailed information about each priority, including its name, ID, and more.
Sample configuration
<jira.getIssuePriorities/>
Sample request
The following is a sample request that can be handled by the getIssuePriorities
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080"
}
Sample response
Given below is a sample response for the getIssuePriorities operation.
[
{
"self": "http://localhost:8080/jira/rest/api/2/priority/3",
"statusColor": "#009900",
"description": "Major loss of function.",
"iconUrl": "http://localhost:8080/jira/images/icons/priorities/major.png",
"name": "Major"
}
]
getIssuePriorityById
To get information on a specific priority, use getIssuePriorityById
and specify the priority ID.
Parameter Name | Description | Required |
---|---|---|
issuePriorityId | Identifies the priority for retrieving information. | Yes |
Sample configuration
<jira.getIssuePriorityById>
<issuePriorityId>{$ctx:issuePriorityId}</issuePriorityId>
</jira.getIssuePriorityById>
Sample request
The following is a sample request that can be handled by the getIssuePriorityById
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"issuePriorityId":"3"
}
Sample response
Given below is a sample response for the getIssuePriorityById
operation.
{
"self": "http://localhost:8080/jira/rest/api/2/priority/3",
"statusColor": "#009900",
"description": "Major loss of function.",
"iconUrl": "http://localhost:8080/jira/images/icons/priorities/major.png",
"name": "Major"
}
getIssueTypes
To get the types of issues available in this Jira instance, use getIssueTypes
. This operation returns detailed information about each issue type, including its name, ID, and more.
Sample configuration
<jira.getIssueTypes/>
Sample request
The following is a sample request that can be handled by the getIssueTypes
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080"
}
Sample response
Given below is a sample response for the getIssueTypes
operation.
[
{
"self": "http://localhost:8080/jira/rest/api/2.0/issueType/3",
"id": "3",
"description": "A task that needs to be done.",
"iconUrl": "http://localhost:8080/jira/images/icons/issuetypes/task.png",
"name": "Task",
"subtask": false
}
]
getIssueTypeById
To get information on a specific issue type, use getIssueTypeById
with the type ID.
Parameter Name | Description | Required |
---|---|---|
issueTypeId | Identifies the issue type to filter the issues that you want to get. | Yes |
Sample configuration
<jira.getIssueTypeById>
<issueTypeId>{$ctx:issueTypeId}</issueTypeId>
</jira.getIssueTypeById>
Sample request
The following is a sample request that can be handled by the getIssueTypeById
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"issueTypeId":"3"
}
Sample response
Given below is a sample response for the getIssueTypeById
operation.
{
"self": "http://localhost:8080/jira/rest/api/2.0/issueType/3",
"id": "3",
"description": "A task that needs to be done.",
"iconUrl": "http://localhost:8080/jira/images/icons/issuetypes/task.png",
"name": "Task",
"subtask": false
}
getVotesForIssue
To get the votes for a specific issue, use getVotesForIssue
with the issue ID. This operation returns a JSON representation of the vote information including the number of votes and more.
Parameter Name | Description | Required |
---|---|---|
issueIdOrKey | Identifies the issue with the votes that you want to get. This can be an issue ID or an issue key. | Yes |
Sample configuration
<jira.getVotesForIssue>
<issueIdOrKey>{$ctx:issueIdOrKey}</issueIdOrKey>
</jira.getVotesForIssue>
Sample request
The following is a sample request that can be handled by the getVotesForIssue
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"issueIdOrKey":"TEST-1"
}
Sample response
Given below is a sample response for the getVotesForIssue
operation.
{
"self": "http://localhost:8080/jira/rest/api/issue/TEST-1/votes",
"votes": 24,
"hasVoted": true,
"voters": [
{
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
}
]
}
createBulkIssue
This operation creates many issues in one bulk operation.
Parameter Name | Description | Required |
---|---|---|
issueUpdates | The array of objects containing the issue details. | Yes |
Sample configuration
<jira.createBulkIssue>
<issueUpdates>{$ctx:issueUpdates}</issueUpdates>
</jira.createBulkIssue>
Sample request
The following is a sample request that can be handled by the createBulkIssue
operation.
{
"uri": "http://localhost:8080",
"username": "admin",
"password": "1qaz2wsx@",
"issueUpdates": [
{
"update": {},
"fields": {
"project": {
"id": "10000"
},
"summary": "something's very wrong",
"issuetype": {
"id": "10000"
}
}
}
]
}
Sample response
Given below is a sample response for the createBulkIssue operation.
{
"issues": [
{
"id": "10000",
"key": "TST-24",
"self": "http://localhost:8080/jira/rest/api/2/issue/10000"
},
{..}
],
"errors": []
}
assignIssueToUser
This operation assigns an issue to a user.
Parameter Name | Description | Required |
---|---|---|
issueIdOrKey | A string containing an issue key. | Yes |
name | The name of the assignee. | Yes |
Sample configuration
<jira.assignIssueToUser>
<name>{$ctx:name}</name>
<issueIdOrKey>{$ctx:issueIdOrKey}</issueIdOrKey>
</jira.assignIssueToUser>
Sample request
The following is a sample request that can be handled by the assignIssueToUser
operation.
{
"uri": "https://connector.atlassian.net",
"username": "admin",
"password": "1qaz2wsx@",
"name": "vrajenthiran",
"issueIdOrKey": "WSO2CON-4"
}
Sample response
Returned 204 if the issue is successfully assigned.
getCommentById
This operation retrieves all comments for an issue.
Parameter Name | Description | Required |
---|---|---|
commentId | The unique identifier of the comment. | Yes |
expand | The parameters to expand. The optional 'renderedBody' flag provides the body rendered in HTML. | Yes |
issueIdOrKey | A string containing the issue ID or key to which the comment belongs. | Yes |
Sample configuration
<jira.getCommentById>
<commentId>{$ctx:commentId}</commentId>
<expand>{$ctx:expand}</expand>
<issueIdOrKey>{$ctx:issueIdOrKey}</issueIdOrKey>
</jira.getCommentById>
Sample request
The following is a sample request that can be handled by the getCommentById
operation.
{
"uri": "http://localhost:8080",
"username": "admin",
"password": "1qaz2wsx@",
"commentId" : "10000",
"issueIdOrKey":"TESTPM1-3"
}
Sample response
Given below is a sample response for the getCommentById
operation.
{
"startAt": 0,
"maxResults": 1,
"total": 1,
"comments": [
{
"self": "http://localhost:8080/jira/rest/api/2/issue/10010/comment/10000",
"id": "10000",
"author": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"displayName": "Fred F. User",
"active": false
},
"body": "Testing.",
"updateAuthor": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"displayName": "Fred F. User",
"active": false
},
"created": "2013-08-23T16:57:35.982+0200",
"updated": "2013-08-23T16:57:35.983+0200",
"visibility": {
"type": "role",
"value": "Administrators"
}
}
]
}
sendNotification
This operation sends a notification (email) to the list or recipients defined in the request.
Parameter Name | Description | Required |
---|---|---|
subject | The subject of the notification. | Yes |
issueIdOrKey | A string containing the issue ID or key to which the comment will be added. | Yes |
textBody | The text body of the notification. | Yes |
htmlBody | The HTML body of the notification. | Yes |
toReporter | The boolean flag to indicate whether to notify the reporter. | Yes |
toAssignee | The boolean flag to indicate whether to notify the assignee. | Yes |
toWatchers | The boolean flag to indicate whether to notify the watchers. | Yes |
toVoters | The boolean flag to indicate whether to notify the voters. | Yes |
toUsers | The boolean flag to indicate whether to notify the users. | Yes |
toGroups | The array of notification groups to be notified. | Yes |
restrictGroups | The Array of notification groups to be restricted. | Yes |
restrictPermissions | The array of restricted permissions for the notification. | Yes |
Sample configuration
<jira.sendNotification>
<subject>{$ctx:subject}</subject>
<issueIdOrKey>{$ctx:issueIdOrKey}</issueIdOrKey>
<textBody>{$ctx:textBody}</textBody>
<htmlBody>{$ctx:htmlBody}</htmlBody>
<toReporter>{$ctx:toReporter}</toReporter>
<toAssignee>{$ctx:toAssignee}</toAssignee>
<toWatchers>{$ctx:toWatchers}</toWatchers>
<toVoters>{$ctx:toVoters}</toVoters>
<toUsers>{$ctx:toUsers}</toUsers>
<toGroups>{$ctx:toGroups}</toGroups>
<restrictGroups>{$ctx:restrictGroups}</restrictGroups>
<restrictPermissions>{$ctx:restrictPermissions}</restrictPermissions>
</jira.sendNotification>
Sample request
The following is a sample request that can be handled by the sendNotification
operation.
{
"uri": "http://localhost:8080",
"username": "admin",
"password": "1qaz2wsx@",
"issueIdOrKey" : "TESTPM1-3",
"subject" : "notification subject",
"textBody":"The text body",
"htmlBody":"Lorem ipsum <strong>dolor</strong> sit amet, consectetur adipiscing elit. Pellentesque eget",
"toReporter":"false",
"toAssignee":"false",
"toWatchers":"true",
"toVoters":"true",
"toUsers":[
{
"name": "vrajenthiran",
"active": false
}
],
"toGroups":[
{
"name": "notification-group",
"self": "http://localhost:8080/jira/rest/api/2/group?groupname=notification-group"
}
],
"restrictPermissions":[
{
"id": "10",
"key": "BROWSE"
}
], "restrictGroups": [
{
"name": "notification-group",
"self": "http://localhost:8080/jira/rest/api/2/group?groupname=notification-group"
}
]
}
Sample response
Returned 204 if adding to the mail queue was successful.
addVotesForIssue
This operation casts your vote in favour of an issue.
Parameter Name | Description | Required |
---|---|---|
issueId | The ID of the issues to which you are casting the votes. | Yes |
Sample configuration
<jira.addVotesForIssue>
<issueId>{$ctx:issueId}</issueId>
</jira.addVotesForIssue>
Sample request
The following is a sample request that can be handled by the addVotesForIssue
operation.
{
"uri": "https://testappmahesh.atlassian.net",
"username": "testapp.mahesh2",
"password": "1qaz2wsx@",
"issueId":"TP-1"
}
Sample response
Returned 204 if adding to the mail queue was successful.
getWatchersForIssue
This operation retrieves the list of watchers for the issue with the given key.
Parameter Name | Description | Required |
---|---|---|
issueId | The string containing an issue key. | Yes |
Sample configuration
<jira.getWatchersForIssue>
<issueId>{$ctx:issueId}</issueId>
</jira.getWatchersForIssue>
Sample request
Following is a sample request that can be handled by the getWatchersForIssue
operation.
{
"uri":"http://localhost:8080",
"username":"admin",
"password":"1qaz2wsx@",
"issueId":"EX-1"
}
Sample response
Given below is a sample response for the getWatchersForIssue
operation.
{
"self": "http://localhost:8080/jira/rest/api/2/issue/EX-1/watchers",
"isWatching": false,
"watchCount": 1,
"watchers": [
{
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
}
]
}
removeUserFromWatcherList
This operation removes a user from an issue's watcher list.
Parameter Name | Description | Required |
---|---|---|
name | String containing the name of the user to remove. | Yes |
issueId | String containing an issue key. | Yes |
Sample configuration
<jira.removeUserFromWatcherList>
<name>{$ctx:name}</name>
<issueId>{$ctx:issueId}</issueId>
</jira.removeUserFromWatcherList>
Sample request
The following is a sample request that can be handled by the removeUserFromWatcherList
operation.
{
"uri":"https://connector.atlassian.net",
"username":"admin",
"password":"1qaz2wsx@",
"issueId":"TESTPM1-3",
"name" : "rasika"
}
Sample response
Returned 204 if the watcher was removed successfully.
getProject
To get information about a specific project, use getProject
with the project key. This operation returns a JSON representation of the entire project, including name, ID, components, and more.
Parameter Name | Description | Required |
---|---|---|
projectIdOrKey | The Identifier of the project that you want to get. | Yes |
expand | The parameters to expand. | Yes |
Sample configuration
<jira.getProject>
<projectIdOrKey>{$ctx:projectIdOrKey}</projectIdOrKey>
<expand>{$ctx:expand}</expand>
</jira.getProject>
Sample request
The following is a sample request that can be handled by the getProject
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"projectIdOrKey":"EX"
}
Sample response
Given below is a sample response for the getProject
operation.
{
"self": "http://localhost:8080/jira/rest/api/2/project/EX",
"id": "10000",
"key": "EX",
"description": "This project was created as an example for REST.",
"lead": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
"components": [
{
"self": "http://localhost:8080/jira/rest/api/2/component/10000",
"id": "10000",
"name": "Component 1",
"description": "This is a JIRA component",
"lead": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
"assigneeType": "PROJECT_LEAD",
"assignee": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
"realAssigneeType": "PROJECT_LEAD",
"realAssignee": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
"isAssigneeTypeValid": false
}
],
..
}
getAvatarsForProject
To get the avatars available for a specific project, use getAvatarsForProject
with the project key. This operation returns a JSON representation of the avatars, including their name, ID, and whether the avatar is currently selected for the project.
Parameter Name | Description | Required |
---|---|---|
projectIdOrKey | The identifier of the project that you want to get. | Yes |
Sample configuration
<jira.getAvatarsForProject>
<projectIdOrKey>{$ctx:projectIdOrKey}</projectIdOrKey>
</jira.getAvatarsForProject>
Sample request
The following is a sample request that can be handled by the getAvatarsForProject
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"projectIdOrKey":"TEST"
}
Sample response
Given below is a sample response for the getAvatarsForProject
operation.
{
"system": [
{
"id": "1000",
"owner": "fred",
"isSystemAvatar": true,
"isSelected": true,
"selected": true
}
],
"custom": [
{
"id": "1010",
"owner": "andrew",
"isSystemAvatar": false,
"isSelected": false,
"selected": false
}
]
}
deleteAvatarForProject
To delete an avatar from a project, use deleteAvatarForProject
with the project key and avatar ID.
Parameter Name | Description | Required |
---|---|---|
projectIdOrKey | The identifier of the project that you want to get. | Yes |
avatarId | Identifies the avatar to delete. | Yes |
Sample configuration
<jira.deleteAvatarForProject>
<projectIdOrKey>{$ctx:projectIdOrKey}</projectIdOrKey>
<avatarId>{$ctx:avatarId}</avatarId>
</jira.deleteAvatarForProject>
Sample request
The following is a sample request that can be handled by the deleteAvatarForProject
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"projectIdOrKey":"TEST",
"avatarId":"10412"
}
Sample response
204 will returned if the avatar is successfully deleted.
getComponentsOfProject
To get the components of a specific project, use getComponentsOfProject
with the project key. This operation returns a JSON representation of the components, including their name, ID, and avatars.
Parameter Name | Description | Required |
---|---|---|
projectIdOrKey | The identifier of the project that you want to get. | Yes |
Sample configuration
<jira.getComponentsOfProject>
<projectIdOrKey>{$ctx:projectIdOrKey}</projectIdOrKey>
</jira.getComponentsOfProject>
Sample request
The following is a sample request that can be handled by the getComponentsOfProject
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"projectIdOrKey":"TEST"
}
Sample response
Given below is a sample response for the getComponentsOfProject
operation.
[
{
"self": "http://localhost:8080/jira/rest/api/2/component/10000",
"id": "10000",
"name": "Component 1",
"description": "This is a JIRA component",
"lead": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
"assigneeType": "PROJECT_LEAD",
"assignee": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
"realAssigneeType": "PROJECT_LEAD",
"realAssignee": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
"isAssigneeTypeValid": false
},
...
]
getStatusesOfProject
To get the statuses of a specific project, use getStatusesOfProject
with the project key. This operation returns a JSON representation of each issue type in the project along with the status values.
Parameter Name | Description | Required |
---|---|---|
projectIdOrKey | The identifier of the project that you want to get. | Yes |
Sample configuration
<jira.getStatusesOfProject>
<projectIdOrKey>{$ctx:projectIdOrKey}</projectIdOrKey>
</jira.getStatusesOfProject>
Sample request
The following is a sample request that can be handled by the getStatusesOfProject
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"projectIdOrKey":"TEST"
}
Sample response
Given below is a sample response for the getStatusesOfProject
operation.
[
{
"self": "http://localhost:8090/jira/rest/api/2.0/issueType/3",
"id": "3",
"name": "Task",
"subtask": false,
"statuses": [
{
"self": "http://localhost:8090/jira/rest/api/2.0/status/10000",
"description": "The issue is currently being worked on.",
"iconUrl": "http://localhost:8090/jira/images/icons/progress.gif",
"name": "In Progress",
"id": "10000"
},
{
"self": "http://localhost:8090/jira/rest/api/2.0/status/5",
"description": "The issue is closed.",
"iconUrl": "http://localhost:8090/jira/images/icons/closed.gif",
"name": "Closed",
"id": "5"
}
]
}
]
getVersionsOfProject
To get the versions of a specific project, use getVersionsOfProject
with the project key. This operation returns a JSON representation of the list of versions in the project.
Parameter Name | Description | Required |
---|---|---|
projectIdOrKey | The identifier of the project that you want to get. | Yes |
Sample configuration
<jira.getVersionsOfProject>
<projectIdOrKey>{$ctx:projectIdOrKey}</projectIdOrKey>
</jira.getVersionsOfProject>
Sample request
The following is a sample request that can be handled by the getVersionsOfProject
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"projectIdOrKey":"TEST"
}
Sample response
Given below is a sample response for the getVersionsOfProject
operation.
[
{
"self": "http://localhost:8080/jira/rest/api/2/version/10000",
"id": "10000",
"description": "An excellent version",
"name": "New Version 1",
"archived": false,
"released": true,
"releaseDate": "2010-07-06",
"overdue": true,
"userReleaseDate": "6/Jul/2010",
"projectId": 10000
},
{
"self": "http://localhost:8080/jira/rest/api/2/version/10010",
"id": "10010",
"description": "Minor Bugfix version",
"name": "Next Version",
"archived": false,
"released": false,
"overdue": false,
"projectId": 10000
}
]
getRolesOfProject
To get the roles of a specific project, use getRolesOfProject
with the project key. This operation returns a JSON representation of the list of roles in the project, including each role's name and a link to more details.
Parameter Name | Description | Required |
---|---|---|
projectIdOrKey | The Identifier of the project that you want to get. | Yes |
Sample configuration
<jira.getRolesOfProject>
<projectIdOrKey>{$ctx:projectIdOrKey}</projectIdOrKey>
</jira.getRolesOfProject>
Sample request
Following is a sample request that can be handled by the getRolesOfProject
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"projectIdOrKey":"TEST"
}
Sample response
Given below is a sample response for the getRolesOfProject
operation.
{
"Users": "http://localhost:8080/jira/rest/api/2/project/MKY/role/10001",
"Administrators": "http://localhost:8080/jira/rest/api/2/project/MKY/role/10002",
"Developers": "http://localhost:8080/jira/rest/api/2/project/MKY/role/10000"
}
getRolesByIdOfProject
To get information about a specific role, use getRolesByIdOfProject
with the project key and role ID. This operation returns a JSON representation of the role, including its name, ID, actors, and more.
Parameter Name | Description | Required |
---|---|---|
projectIdOrKey | The identifier of the project that you want to get. | Yes |
roleId | Identifies the role for which you want to get information. | Yes |
Sample configuration
<jira.getRolesByIdOfProject>
<projectIdOrKey>{$ctx:projectIdOrKey}</projectIdOrKey>
<roleId>{$ctx:roleId}</roleId>
</jira.getRolesByIdOfProject>
Sample request
The following is a sample request that can be handled by the getRolesByIdOfProject
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"projectIdOrKey":"TEST",
"roleId":"10360"
}
Sample response
Given below is a sample response for the getRolesByIdOfProject
operation.
{
"self": "http://localhost:8080/jira/rest/api/2/project/MKY/role/10360",
"name": "Developers",
"id": 10360,
"description": "A project role that represents developers in a project",
"actors": [
{
"id": 10240,
"displayName": "jira-developers",
"type": "atlassian-group-role-actor",
"name": "jira-developers"
}
]
}
getUserAssignableProjects
To get a list of users (that match the search string) that can be assigned to all projects, use getUserAssignableProjects
.
Parameter Name | Description | Required |
---|---|---|
projectKeys | The comma-separated list of projects for which you are searching for assinees. | Yes |
usernameForSearch | The username for search. | Yes |
maxResults | The maximum number of users to return. | Yes |
startAt | The index of the first user to return. | Yes |
Sample configuration
<jira.getUserAssignableProjects>
<projectKeys>{$ctx:projectKeys}</projectKeys>
<usernameForSearch>{$ctx:usernameForSearch}</usernameForSearch>
<maxResults>{$ctx:maxResults}</maxResults>
<startAt>{$ctx:startAt}</startAt>
</jira.getUserAssignableProjects>
Sample request
The following is a sample request that can be handled by the getUserAssignableProjects
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"projectKeys":"TEST",
"usernameForSearch":"fred"
}
Sample response
Given below is a sample response for the getUserAssignableProjects
operation.
[
{
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
}
..
]
setActorsToRoleOfProject
To assign one or more users to a specific role in a project, use setActorsToRoleOfProject
with the project key and role ID. You need to specify the users in the payload. You can specify individual users or groups.
Parameter Name | Description | Required |
---|---|---|
projectIdOrKey | The identifier of the project to which users should be asssigned. | Yes |
roleId | Identifies the user role to which users should be assigned. | Yes |
roles | The users who you want to assign. | Yes |
Sample configuration
<jira.setActorsToRoleOfProject>
<projectIdOrKey>{$ctx:projectIdOrKey}</projectIdOrKey>
<roleId>{$ctx:roleId}</roleId>
<roles>{$ctx:roles}</roles>
</jira.setActorsToRoleOfProject>
Sample request
The following is a sample request that can be handled by the setActorsToRoleOfProject
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"projectIdOrKey":"TEST",
"projectKey":"JAF",
"roleId":"10360",
"roles":{"user" :["James"]}
}
Sample response
Given below is a sample response for the setActorsToRoleOfProject
operation.
{
"self": "http://localhost:8080/jira/rest/api/2/project/MKY/role/10360",
"name": "Developers",
"id": 10360,
"description": "A project role that represents developers in a project",
"actors": [
...
]
}
searchJira
To get an existing issue, use searchJira
with the JQL query.
Parameter Name | Description | Required |
---|---|---|
query | The JQL expression to use for finding issues. The query must include an ORDER BY clause. For more information, see the Jira documentation. | Yes |
maxResults | The maximum number of issues to return, up to 1000 (default is 50). | Optional |
startAt | The 0-based index of the first issue to return (default is 0). | Optional |
fields | Specifies a comma-separated list of fields to be included in the response. | Yes |
validateQuery | Specify whether to validate the JQL query. | Yes |
expand | A comma-separated list of parameters to expand. | Yes |
Sample configuration
<jira.C>
<query>{$ctx:query}</query>
<maxResults>{$ctx:maxResults}</maxResults>
<startAt>{$ctx:startAt}</startAt>
<fields>{$ctx:fields}</fields>
<validateQuery>{$ctx:validateQuery}</validateQuery>
<expand>{$ctx:expand}</expand>
</jira.searchJira>
Sample request
The following is a sample REST/JSON request that can be handled by the searchJira
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"query":"text~\"issue2\""
}
Sample response
Given below is a sample response for the searchJira
operation.
{
"expand": "names,schema",
"startAt": 0,
"maxResults": 50,
"total": 1,
"issues": [
{
"expand": "",
"id": "10001",
"self": "http://localhost:8080/jira/rest/api/2/issue/10001",
"key": "HSP-1"
}
]
}
getUser
To get information about a specified user, use getUser
and specify the username.
Parameter Name | Description | Required |
---|---|---|
usernameFilter | Identifies the user whose information you want to get. | Yes |
key | The user key. | Yes |
Sample configuration
<jira.getUser>
<usernameFilter>{$ctx:usernameFilter}</usernameFilter>
<key>{$ctx:key}</key>
</jira.getUser>
Sample request
The following is a sample REST/JSON request that can be handled by the getUser
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"usernameFilter":"fred"
}
Sample response
Given below is a sample response for the getUser
operation.
{
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"emailAddress": "fred@example.com",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": true,
"timeZone": "Australia/Sydney",
"groups": {
"size": 3,
"items": []
}
}
getUserPermissions
To get information on the current user's permissions, use getUserPermissions
. You can optionally provide a specific context for which you want to get permissions (projectKey, projectId, issueKey, or issueId).
Parameter Name | Description | Required |
---|---|---|
projectKey/projectId | Identifies the project for which you want to determine the current user's permissions. | Yes |
issueKey/issueId | Identifies the issue for which you want to determine the current user's permissions. | Yes |
Sample configuration
<jira.getUserPermissions>
<projectKey>{$ctx:projectKey}</projectKey>
<projectId>{$ctx:projectId}</projectId>
<issueKey>{$ctx:issueKey}</issueKey>
<issueId>{$ctx:issueId}</issueId>
</jira.getUserPermissions>
Sample request
The following is a sample REST/JSON request that can be handled by the getUserPermissions
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"projectKey":"TEST"
}
Sample response
Given below is a sample response for the getUserPermissions
operation.
{
"permissions": {
"EDIT_ISSUE": {
"id": "12",
"key": "EDIT_ISSUE",
"name": "Edit Issues",
"description": "Ability to edit issues.",
"havePermission": true
}
}
}
searchUser
To search for users whose username, name, or email address match a search string, use searchUser
with a search string.
Parameter Name | Description | Required |
---|---|---|
usernameForSearch | The search string used to search the username, name, or email address. | Yes |
startAt | The 0-based index of the first user to return (default is 0). | Optional |
maxResults | The maximum number of users to return, up to 1000 (default is 50). | Optional |
includeActive | Whether to return active users (default is true). | Optional |
includeInactive | Whether to return inactive users (default is false). | Optional |
Sample configuration
<jira.searchUser>
<usernameForSearch>{$ctx:usernameForSearch}</usernameForSearch>
<startAt>{$ctx:startAt}</startAt>
<maxResults>{$ctx:maxResults}</maxResults>
<includeActive>{$ctx:includeActive}</includeActive>
<includeInactive>{$ctx:includeInactive}</includeInactive>
</jira.searchUser>
Sample request
The following is a sample REST/JSON request that can be handled by the searchUser
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"usernameForSearch":"fred"
}
Sample response
Given below is a sample response for the searchUser
operation.
[
{
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
}
]
searchIssueViewableUsers
To search for users whose username, name, or email address match a search string and have permission to view the specified issue or project, use searchIssueViewableUsers
. You need to specify the search string and issue key or project key.
Parameter Name | Description | Required |
---|---|---|
username | The search string used to search the username, name, or email address. | Yes |
issueKey | Identifies the issue that users must have permission to view. This issue will be included in the results. | Yes |
projectKey | If you want to search for users who can browse a project instead of a specific issue, specify projectKey instead of issueKey. | Yes |
startAt | The 0-based index of the first user to return (default is 0). | Optional |
maxResults | The maximum number of users to return, up to 1000 (default is 50). | Optional |
Sample configuration
<jira.searchIssueViewableUsers>
<usernameForSearch>{$ctx:usernameForSearch}</usernameForSearch>
<issueKey>{$ctx:issueKey}</issueKey>
<projectKey>{$ctx:projectKey}</projectKey>
<startAt>{$ctx:startAt}</startAt>
<maxResults>{$ctx:maxResults}</maxResults>
</jira.searchIssueViewableUsers>
Sample request
The following is a sample REST/JSON request that can be handled by the searchIssueViewableUsers operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"usernameForSearch":"fred",
"projectKey":"TEST"
}
Sample response
Given below is a sample response for the searchIssueViewableUsers
operation.
[
{
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
}
]
searchAssignableUser
To search for users whose username, name, or email address match a search string and can be assigned to a specific issue, use searchAssignableUser
. You specify the search string and either the project key (if you are getting users for a new issue you are creating) or the issue key (if you are getting users for an existing issue you are editing).
Parameter Name | Description | Required |
---|---|---|
usernameForSearch | The search string used to search the username, name, or email address. | Yes |
issueKey | Identifies the issue that users must have permission to view. This issue will be included in the results. | Yes |
project | Identifies the project in which you are creating a new issue and want to get a list of users who can be assigned to it. | Yes |
issueKey | Identifies the issue you are editing so that you can get a list of users who can be assigned to it. | Yes |
startAt | The 0-based index of the first user to return (default is 0). | Optional |
maxResults | The maximum number of users to return, up to 1000 (default is 50). | Optional |
actionDescriptorId | The id of the workflow action. | Optional |
Sample configuration
<jira.searchAssignableUser>
<usernameForSearch>{$ctx:usernameForSearch}</usernameForSearch>
<project>{$ctx:project}</project>
<issueKey>{$ctx:issueKey}</issueKey>
<startAt>{$ctx:startAt}</startAt>
<maxResults>{$ctx:maxResults}</maxResults>
<actionDescriptorId>{$ctx:actionDescriptorId}</actionDescriptorId>
</jira.searchAssignableUser>
Sample request
The following is a sample REST/JSON request that can be handled by the searchAssignableUser
operation.
{
"username":"admin",
"password":"jira@jaffna",
"uri":"http://localhost:8080",
"projectKey":"TEST"
}
Sample response
Given below is a sample response for the searchAssignableUser
operation.
{
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"emailAddress": "fred@example.com",
"avatarUrls": {
"24x24": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://localhost:8080/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://localhost:8080/jira/secure/useravatar?size=medium&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": true,
"timeZone": "Australia/Sydney",
"groups": {
"size": 3,
"items": []
}
}
getAttachmentById
This operation retrieves the metadata for an attachment, including the URL of the actual attached file.
Parameter Name | Description | Required |
---|---|---|
attachmentId | The ID to view the meta data of the attachment. | Yes |
Sample configuration
<jira.getAttachmentById>
<attachmentId>{$ctx:attachmentId}</attachmentId>
</jira.getAttachmentById>
Sample request
Following is a sample REST/JSON request that can be handled by the getAttachmentById
operation.
{
"uri": "http://localhost:8080",
"username": "admin",
"password": "1qaz2wsx@",
"attachmentId": "10000"
}
Sample response
Given below is a sample response for the getAttachmentById
operation.
{
"self": "http://localhost:8080/rest/api/2/attachment/10000",
"filename": "31714367_1982813478396639_3541297709187072000_n.jpg",
"author": {
"self": "http://localhost:8080/rest/api/2/user?username=admin",
"key": "admin",
"name": "admin",
"avatarUrls": {
"48x48": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=48",
"24x24": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=24",
"16x16": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=16",
"32x32": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=32"
},
"displayName": "admin@gmail.com",
"active": true
},
"created": "2018-12-09T22:59:08.690+0530",
"size": 45364,
"mimeType": "image/jpeg",
"properties": {},
"content": "http://localhost:8080/secure/attachment/10000/31714367_1982813478396639_3541297709187072000_n.jpg",
"thumbnail": "http://localhost:8080/secure/thumbnail/10000/_thumb_10000.png"
}
getAttachmentContent
This operation retrieves the content of an attachment.
Parameter Name | Description | Required |
---|---|---|
attachmentUrl | The URI of the attached file. | Yes |
fileType | Type of the attachment. | Yes |
Sample configuration
<jira.getAttachmentContent>
<attachmentUrl>{$ctx:attachmentUrl}</attachmentUrl>
<fileType>{$ctx:fileType}</fileType>
</jira.getAttachmentContent>
Sample request
The following is a sample REST/JSON request that can be handled by the getAttachmentContent operation.
{
"uri": "http://localhost:8080",
"username": "admin",
"password": "1qaz2wsx@",
"attachmentUrl": "http://localhost:8080/secure/attachment/10000/31714367_1982813478396639_3541297709187072000_n.jpg",
"fileType":"image/jpg"
}
Sample response
You will get 200 response code with the attached image as a response.
createComponent
The createComponent
operation creates a component.
Parameter Name | Description | Required |
---|---|---|
name | The name of the component. | Yes |
project | The key of the project to which the component should be belong. | Yes |
description | The description for the component. | Yes |
leadUserName | The key of the lead user name. | Yes |
assigneeType | The type of the assignee. | Yes |
isAssigneeTypeValid | A boolean, which specifies whether or not the assignee type is valid. | Yes |
Sample configuration
<jira.createComponent>
<name>{$ctx:name}</name>
<project>{$ctx:project}</project>
<description>{$ctx:description}</description>
<leadUserName>{$ctx:leadUserName}</leadUserName>
<assigneeType>{$ctx:assigneeType}</assigneeType>
<isAssigneeTypeValid>{$ctx:isAssigneeTypeValid}</isAssigneeTypeValid>
</jira.createComponent>
Sample request
The following is a sample REST/JSON request that can be handled by the createComponent
operation.
{
"uri": "http://localhost:8080",
"username": "admin",
"password": "1qaz2wsx@",
"name": "testing component1",
"project": "TESTPM1",
"description": "test description",
"leadUserName": "admin",
"assigneeType": "PROJECT_LEAD",
"isAssigneeTypeValid": "false"
}
Sample response
Given below is a sample response for the createComponent
operation.
{
"self": "http://localhost:8080/jira/rest/api/2/component/10000",
"id": "10000",
"name": "Component 1",
"description": "This is a JIRA component",
"lead": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"16x16": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
"assigneeType": "PROJECT_LEAD",
"assignee": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"16x16": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
"realAssigneeType": "PROJECT_LEAD",
"realAssignee": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"16x16": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
"isAssigneeTypeValid": false
}
getComponent
The getComponent
operation retrieves a project component.
Parameter Name | Description | Required |
---|---|---|
componentId | The unique identifier for a particular component. | Yes |
Sample configuration
<jira.getComponent>
<componentId>{$ctx:componentId}</componentId>
</jira.getComponent>
Sample request
The following is a sample REST/JSON request that can be handled by the getComponent
operation.
{
"uri": "http://localhost:8080",
"username": "admin",
"password": "1qaz2wsx@",
"componentId": "10000"
}
Sample response
Given below is a sample response for the getComponent
operation.
{
"self": "http://localhost:8080/jira/rest/api/2/component/10000",
"id": "10000",
"name": "Component 1",
"description": "This is a JIRA component",
"lead": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"16x16": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
"assigneeType": "PROJECT_LEAD",
"assignee": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"16x16": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
"realAssigneeType": "PROJECT_LEAD",
"realAssignee": {
"self": "http://localhost:8080/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"16x16": "http://localhost:8080/jira/secure/useravatar?size=small&ownerId=fred",
"48x48": "http://localhost:8080/jira/secure/useravatar?size=large&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
"isAssigneeTypeValid": false
}
updateComponent
The updateComponent
operation modifies a component.
Parameter Name | Description | Required |
---|---|---|
componentId | The unique identifier for a particular component. | Yes |
name | The name of the component. | Yes |
description | The description for the component. | Yes |
leadUserName | The key of the lead username. | Yes |
assigneeType | The type of the assignee. | Yes |
isAssigneeTypeValid | A boolean, which specifies whether or not the assignee type is valid. | Yes |
Sample configuration
<jira.updateComponent>
<componentId>{$ctx:componentId}</componentId>
<name>{$ctx:name}</name>
<description>{$ctx:description}</description>
<leadUserName>{$ctx:leadUserName}</leadUserName>
<assigneeType>{$ctx:assigneeType}</assigneeType>
<isAssigneeTypeValid>{$ctx:isAssigneeTypeValid}</isAssigneeTypeValid>
</jira.updateComponent>
Sample request
The following is a sample REST/JSON request that can be handled by the updateComponent
operation.
{
"uri": "http://localhost:8080",
"username": "admin",
"password": "1qaz2wsx@",
"componentId": "10000",
"name": "testing component1",
"description": "test description",
"leadUserName": "admin",
"assigneeType": "PROJECT_LEAD",
"isAssigneeTypeValid": "false"
}
Sample response
Given below is a sample response for the updateComponent
operation.
{
"self": "http://localhost:8080/rest/api/2/component/10000",
"id": "10000",
"name": "testing component1",
"description": "test description",
"lead": {
"self": "http://localhost:8080/rest/api/2/user?username=admin",
"key": "admin",
"name": "admin",
"avatarUrls": {
"48x48": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=48",
"24x24": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=24",
"16x16": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=16",
"32x32": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=32"
},
"displayName": "admin@gmail.com",
"active": true
},
"assigneeType": "PROJECT_LEAD",
"assignee": {
"self": "http://localhost:8080/rest/api/2/user?username=admin",
"key": "admin",
"name": "admin",
"avatarUrls": {
"48x48": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=48",
"24x24": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=24",
"16x16": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=16",
"32x32": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=32"
},
"displayName": "admin@gmail.com",
"active": true
},
"realAssigneeType": "PROJECT_LEAD",
"realAssignee": {
"self": "http://localhost:8080/rest/api/2/user?username=admin",
"key": "admin",
"name": "admin",
"avatarUrls": {
"48x48": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=48",
"24x24": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=24",
"16x16": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=16",
"32x32": "https://www.gravatar.com/avatar/9f2ee74106e4d9afc58bb796a0895908?d=mm&s=32"
},
"displayName": "admin@gmail.com",
"active": true
},
"isAssigneeTypeValid": true,
"project": "KANA",
"projectId": 10000
}
countComponentRelatedIssues
The countComponentRelatedIssues
operation retrieves counts of issues related to this component.
Parameter Name | Description | Required |
---|---|---|
componentId | The unique identifier for a particular component. | Yes |
Sample configuration
<jira.countComponentRelatedIssues>
<componentId>{$ctx:componentId}</componentId>
</jira.countComponentRelatedIssues>
Sample request
The following is a sample REST/JSON request that can be handled by the countComponentRelatedIssues
operation.
{
"uri": "http://localhost:8080",
"username": "admin",
"password": "1qaz2wsx@",
"componentId": "10000"
}
Sample response
Given below is a sample response for the searchIssueViewableUsers
operation.
{
"self": "http://localhost:8080/jira/rest/api/2/component/10000",
"issueCount": 23
}
createIssueLink
The createIssueLink
operation creates an issue link between two issues.
Parameter Name | Description | Required |
---|---|---|
typeName | Name of the issue type. | Yes |
inwardIssueKey | Key of the inward issue. | Yes |
outwardIssueKey | Key of the outward issue. | Yes |
commentBody | Body of the comment. | Yes |
commentVisibility | Visibility of the comment. | Yes |
Sample configuration
<jira.createIssueLink>
<typeName>{$ctx:typeName}</typeName>
<inwardIssueKey>{$ctx:inwardIssueKey}</inwardIssueKey>
<outwardIssueKey>{$ctx:outwardIssueKey}</outwardIssueKey>
<commentBody>{$ctx:commentBody}</commentBody>
<commentVisibility>{$ctx:commentVisibility}</commentVisibility>
</jira.createIssueLink>
Sample request
The following is a sample REST/JSON request that can be handled by the createIssueLink
operation.
{
"uri": "http://localhost:8080",
"username": "admin",
"password": "1qaz2wsx@",
"typeName": "Duplicate",
"inwardIssueKey": "TESTPM1-1",
"outwardIssueKey": "TESTPM1-2",
"commentBody": "Linked related issue!",
"commentVisibility": {
"type": "group",
"value": "jira-users"
}
}
Sample response
As a successful response, you will get 201 status code without any response body.
getIssueLinkById
The getIssueLinkById
operation retrieves an issue link with the specified ID.
Parameter Name | Description | Required |
---|---|---|
linkId | The issue link ID. | Yes |
Sample configuration
<jira.getIssueLinkById>
<linkId>{$ctx:linkId}</linkId>
</jira.getIssueLinkById>
Sample request
The following is a sample REST/JSON request that can be handled by the getIssueLinkById
operation.
{
"uri": "http://localhost:8080",
"username": "admin",
"password": "1qaz2wsx@",
"linkId": "10000"
}
Sample response
Given below is a sample response for the getIssueLinkById
operation.
{
"id": "10000",
"self": "http://localhost:8080/rest/api/2/issueLink/10000",
"type": {
"id": "10002",
"name": "Duplicate",
"inward": "is duplicated by",
"outward": "duplicates",
"self": "http://localhost:8080/rest/api/2/issueLinkType/10002"
},
"inwardIssue": {
"id": "10002",
"key": "KANA-3",
"self": "http://localhost:8080/rest/api/2/issue/10002",
"fields": {
"summary": "New task",
"status": {
"self": "http://localhost:8080/rest/api/2/status/10000",
"description": "",
"iconUrl": "http://localhost:8080/",
"name": "To Do",
"id": "10000",
"statusCategory": {
"self": "http://localhost:8080/rest/api/2/statuscategory/2",
"id": 2,
"key": "new",
"colorName": "blue-gray",
"name": "To Do"
}
},
"priority": {
"self": "http://localhost:8080/rest/api/2/priority/3",
"iconUrl": "http://localhost:8080/images/icons/priorities/medium.svg",
"name": "Medium",
"id": "3"
},
"issuetype": {
"self": "http://localhost:8080/rest/api/2/issuetype/10003",
"id": "10003",
"description": "A task that needs to be done.",
"iconUrl": "http://localhost:8080/secure/viewavatar?size=xsmall&avatarId=10318&avatarType=issuetype",
"name": "Task",
"subtask": false,
"avatarId": 10318
}
}
},
"outwardIssue": {
"id": "10001",
"key": "KANA-2",
"self": "http://localhost:8080/rest/api/2/issue/10001",
"fields": {
"summary": "Framework IMplementation",
"status": {
"self": "http://localhost:8080/rest/api/2/status/10000",
"description": "",
"iconUrl": "http://localhost:8080/",
"name": "To Do",
"id": "10000",
"statusCategory": {
"self": "http://localhost:8080/rest/api/2/statuscategory/2",
"id": 2,
"key": "new",
"colorName": "blue-gray",
"name": "To Do"
}
},
"priority": {
"self": "http://localhost:8080/rest/api/2/priority/3",
"iconUrl": "http://localhost:8080/images/icons/priorities/medium.svg",
"name": "Medium",
"id": "3"
},
"issuetype": {
"self": "http://localhost:8080/rest/api/2/issuetype/10003",
"id": "10003",
"description": "A task that needs to be done.",
"iconUrl": "http://localhost:8080/secure/viewavatar?size=xsmall&avatarId=10318&avatarType=issuetype",
"name": "Task",
"subtask": false,
"avatarId": 10318
}
}
}
}
Sample configuration in a scenario¶
The following is a sample proxy service that illustrates how to connect to the Jira connector and use the getDashboardById operation to get dashboard details. You can use this sample as a template for using other operations in this category.
Sample Proxy
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="getDashboardById"
transports="https http"
startOnLoad="true"
trace="disable">
<description/>
<target>
<inSequence>
<property name="username" expression="json-eval($.username)"/>
<property name="password" expression="json-eval($.password)"/>
<property name="uri" expression="json-eval($.uri)"/>
<property name="id" expression="json-eval($.id)"/>
<jira.init>
<username>{$ctx:username}</username>
<password>{$ctx:password}</password>
<uri>{$ctx:uri}</uri>
</jira.init>
<jira.getDashboardById>
<id>{$ctx:id}</id>
</jira.getDashboardById>
<log level="full"/>
<respond/>
</inSequence>
<outSequence/>
<faultSequence/>
</target>
</proxy>
Note: For more information on how this works in an actual scenario, see Jira Connector Example.
Top