Skip to main content

Hello, 

Is there any way I can pull a list of catalog items that have been associated with a policy via graphQL given the policy gid? If not, is there another way I can access such a list ? The Policy is a data usage license agreement that is an array or references on ONE Desktop’s metadata reader. 

Thanks,

Karine 

Hello ​@karine.davtyan,

 

I believe you can use a query like this:

query GetCatalogItems {
catalogItems(versionSelector: {draftVersion: true}, filter: "policies.any($id='<your id>'") {
edges {
node {
gid
draftVersion{
name
}
}
}
}
}

The “policies” should be the name of that Array of referenced object property in your metadata model. You can test your query first in the Catalog under All → AQL Search:

You can find more about the AQL filters for object properties here:https://docs.ataccama.com/one/latest/common-actions/aql-expressions.html#array-property-conditions

Let me know if this helps.

Kind regards,

Anna


Reply