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?
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
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.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.