DC 5.9 Getting assets by Id
Allows getting information about assets in the system.
There are 2 APIs available for this.
Please keep in mind that all the asset preview URLs returned here are already authorized, so no additional authorization is necessary to pass in when requesting them. This means you can use them directly on web pages without any additional work. However, they will expire when the access key used to make them expires.
Icon legend
This parameter is required
Deprecated
Get single asset
URL: /digizuitecore/legacyservice/api/assets/{assetId}
Method: GET
Auth required: YES
Request properties
Name | Example | Description |
---|---|---|
|
| The asset id of the asset to get |
|
| Optional query parameter for additional metadata to get for each asset. The metadata response uses the same exact response format as the general metadata editor API. See the metadata response documentation. |
|
| Optional query parameter to overwrite the language the asset is returned in. If not passed, the language id from the access key will be used. |
Response properties
Name | Data type | Example | Description |
---|---|---|---|
| Enum/int |
| The itemType of the asset. Always |
| Enum/int |
| The asset type of the asset |
| int |
| The |
| int |
| The |
| String/Guid/UUID |
| The itemGuid of the asset. Basically works like the |
| int/null
|
| The assetId of the asset this asset is derived from (Cropped or trimmed), or null if this asset is not derived from another asset. |
| int/null |
| The |
| int |
| The id of the user that uploaded this asset. |
| boolean |
| If you are allowed to make changes to this asset. |
| int64/long |
| The size in bytes of the source file of this asset |
| string |
| The file extension of the source file of this asset. |
| DateTime |
| A timestamp for when this asset was originally uploaded. |
| DateTime |
| A timestamp for when this asset was last modified. |
| string |
| The value of the |
| string |
| The value of the |
| string |
| The name of the crop size that was used for derive this asset, if this asset is a crop of another asset. |
| int/null |
| The height in pixels of the source file. Only applicable for file types that has a height. |
| int/null |
| The width in pixels of the source file. Only applicable for file types that has a width. |
| string |
| The SHA1 hash of the source file of this asset. |
| String/TimeSpan/null |
| A dotnet TimeSpan for how long this video/audio file is. |
| string/url/null |
| A url for a small thumbnail for this asset. |
| string/url/null |
| A larger thumbnail for the asset. |
| string/url/null |
| A url for streaming this specific asset as video |
| string/url/null |
| A url for streaming this specific asset as audio. |
| string/url/null |
| A url for a pdf rendered version of this asset. |
| string/url/null |
| A url for streaming the source file of this asset. |
| string |
| The original file name of the asset, without the extension |
| boolean |
| bool indicating if this asset has been soft deleted. Soft deleted assets generally won’t be returned in search responses. |
| string |
| The |
| string |
| The username of the user that uploaded this asset. |
| string |
| The filename of the file in the underlying storage. This is usually the asset id + extension. |
| array |
| Information about which destinations in the digizuite the source file is available at. |
| string |
| The original file name of the asset, without the extension. |
| array |
| The transcodes that are available and has currently been generated for this asset. |
| int |
| The id of the mediaFormat this transcode was generated as. |
| int |
| The id of the destination this format is available on. |
| int |
| The id of the media transcode that was used to generate this media format. |
| string |
| The name of this media format |
| string |
| The name of the generated file in storage. |
| string/url/null |
| A url for streaming this specific format. |
| string |
| An md5 hash of the generated file. |
| string |
| A SHA1 hash of the generated file. |
| dictionary |
| Any additional metadata that was requested using the |
| object |
| Information about the locked/checkout status of the asset. |
| int |
| The id of the asset that is locked. Same value as the |
| boolean |
| If this file is locked/checked out by someone. |
| int/null |
| The id of the user that has locked this asset, or null if not locked. |
| DateTimeOffset/null |
| The date when the lock will automatically open if not renewed before, or null if not locked. |
| string/null |
| An optional note that was passed in when the asset was locked, or null if not locked or no note. |
Example request:
GET https://<my-dam>/digizuitecore/legacyservice/api/assets/16
Authorization: AccessKey MIIC....fg==
Bulk get assets
URL: /digizuitecore/legacyservice/api/assets/bulk-get
Method: POST
Auth required: YES
Request properties
Name | Example | Description |
---|---|---|
|
| The asset ids of the assets to get. |
|
| The item ids of the assets to get. |
|
| The item guids of the assets to get. |
|
| Optional parameter for additional metadata to get for each asset. The metadata response uses the same exact response format as the general metadata editor API. See INSERT LINK HERE!!!! |
|
| Optional parameter to overwrite the language the asset is returned in. If not passed, the language id from the access key will be used. |
Notes
At least one of either
assetIds
,itemIds
oritemGuids
has to be passed in.If you request assets you don’t have access to/does not exist, then they are simple not in the response. You still get a 200 response with the remaining assets. If none of the assets you requested are found, then you get an empty array with a 200 response code.
Example request (By asset id):
In this example we request the asset by assetId
POST https://mm5-dam.digizuite.dev/digizuitecore/legacyservice/api/assets/bulk-get
Authorization: AccessKey MIIC...fg==
Content-Type: application/json
{
"assetIds": [
16
],
"metaFieldItemGuids": [
"6afe78b7-3f24-49f3-bf95-24890ea62696",
"bf0ad1a6-984a-494e-a227-9d70c6a864f9"
],
"languageId": 1
}
Example request (By item id):
In this example we request the asset by itemId
Example request (By item guid):
In this example we request the asset by ItemGuid
Example request (combined):
In this example we request multiple assets using different types of values in 1 request.
Example response:
The response looks exactly the same as the single case, except it’s wrapped in an array.