Forums

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

Jira Assets Api - Parent object type references.

Michael Frade
Contributor
April 24, 2025

Have an abstract parent object type. Will call it object type A.  Child object types of A are object types B and C which have objects in them respectively.  There is another object type M that as an attribute which references the parent Object type A and has the setting to include children turned on.  No issues within Jira of making the needed connections.

Running into an issue with an API in trying to reference the objects from M.  The API uses the objecttypeid of object type A in it's query and is not able to find the objects which are in Object types B and C.  Is there anyway the Post query should be structured to find the objects in the children object types B and C?

 

1 answer

0 votes
Raphael Lopes
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 25, 2025

Hello @Michael Frade 

Welcome to the Community,

This is a great question and a common point of confusion when working with object type inheritance in Jira Assets (formerly Insight), especially when using the Assets REST API.

 

Scenario

  • You have an abstract object type A.
  • B and C are child object types that inherit from A.
  • Another object type M has an attribute referencing object type A, with "Include child object types" enabled.
  • In the Jira UI, this works perfectly — objects of B and C can be selected via the reference to A.

However, when querying via the Assets REST API, using the objectTypeId of A in your request does not return objects of types B and C.

 

Why this happens

The "Include child object types" option works only in the Jira UI, but not automatically in the API.

When using the /navlist API with objectTypeId, the API strictly returns objects of that object type only — it does not expand to children.

 

Example:

POST /jsm/assets/workspace/{workspaceId}/v1/object/navlist

{
"objectTypeId": 123, // ID of type A
"query": {
"conditions": [...]
}
}

→ This will only return objects of type A, not B or C.

 

How to solve this
You have two main options depending on the API you're using:

Option 1: Make multiple API calls for child types
Get the objectTypeId for B and C, and call the /navlist endpoint separately for each type. Then merge the results in your application logic.

Option 2: Use the AQL API with objectType in ("B", "C")
Instead of using the objectType-based endpoint, switch to the AQL-based object search API

GET /jsm/assets/workspace/{workspaceId}/v1/object/aql?query=objectType in ("B", "C")

 

You can also filter by the object reference in M, like:

"Referenced field to A" = M-123


If the reference field has "include children" enabled, this AQL will correctly match objects of B and C, even via API.

Recommendation
If your goal is to retrieve objects from B and C through the relationship with A, AQL via the object search API is the most flexible and reliable approach.

 

I hope help you.

 

Regards.

Suggest an answer

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

Atlassian Community Events