The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Call new Insight JSM rest api

Folino
August 3, 2021

Hello
I’ve been trying to follow the explaination to make rest api in new JSM Insight as described here
https://developer.atlassian.com/cloud/insight/intro/introduction-and-basics/

I’ve achieved to get the workspaceId as i put on the code

base_url = "https://mybaseUrl.net"
workSpace = "/rest/servicedeskapi/insight/workspace"
headers = {"Accept":"application/json","X-ExperimentalApi" : "opt-in"}
auth = HTTPBasicAuth("simone.folino@sourcesense.com","****************")
workspace2 = json.loads(requests.get(f"{base_url}{workSpace}",headers=headers,auth=auth).text)
workspaceId = workspace2['values'][0]['workspaceId']
# Out[103]: 'my workspaceId'
icon_rest = f"/jsm/insight/workspace/{workspaceId}/v1/icon/global"
requests.get(f"{base_url}{icon_rest}",headers={"Accept":"application/json"}).text

However, when I try to call the /jsm/insight/workspace/{workspaceId}/v1/icon/global it gives me a dead link.
Am Idoing something wrong?

Thank you in Advance,
Simone

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Victor Tseng
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 11, 2021

Hi @Folino

We are also hitting this issue when we try to use the REST API in Cloud version of Insight. BTW the API URL structure looks different from the DC/Server version. Hopefully there could be some more details about how exactly these URL paths should be...

TAGS
AUG Leaders

Atlassian Community Events