Skip to content

Asset files API

Base URL: https://YOUR-SERVER/api. Send your API key in x-api-key where authentication is required. A key also needs the listed permission; your account's access rules still apply.

API guide · All endpoints · OpenAPI JSON

Search asset files

GET /api/asset-files

Returns all matching asset files.

Authentication: API key. Permission: assetFile.read.

Parameters

NameWhereRequiredDescription
assetIdqueryYesAsset ID to filter files by
isEditedqueryNoThe file was generated from an edit
isProgressivequeryNoThe file is a progressively encoded JPEG
isTransparentqueryNoThe file is transparent
typequeryNoFilter by type of file
Parameter types, defaults and constraints

Field definitions: AssetFileType

[
  {
    "name": "assetId",
    "required": true,
    "in": "query",
    "description": "Asset ID to filter files by",
    "schema": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
      "type": "string"
    }
  },
  {
    "name": "isEdited",
    "required": false,
    "in": "query",
    "description": "The file was generated from an edit",
    "schema": {
      "type": "boolean"
    }
  },
  {
    "name": "isProgressive",
    "required": false,
    "in": "query",
    "description": "The file is a progressively encoded JPEG",
    "schema": {
      "type": "boolean"
    }
  },
  {
    "name": "isTransparent",
    "required": false,
    "in": "query",
    "description": "The file is transparent",
    "schema": {
      "type": "boolean"
    }
  },
  {
    "name": "type",
    "required": false,
    "in": "query",
    "description": "Filter by type of file",
    "schema": {
      "$ref": "#/components/schemas/AssetFileType"
    }
  }
]

Responses

Field definitions: AssetFileResponseDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "items": {
            "$ref": "#/components/schemas/AssetFileResponseDto"
          },
          "type": "array"
        }
      }
    },
    "description": ""
  }
}

Delete an asset file

DELETE /api/asset-files/{id}

Delete a file and remove it from the database.

Authentication: API key. Permission: assetFile.delete.

Parameters

NameWhereRequiredDescription
idpathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "id",
    "required": true,
    "in": "path",
    "schema": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
      "type": "string"
    }
  }
]

Responses

{
  "204": {
    "description": ""
  }
}

Retrieve an asset file

GET /api/asset-files/{id}

Returns metadata about a specific asset file.

Authentication: API key. Permission: assetFile.read.

Parameters

NameWhereRequiredDescription
idpathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "id",
    "required": true,
    "in": "path",
    "schema": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
      "type": "string"
    }
  }
]

Responses

Field definitions: AssetFileResponseDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AssetFileResponseDto"
        }
      }
    },
    "description": ""
  }
}

Download an asset file

GET /api/asset-files/{id}/download

Serve the contents of a specific asset file.

Authentication: API key. Permission: assetFile.download.

Parameters

NameWhereRequiredDescription
idpathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "id",
    "required": true,
    "in": "path",
    "schema": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
      "type": "string"
    }
  }
]

Responses

{
  "200": {
    "content": {
      "application/octet-stream": {
        "schema": {
          "format": "binary",
          "type": "string"
        }
      }
    },
    "description": ""
  }
}