Hi everyone,
I’m working with Jira Assets on a Data Center instance and I’m trying to run an AQL search that returns all objects related to a specific “Location” object, regardless of which object schema they belong to.
Example: I want to find every object that is linked to the Location with objectId = 744.
I expected something like this to work:
object having inboundReferences(objectId = 744)or
objectSchema != EMPTY AND object having inboundReferences(objectId = 744)However, when I run this from within a specific object schema, the query returns nothing. It looks like the search is being limited to the currently selected schema, even when the AQL itself does not specify one.
My question:
Is it possible in Jira Assets Data Center to perform an AQL search globally, across multiple object schemas?
If so, where exactly should I run the search, and does the AQL syntax change in this case?
Thanks in advance for any help or clarification!
Hello @Ismael ,
In Jira Assets (Data Center), AQL queries are always scoped to a single object schema and cannot be run globally.
To search across schemas, first list all object schemas using /rest/insight/1.0/objectschema/list, then execute the same AQL query for each schema by passing its objectSchemaId to the Assets AQL REST API. Loop through the schemas and aggregate the results in your code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ismael
Yes you can, if the schema settings have been set with a check at the option "Allow others to select objects from this schema"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ismael
I was wrong, as mentioned by @Madhumitha N this is only possible in Cloud.
There is an open feature request for this on DC, JSDSERVER-15338
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.