Insight REST Call to get Object data

Sebastian Langer December 14, 2018

Hello

I currently try to integrate CloudForms with Ansible with Jira or rather Insight running in Jira.

Use Case:

I created an object type called "T-Shirt Sizes". The object type contains around 10 attributes for instance number of CPUs or Memory.

The I created some objects for that type and maintained the attributes accordingly. 

Via REST I want to call Insight now and retrieve all T-Shirt size objects with their attributes.

Issue 1:

Firstly the response is pretty difficult to read. Is there an easy way to get a kind of JSON formatted response?

Issue 2:

I can only call the object type T-Shirt size and will get the available objects. But then I would need to trigger another call per object to retrieve the attributes. As we have around 60 T-Shirt sizes, I would call Jira / Insight 61 times. First the object type to get all object IDs. And then per object ID to get the accordant attributes.

Is there not a better way to handle this in one shot?

Thanks and Regards

Sebastian

1 answer

1 vote
Yinon Negev
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.
December 14, 2018

Hi Sebastian.

     Thank you for clarifying the Use Case.

I think you might benefit from using the REST Call:

POST: /rest/insight/1.0/object/navlist/iql 

Documented under "Find Objects (Advanced)" in our documentation.

The response will include All Objects according to your POSTed JSON and IQL, including Attributes and their respective Values.

Please let us know if you require additional information.

Kind regards,

Yinon

Team Riada

Mik Wawrzyniak April 12, 2019

Hi Yinon!

Regarding to you answer...

I would like also ask that is there any access ( via REST) to list of saved "quick search" ?

Unfortunately, I did not find it in the documentation.

Regards,

Mik

Yinon Negev
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.
April 12, 2019

Hi Mik.

    In order to execute a Quick search, you should be calling an IQL REST API, and for your IQL parameter - indicate: "anyAttribute LIKE \"your search string\""

(click the Hyperlincs for more infomation :) )

Kind regards,

Yinon

Mik Wawrzyniak April 12, 2019

Hi Yinon,

Thanks a lot for quick answer!
I think you we misunderstood. Sorry if I explained this not enough.
I made some researching and found this (in the chrome console):
/rest/insight-am/1/filters
I need to get a list of saved filters.

Kind regards,

Mik

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events