URL when getting aditional data for JSM customers


I have built some extensions to our JSM portal to display aditional data for our end users.
The api used to fetch data is this: https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization/#api-rest-servicedeskapi-organization-organizationid-user-get and it works as expected.

When we activated the new CRM function in JSM the jiraRest url in the response is to api.atlassian.com/ex/
How can I follow that url in Forge to fetch aditional data. I have tried both JiraRequest and manual fetch but without any luck…

        "accountId": "abc123",
        "displayName": "User Name",
        "active": true,
        "timeZone": "Europe/Stockholm",
        "_links": {
            "jiraRest": "https://api.atlassian.com/ex/jira/1235/rest/api/2/user?accountId=abc123",
            "self": "https://api.atlassian.com/ex/jira/1235/rest/api/2/user?accountId=abc123"

Hi @AntonDelitsch,

Would it be possible that instead of using the value from jiraRest, you do a REST API call to Get user? Given that you already have the accountId in the response, in your Forge app you can call something like,

requestJira(route`/rest/api/2/user?accountId=abc123 `, {
  headers: {
    'Accept': 'application/json'

Will this work for your use case?


Hi @iragudo,
After some more digging it seems like the correct api to use is this: https://developer.atlassian.com/cloud/customer-service-management/rest/v1/api-group-customer/#api-api-v1-customer-customerid-get

But even though I add those permissions to my forge app I am getting 401.

/ Anton

Hi @AntonDelitsch,

The REST API in jiraRest that you originally wanted to follow is the same as Get user except that the URI format returned was for OAuth 2.0. What is the specific information that your use case needs and does calling the Get user API suffice?

As for the CSM API you used, I am confirming with the team if it supports Forge apps. As far as I can tell, it only supports basic auth and OAuth 2.0.


Hi @iragudo

My goal was to get CSM data the reason why I asked the question was that this change in the response occured when we activated CSM.

But thanks for your input.

/ Anton

Hi @AntonDelitsch,

I confirmed with the team who is more knowledgeable about CSM REST APIs and have confirmed that these APIs do not support Forge yet.

1 Like