Like for accessing Jira issues I use the following: https://smart-app.atlassian.net/rest/api/2/issue/20801 (smart-app is my cloud instance name). So, for fetching from Insights which is installed as an app Jira, what cloud instance name should be added prior to /rest/insight/1.0/object/ISCG-4? Also, should I use basic authentication? and use same email id as jira and use generate the access token for insights?
Hello @Subhodeep Das
welcome to the community!
To be able to use the API, first you need to generate your personal access token.
Then this token you will use in the Authorization header (Bearer token) of your requests.
To obtain data for specific object, you need to send GET request to URL:
https://insight-api.riada.io/rest/insight/1.0/object/ISCG-4
(see here - section Load)
Hello @Hana Kučerová Thank you so much for your help. I appreciate it. Do you also know the curl command for the same?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please try something like this (xxxxx needs to be replaced by your token):
curl 'https://insight-api.riada.io/rest/insight/1.0/object/ISCG-4' -H 'Authorization: Bearer xxxxx' -H 'Accept: application/json'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Hana Kučerová Thank you so much for your help. It is working now. I was using a ${} after bearer and so it was not working before. Just one last question for now. Right now we are fetching the data with object key. Is there any way, we can fetch this data using the object label instead of key? Thanks a ton. For all your help. I really appreciate it. :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Subhodeep Das ,
I think it is possible, you just need to provide appropriate IQL and search for the object.
(see here - section Find objects).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
Does this solution still working?
In my jira cloud instance, Insight lacks user token generation option. I've created a token from atlassian account.
Making cUrl to https://insight-api.irada.io/rest/insight/1.0/objectschema/list I get HTTP 401 with header Authorization: Bearer <mytoken>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just read your answer in this post and it has fixed my issues with a 404. I am on the cloud instance of Jira and I was using <my company>atlassian,net rather than insight-api.riada.io. Thank you so much!
Cheers
Nick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nicholas Mitchell , I'm happy to help. Have a nice day!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.