---
title: "Get assets."
method: POST
path: "/api/apps/{app}/assets/query"
tags: ["Assets"]
---

# Get assets.

`POST /api/apps/{app}/assets/query`

Get all assets for the app.

## Path parameters

- `app` string, required

## Headers

- `X-NoTotal` boolean
- `X-NoSlowTotal` boolean

## Request body

- QueryDto
  - `ids` string[], nullable — The optional list of ids to query.
  - `oData` string, nullable — The optional odata query.
  - `q` unknown
  - `parentId` string, nullable — The parent id (for assets).

## Response `200`

Assets returned.

- AssetsDto
  - `_links` object, required — The links.
  - `total` integer, required — The total number of assets.
  - `items` AssetDto[], required — The assets.
    - `_links` object, required — The links.
    - `id` string, required — The ID of the asset.
    - `parentId` string, required — The ID of the parent folder. Empty for files without parent.
    - `fileName` string, required — The file name.
    - `fileHash` string, nullable — The file hash.
    - `isProtected` boolean, required — True, when the asset is not public.
    - `slug` string, required — The slug.
    - `mimeType` string, required — The mime type.
    - `fileType` string, required — The file type.
    - `metadataText` string, required — The formatted text representation of the metadata.
    - `editToken` string, nullable — The UI token.
    - `metadata` object, required — The asset metadata.
    - `tags` string[], nullable — The asset tags.
    - `fileSize` integer, required — The size of the file in bytes.
    - `fileVersion` integer, required — The version of the file.
    - `type` 'Unknown' | 'Image' | 'Audio' | 'Video', required
    - `createdBy` string, required — The user that has created the schema.
    - `lastModifiedBy` string, required — The user that has updated the asset.
    - `created` string, date-time, required — The date and time when the asset has been created.
    - `lastModified` string, date-time, required — The date and time when the asset has been modified last.
    - `version` integer, required — The version of the asset.
    - `_meta` AssetMeta
      - `isDuplicate` string, required — Indicates whether the asset is a duplicate.
    - `isImage` boolean, required — Determines of the created file is an image.
    - `pixelWidth` integer, nullable — The width of the image in pixels if the asset is an image.
    - `pixelHeight` integer, nullable — The height of the image in pixels if the asset is an image.

## Other responses

- `400` — Validation error.
- `404` — App not found.
- `500` — Operation failed.

---

[API](https://skmtc.net/squidex/apis/squidex-api.md) · [All operations](https://skmtc.net/squidex/apis/squidex-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/squidex/squidex-api/versions/b4a9b62f113a/schema)
