/
How-to get insight attribute value
How-to get insight attribute value
One common thing is to get the value of an attribute in insight. In this example we will get an array for objects by providing a IQL and get the attribute value of each item.
https://documentation.mindville.com/display/ICV8/IQL+-+REST
Get insight data
- Add a new action in iHub (use the application/json template)
- Set method to GET with URL: {{baseUrl}}/rest/insight/1.0/iql/objects?objectSchemaId=REPLACE_WITH_SCHEMA_ID&iql=REPLACE_WITH_IQL
Not you can use space and = sign in the URL it will be auto converted to URL Encoded. - Investigate the response, the attributes are stored in the attributes list of each object. And the IQL will return a list of objects in objectsEntries.
- Create a Iteration child under the GET insight data action
- Add the json path $.objectsEntries
This will loop through all entries in the list of objectsEntries - Create an Action under the Iteration that will use each object as input.
- Make sure to select Auto-generate 1st level as variables from parent response
- Assign the attribute to a JSON Path variabel by adding a name and the path as shown below.
$.attributes[?(@.objectTypeAttributeId==29944)].objectAttributeValues[0].value
Make sure to exchange the objectTypeAttributeId 29944 to the one you want.
, multiple selections available,
Related content
How to send Insight custom field data
How to send Insight custom field data
More like this
How to create an issue with insight data
How to create an issue with insight data
More like this
Create an Object on transition
Create an Object on transition
More like this
Set JIRA approvers field from Insight Object attribute
Set JIRA approvers field from Insight Object attribute
More like this
Iteration - iterate over parent response
Iteration - iterate over parent response
More like this
Update Insight Object on Issue change
Update Insight Object on Issue change
More like this