GET /api/associations
Before you start
Before you start working with REST APIs, make sure you have:
Set up your integration in Jira DC - connection, integration user, and binding.
For details, see Set up your integration in Jira DC.Associate a Salesforce Case record with a Jira work item
Get a Personal Access Token in Jira DC (User Avatar → Profile → Personal Access Tokens) and use it in a cURL.
For details, see Personal Access Tokens.
Endpoint: GET /api/associations?jiraIssueIdOrKey={}
Description
Retrieves all associations with Salesforce records for a specified Jira work item.
Query parameters
jiraIssueIdOrKey(string, required): The Jira work item ID, or key
Authentication setup
You have two authentication options:
With Personal Access Token (PAT) (recommended)
curl -X GET "https://your-jira-instance.com/rest/com.servicerocket.jira.salesforce/1.0/api/external/associations?jiraIssueIdOrKey=<jira work item id or key>" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <PAT>"With basic authentication
Use your Jira username and password (less secure, not recommended for production)
curl -X GET "https://your-jira-instance.com/rest/com.servicerocket.jira.salesforce/1.0/api/external/associations?jiraIssueIdOrKey=<jira work item id or key>" \
-u "login:password" \
-H "Content-Type: application/json"Response parameters
jiraIssueId(string, required): the Jira work item ID is the unique identifier of the Jira work item you want to associate.son(string, required): Salesforce object type name, for example,Case,Account,Contact.soid(string, required): Salesforce object ID for the specific record associated with the Jira work item.viewOnly(boolean, optional):truefor a view-only association.autoPush(boolean, optional):truefor automatic data push from Jira to Salesforce.autoPull(boolean, optional):truefor automatic data pull from Jira to Salesforce.
Example response
[
{
"jiraIssueId": "11816",
"son": "Case",
"soid": "500J80000019IF9IAM",
"viewOnly": false,
"autoPush": true,
"autoPull": true
},
{
"jiraIssueId": "11817",
"son": "Case",
"soid": "500J80107019IG9ILM",
"viewOnly": false,
"autoPush": false,
"autoPull": true
},
]
Need support? Create a request with our support team.
