Forums

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

Insight REST API with JSM Data Center

Couraillon Theo July 12, 2022

Hello, 

 

I am trying to use the Insight REST API for Jira Service Management (Data Center) in order to get the value of some attributes of my objects, but I can't find the right URL to use.

This documentation REST API documentation says to use the following URL: 

https://jira/rest/insight/{version}

While this documentation Insight REST API says to use the following URL: 

https://host:port/context/rest/insight/api-version/resource-name

Also, before when I was using the cloud version of JSM, I used this link to create an authentication token and then use it as follows:

curl --user <user_email_address>:<user_token> --request GET --url 'https://<domain>.atlassian.net/rest/servicedeskapi/insight/workspace' --header 'Accept: application/json' 

But I don't quite understand how the authentication is done with the Data Center version. Could you please help me?


Thank you, 

Théo.
 

2 answers

0 votes
Couraillon Theo July 27, 2022

Hello Peter-Dave, 

I finally managed to use the API by creating a Personal Access Tokens and by using:

curl -H "Content-Type: application/json" -H "Authorization: Bearer xxxxxxxxxxxxxx" https://jirahost/rest/insight/1.0/objectschema/list 

Thank you.
Théo.



0 votes
PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2022

You should find all information about authenticating to Server/Data center here: https://developer.atlassian.com/server/jira/platform/security-overview/

This will be true regardless of whether you are accessing Jira or Insight api.

If you are configured for using SAML either using DC or server with third party plugin, basic authentication with the user's password may not work. You may need to use API tokens instead.

As far as the URL, you should be able to get attributes for an object like this:

https://jirahost/context/rest/insight/latest/object/<objectid>

I don't know if there is a more recent version, but I still occasionally consult this page: https://insight-javadoc.riada.io/insight-javadoc-8.6/insight-rest/  (the certificate is expired)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events