How can I limit attributes returned on an IQL API Call?

Mathew Lederman
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.
May 23, 2023

Jira Datacenter v8.20.11 and JSM Version 4.20.11.

My current API call is https://[instance-name]/rest/insight/latest/iql/objects?objectSchemaId=6&typeId=59&iql="IP Phone" IN ("5555555555")

I only want to pull the first name, last name, and email address associated with this IP Phone Number rather than the 1078 rows that are returned currently. 

I tried the includeAttributes documented in later versions of the Assets API but I'm not sure if it's supported in earlier versions.

Use Case: We're trying to connect a smart IVR system to JSM so we can pull back information about the user as quickly as possible. The goal is to return the fewest rows of data possible while still containing the necessary data.

1 answer

0 votes
Gordon S May 23, 2023

Hi Mathew,

 

iql is deprecated - btw. Maybe this helps: https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-aql-post

It has an maxResults Parameter.

Otherwise the query could be more precised to only target 1 Object - why "IN ("5555555555")"?

Regards

 

//Edit: just read the Datacenter Part...don´t know if thats belongs also in this environment

Mathew Lederman
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.
May 23, 2023

@Gordon S thanks for the recommendation I'll take a look at the Assets API. The desire is to return certain attributes for a single user when passing in their phone number rather than their entire LDAP record of ~1k rows of data.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events