Forums

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

Using the API and AQL I am trying to get Assets filter by a custom attribute

Carsten Johannesen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 19, 2026

I am using the REST API's AQL to get a list of all our Assets using the endpoint  v1/object/aql

and making a POST to it, for instance with AQL:

"objectSchema = AID AND name STARTSWITH  C"

But I am hitting the hard max. of 1000 items pr. query.

So I need to filter further. I know we have a custom field which signals if the assets is "obsolete" (we call the customfield "Udgået") but how do I extend the AQL to include an " AND Udgået = no" ?

2 answers

1 accepted

3 votes
Answer accepted
Arkadiusz Wroblewski
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 Champions.
March 19, 2026

Hello @Carsten Johannesen 

I would try the AQL with the boolean value as true or false, not yes / no.

So in your case, something like this should be the right direction:

objectSchema = AID AND Name STARTSWITH "C" AND "Udgået" = false

If Udgået is a Boolean attribute, Assets expects Boolean values in that form. Also, because the attribute name contains a special character, I would keep it in quotes. Atlassian’s Assets docs describe Boolean attributes as true / false, and AQL supports filtering on attributes that way.

For the second part, I would not solve the 1000-object problem by splitting everything manually by first letter unless you really have to. The better approach is to paginate your API calls with startAt and maxResults on the AQL endpoint and loop through the result set. Atlassian documents POST /object/aql as paginated, and there is also a total-count endpoint if you want to know the full result size first.

2 votes
Marc -Devoteam-
Community Champion
March 19, 2026

Hi @Carsten Johannesen 

Your option can be if issues are linked to the assets to use connectedTickets(

connectedTickets(Udgaet = no))

Otherwise you will need to see if you can use other attributes on the objects you want to include, seek common ground there.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events