Version: Edit on GitHub

Asset Queries

Asset queries support getting single assets, single asset folders and asset listings.

Get single Asset

Base structure for getting single asset:

{
  getAsset(id: 4) {
  ...
  }
} 
    

See also following examples:

Get single AssetFolder

Base structure for getting single asset folder (same as for assets):

{
  getAssetFolder(id: 4) {
  ...
  }
} 
    

Get list of Assets

Base structure for getting a list of assets, restricted by IDs:

{
  getAssets(ids: "4,5") {
    edges {
    ...

See also following examples:

Pagination

Pagination can be applied as query parameters.

{
  # 'first' is the limit
  # 'after' the offset
  getAssets(first: 3, after: 1) {
    edges {
      ...
    }
  }
}

Simple Sorting

Sorting can be applied as query parameters, for example sort by filename, descending.

{
  getManufacturerListing(sortBy: "filename", sortOrder: "DESC") {
    edges {
      node {
        id
        name
      }
    }
  }
}

Filtering

You can use Pimcore's webservice filter logic as described here for filtering listing requests.

For details see filtering documentation page

Localization of Queries

Queries can be localized For details see the localization documentation page.