Assets
Manage Assets
Retrieves all assets assigned to the tenant. You can filter, sort, and paginate the results with query parameters.
- : Needed to read assets.
- : Needed to manage assets.
- : Needed to read assets that belong to the vendor.
- : Needed to manage assets that belong to the vendor.
The tenant that the caller is acting upon.
Note: The tenant name should always be written in lowercase.
^[a-z][a-z0-9]+$The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
1The number of documents being retrieved on the page.
60Fields to sort the response data by following the order of the parameters from left to right. Can contain multiple fields in the following format: field name:sort direction, separated by a comma. The colon preceding the sort direction parameter is optional, and the descending order is taken only if it is equal to desc or DESC. The ascending order is assumed in any other case.
name,metadata.createdAt:descA standard query parameter is used to search for specific values.
- Searching for items by string-based properties:
- By a field value:
q=access:PUBLIC, whereaccessis the field name, andPUBLICis its desired value.
- By a field value:
- Searching for items by a number-based property:
- With a specific value:
q=details.bytes:200 - With a value greater than:
q=details.bytes:>200 - With a value lower than:
q=details.bytes:<200 - With a value greater than or equal to:
q=details.bytes:>=200 - With a value lower than or equal to:
q=details.bytes:<=200 - With a value within a range of values:
q=details.bytes:(>=100 AND <=200), wheredetails.bytesis the name of a number-based field, and200is its querying value.
- With a specific value:
- Searching for items by a date-based property: All numer-based property queries are also valid for dates. In that case, the date should be placed within double quotes:
q=metadata.createdAt:(>="2021-05-18T07:27:27.455Z" AND <"2021-05-20T07:27:27.455Z") - Searching for items with a nonexistent or empty property:
q=details.filename:null, wheredetails.filenameis the field that has its value set tonull. - Searching for items with an existing property:
q=details:exists, wheredetailsis the field that has a non-empty value. - Searching for items by multiple specific values:
q=id:(5c3325baa9812100098ff48f,5c3325d1a9812100098ff494), whereidis the field name, and strings within the brackets are the desired values. - Searching for items by multiple fields:
q=id:5c3325baa9812100098ff48f access:PUBLIC, whereidandaccessare field names. All objects that contain the specified values are returned. Multiple fields (separated by spaces) can be specified. Multiple values for each field can also be specified in a format presented earlier. - Searching for items with string-based properties conforming to a regex:
q=id:~ABCD12orq=id:(~AB CD)- in the case of searching for strings with a space, whereidis the name of the field andABCD12orAB CDare its querying regular expressions.
name:{name}To get information how many entities meet the filtering requirements, the X-Total-Count header has been introduced. The header is optional and its default value is false. If the header is provided and it is set to true, then the total count is returned in the X-Total-Count response header. In both cases (X-Total-Count true, false or not provided), the response body has the same format (array of entities). This means that the information about the total count is returned only on demand, provided that the X-Total-Count header is present in a request.
falseResources have been retrieved successfully.
Access type of the asset. This property is immutable.
PUBLIC: Blob assets are stored in Cloudinary and are accessible through a permanent external URL.PRIVATE: Blob assets are stored in Google Cloud Storage. Retrieve their content through/media/{tenant}/assets/{assetId}/downloador request a temporary signed URL through/media/{tenant}/assets/{assetId}/download-url.
Custom asset attributes.
Unique identifier of an asset.
Asset type. This property is immutable.
Id of a vendor to which the asset belongs.
Resource link.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Internal Service Error occurred.
GET /media/{tenant}/assets HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"id": "123e06ecf0452c2d6c0b81390",
"type": "BLOB",
"access": "PUBLIC",
"url": "https://api.emporix/tenant/id/download",
"details": {
"filename": "public.txt",
"mimeType": "text/plain"
},
"refIds": [
{
"id": "123e06ecf0452c2d6c0b81392",
"type": "CATEGORY"
}
],
"mixins": {
"mediaCustomAttributes": {
"altText": "Cordless impact driver"
}
},
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1,
"mixins": {
"mediaCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/mediaCustomAttributesMixIn-v1.json"
}
}
},
{
"id": "123e06ecf0452c2d6c0b81390",
"type": "LINK",
"access": "PUBLIC",
"url": "https://emporix.io/docs/index.html",
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
},
"refIds": [
{
"id": "123e06ecf0452c2d6c0b81392",
"type": "CATEGORY"
}
]
}
]Creates a new asset for the tenant. An asset represents a digital (max 30 MB) object in the system, for example a video, image, or a document.
To create an asset of the
BLOBtype, use themultipart/form-datarequest body.To create an asset of the
LINKtype, use theapplication/jsonrequest body.
Access and assignment rules:
Assets assigned to predefined
refIdstypes (such asCATEGORYorPRODUCT) requirePUBLICaccess.PRIVATEaccess assets can be linked toAGENT, custom schema types, or remain unassigned.
- : Needed to manage assets.
- : Needed to manage assets that belong to the vendor.
The tenant that the caller is acting upon.
Note: The tenant name should always be written in lowercase.
^[a-z][a-z0-9]+$Content of the file. The max file size is 30 MB.
The request was successful. The asset has been created.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
There are three possible reasons:
- Product with given code already exists, please choose unique code for your product
- Optimistic locking failed. If user sends metadata/version attribute which is outdated (someone else updated product in the time user was performing his changes). User should retrieve the latest product data and retry the request.
- Optimistic locking failed. User did not provide metadata/version attribute in update request, but someone else updated product while it was internally handled by product service. Resending the same request can result in successful update, but the update can override recently persisted changes.
Media request is too large.
Internal Service Error occurred.
POST /media/{tenant}/assets HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 533
{
"file": {
"externalValue": "https://res.cloudinary.com/saas-ag/image/upload/v1695804155/emporix-logo-white-2f5e621206edefea6015fb4793959376_nswfbz.png"
},
"body": {
"type": "BLOB",
"access": "PUBLIC",
"refIds": [
{
"id": "123e06ecf0452c2d6c0b81392",
"type": "CATEGORY"
}
],
"details": {
"filename": "theBestImage",
"mimeType": "image/jpg"
},
"mixins": {
"mediaCustomAttributes": {
"altText": "Cordless impact driver"
}
},
"metadata": {
"mixins": {
"mediaCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/mediaCustomAttributesMixIn-v1.json"
}
}
}
}{
"id": "53ac81fd0cce8b26b36f3492"
}Retrieves an asset by its unique identifier.
- : Needed to read assets.
- : Needed to read assets that belong to the vendor.
- : Needed to manage assets that belong to the vendor.
The tenant that the caller is acting upon.
Note: The tenant name should always be written in lowercase.
^[a-z][a-z0-9]+$Unique identifier of an asset.
The request was successful. The requested asset is returned.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Internal Service Error occurred.
GET /media/{tenant}/assets/{assetId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"id": "123e06ecf0452c2d6c0b81390",
"type": "LINK",
"access": "PUBLIC",
"url": "https://emporix.io/docs/index.html",
"refIds": [
{
"id": "123e06ecf0452c2d6c0b81392",
"type": "CATEGORY"
}
],
"mixins": {
"mediaCustomAttributes": {
"altText": "Product specification sheet"
}
},
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1,
"mixins": {
"mediaCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/mediaCustomAttributesMixIn-v1.json"
}
}
}Updates a given asset. The type and access properties are immutable. Accepts files of up to 30 MB.
To update an asset of the
BLOBtype, usemultipart/form-datarequest body.To update an asset of the
LINKtype, useapplication/jsonrequest body.
- : Needed to manage assets.
- : Needed to manage assets that belong to the vendor.
The tenant that the caller is acting upon.
Note: The tenant name should always be written in lowercase.
^[a-z][a-z0-9]+$Unique identifier of an asset.
Content of the file.
The asset has been updated successfully.
No content
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
There are three possible reasons:
- Product with given code already exists, please choose unique code for your product
- Optimistic locking failed. If user sends metadata/version attribute which is outdated (someone else updated product in the time user was performing his changes). User should retrieve the latest product data and retry the request.
- Optimistic locking failed. User did not provide metadata/version attribute in update request, but someone else updated product while it was internally handled by product service. Resending the same request can result in successful update, but the update can override recently persisted changes.
Media request is too large.
Internal Service Error occurred.
PUT /media/{tenant}/assets/{assetId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 545
{
"file": {
"externalValue": "https://res.cloudinary.com/saas-ag/image/upload/v1695804155/emporix-logo-white-2f5e621206edefea6015fb4793959376_nswfbz.png"
},
"body": {
"type": "BLOB",
"access": "PUBLIC",
"refIds": [
{
"id": "123e06ecf0452c2d6c0b81392",
"type": "CATEGORY"
}
],
"details": {
"filename": "theBestImage",
"mimeType": "image/jpg"
},
"mixins": {
"mediaCustomAttributes": {
"altText": "Cordless impact driver"
}
},
"metadata": {
"version": 1,
"mixins": {
"mediaCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/mediaCustomAttributesMixIn-v1.json"
}
}
}
}No content
Deletes an asset.
- : Needed to manage assets.
- : Needed to manage assets that belong to the vendor.
The tenant that the caller is acting upon.
Note: The tenant name should always be written in lowercase.
^[a-z][a-z0-9]+$Unique identifier of an asset.
The asset has been deleted successfully.
No content
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Internal Service Error occurred.
DELETE /media/{tenant}/assets/{assetId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Partially updates an asset with a JSON Patch document that follows the RFC-6902 standard.
Use this endpoint to change fields such as refIds without replacing the full asset. You can patch BLOB assets without re-uploading the file. The type and access properties are immutable.
- : Needed to manage assets.
- : Needed to manage assets that belong to the vendor.
The tenant that the caller is acting upon.
Note: The tenant name should always be written in lowercase.
^[a-z][a-z0-9]+$Unique identifier of an asset.
JSON Patch operation. Available operations: add, remove, and replace.
Path to the field to update.
Examples: /url, /refIds, /refIds/-.
To append an item to an array, use add with a path ending in /-. The - means append after the last element.
Value to add or replace. The value can be a primitive type, an object, or an array.
The asset has been updated successfully.
No content
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
There are three possible reasons:
- Product with given code already exists, please choose unique code for your product
- Optimistic locking failed. If user sends metadata/version attribute which is outdated (someone else updated product in the time user was performing his changes). User should retrieve the latest product data and retry the request.
- Optimistic locking failed. User did not provide metadata/version attribute in update request, but someone else updated product while it was internally handled by product service. Resending the same request can result in successful update, but the update can override recently persisted changes.
Internal Service Error occurred.
PATCH /media/{tenant}/assets/{assetId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 76
[
{
"op": "add",
"path": "/refIds/-",
"value": {
"id": "product1",
"type": "PRODUCT"
}
}
]No content
Downloads an asset by its unique identifier.
If the asset is PENDING and its file is not yet available in storage, this endpoint returns 409. If the known value of details.bytes exceeds the configured streaming limit, it returns 413. The default limit is 31,457,280 bytes (30 MB). Assets without a known byte count are not rejected by this size check. The download URL endpoint has no size limit.
- : Needed to read assets.
- : Needed to read assets that belong to the vendor.
- : Needed to manage assets that belong to the vendor.
The tenant that the caller is acting upon.
Note: The tenant name should always be written in lowercase.
^[a-z][a-z0-9]+$Unique identifier of an asset.
This is a successful response when requesting a PRIVATE BLOB asset.
This is a successful response when requesting for a PUBLIC access asset.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
The upload is not complete because the file is not available in storage yet.
The known file size exceeds the configured streaming download limit, which is 31,457,280 bytes (30 MB) by default.
Internal Service Error occurred.
GET /media/{tenant}/assets/{assetId}/download HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
Ynl0ZXM=Starts an upload session for a BLOB asset and returns a short-lived upload instruction. The file is sent directly to storage. The Media API does not receive the file bytes.
For a private asset, omit uploadType or set it to put to receive a signed Google Cloud Storage PUT request. Send the file with every returned header. Set uploadType to form to receive a Google Cloud Storage multipart POST policy. For a public asset, the service always returns a Cloudinary multipart POST form, regardless of uploadType. For either multipart flow, send every returned field unchanged and append the file part last. Google Cloud Storage form fields do not include x-goog-if-generation-match.
The created asset remains PENDING until storage confirms the upload, and then becomes READY. Google Cloud Storage credentials are valid for 15 minutes by default. Cloudinary forms are valid for one hour. The upload session expires after one hour by default. Cleanup removes an expired session when no file is found. If a storage notification is delayed, retrieving the asset or cleanup can detect the stored file and complete the asset. The service emits media.asset-created only after completion is confirmed. Operations that require the stored file return 409 with Upload is not complete while the file is missing.
- : Needed to manage assets.
- : Needed to manage assets that belong to the vendor.
The tenant that the caller is acting upon.
Note: The tenant name should always be written in lowercase.
^[a-z][a-z0-9]+$Access type of the asset. This property is immutable.
PUBLIC: Blob assets are stored in Cloudinary and are accessible through a permanent external URL.PRIVATE: Blob assets are stored in Google Cloud Storage. Retrieve their content through/media/{tenant}/assets/{assetId}/downloador request a temporary signed URL through/media/{tenant}/assets/{assetId}/download-url.
Custom asset attributes.
Unique identifier of an asset.
Asset type. This property is immutable.
Upload flow requested for a private Google Cloud Storage asset.
put: Returns a signedPUTrequest. This is the default when the property is omitted.form: Returns a multipartPOSTpolicy. Public Cloudinary assets always use a multipartPOSTform, regardless of this value.
putPossible values: The request was successful. The upload session has been created.
Instruction for sending a file directly to storage.
Unique identifier of the asset, generated when the upload session is created.
Storage that receives the file.
GCS— private asset. Upload with the returnedPUTheaders or multipartPOSTfields.CLOUDINARY— public asset. Upload withPOSTand the returned multipart form fields.
The asset stays PENDING until the file is stored.
Date and time when the unused upload session expires. Returned as an ISO-8601 string.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
The caller lacks a required management scope, or direct upload is not enabled for the tenant.
Internal Service Error occurred.
POST /media/{tenant}/assets/upload-session HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 130
{
"type": "BLOB",
"access": "PRIVATE",
"uploadType": "put",
"details": {
"filename": "installation-guide.pdf",
"mimeType": "application/pdf"
}
}{
"id": "68d67e9a3f7c2b1e4a8d6501",
"provider": "GCS",
"status": "PENDING",
"expiresAt": "2026-09-25T14:15:00Z",
"upload": {
"method": "PUT",
"url": "https://storage.googleapis.com/{{GCS_BUCKET}}/{{tenant}}/assets/68d67e9a3f7c2b1e4a8d6501?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=%5Bredacted%5D&X-Goog-Date=20260925T131500Z&X-Goog-Expires=900&X-Goog-SignedHeaders=content-type%3Bhost%3Bx-goog-meta-emporix-upload&ifGenerationMatch=0&X-Goog-Signature=%5Bredacted%5D",
"headers": {
"Content-Type": "application/pdf",
"x-goog-meta-emporix-upload": "session"
}
}
}Returns a URL for an asset that is already stored.
Use this endpoint as the default method for downloading assets. It is always faster than Downloading an asset because the file travels from storage to the client and does not pass through the Media API. This operation is not controlled by the direct-upload tenant setting and has no file-size limit.
A private BLOB returns a Google Cloud Storage signed GET. The URL works without an Emporix access token and expires after 15 minutes by default. A public BLOB returns its permanent Cloudinary URL, with no expiry. A LINK asset returns its stored URL.
The optional disposition parameter affects private Google Cloud Storage URLs only. Omit it to use attachment, or set it to inline. Public Cloudinary and LINK URLs remain unchanged. An empty or unsupported value returns 400 with disposition must be inline or attachment.
When the asset is still PENDING and the file is already in storage, this call completes the asset and then returns the URL. When the file is not in storage yet, the call returns 409 with Upload is not complete.
- : Needed to read assets.
- : Needed to read assets that belong to the vendor.
- : Needed to manage assets that belong to the vendor.
The tenant that the caller is acting upon.
Note: The tenant name should always be written in lowercase.
^[a-z][a-z0-9]+$Unique identifier of an asset.
Content disposition for a private Google Cloud Storage signed URL. The default is attachment.
The value does not change public Cloudinary or LINK URLs.
attachmentPossible values: The request was successful. The download URL is returned.
URL that returns the stored file.
Storage that holds the file.
GCS— private blob. The URL is a signed download and includesexpiresAt.CLOUDINARY— public blob. The URL is permanent.LINK— the URL stored on the asset.
URL of the stored file.
Date and time when a private signed URL stops working. Returned as an ISO-8601 string.
Present for GCS only.
The disposition value is empty or unsupported.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
The upload is not complete. The file is not in storage yet.
Internal Service Error occurred.
GET /media/{tenant}/assets/{assetId}/download-url HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"provider": "GCS",
"url": "https://storage.googleapis.com/{{GCS_BUCKET}}/{{tenant}}/assets/68d67e9a3f7c2b1e4a8d6501?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=%5Bredacted%5D&X-Goog-Date=20260925T133000Z&X-Goog-Expires=900&X-Goog-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3D%22installation-guide.pdf%22&response-content-type=application%2Fpdf&X-Goog-Signature=%5Bredacted%5D",
"expiresAt": "2026-09-25T13:45:00Z"
}Last updated
Was this helpful?

