Skip to main content
Solved

Catalog Items Associated with a Policy

  • April 4, 2025
  • 1 reply
  • 48 views

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 

Best answer by anna.spakova

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

1 reply

anna.spakova
Ataccamer
Forum|alt.badge.img+3
  • Ataccamer
  • Answer
  • April 7, 2025

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