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

Name

Example

Description

assetId

123456

The asset id of the asset to get

metaFieldItemGuids

metaFieldItemGuids=6afe78b7-3f24-49f3-bf95-24890ea62696&metaFieldItemGuids=bf0ad1a6-984a-494e-a227-9d70c6a864f9

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.

languageId

languageId=3

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

Name

Data type

Example

Description

itemType

Enum/int

0

The itemType of the asset. Always 0 for assets.

assetType

Enum/int

4 (image)

The asset type of the asset

assetId

int

16

The assetId of the asset. Not to confuse with itemId.

itemId

int

9588

The itemId of the asset. Not to confuse with assetId

itemGuid

String/Guid/UUID

b05b0e39-2bba-4098-8304-5dac38dff0d8

The itemGuid of the asset. Basically works like the itemId, but is a guid/uuid.

derivedFrom

int/null

 

null or 42

The assetId of the asset this asset is derived from (Cropped or trimmed), or null if this asset is not derived from another asset.

replacedWith

int/null

null or 42

The assetId of the asset that replaced this asset, or null. This is generally only set for previous versions of assets.

uploadMemberId

int

23

The id of the user that uploaded this asset.

hasWriteAccess

boolean

true or false

If you are allowed to make changes to this asset.

fileSize

int64/long

45179

The size in bytes of the source file of this asset

fileExtension

string

jpg

The file extension of the source file of this asset.

uploadDate

DateTime

2023-05-31T17:36:18.4330000

A timestamp for when this asset was originally uploaded.

lastModified

DateTime

2023-06-26T15:38:37.9630000

A timestamp for when this asset was last modified.

title

string

image-11

The value of the title metafield for this asset, in the requested language.

description

string

I am an image

The value of the description metafield for this asset, in the requested language.

cropName

string

banner or

The name of the crop size that was used for derive this asset, if this asset is a crop of another asset.

height

int/null

1920

The height in pixels of the source file. Only applicable for file types that has a height.

width

int/null

1080

The width in pixels of the source file. Only applicable for file types that has a width.

hashSha1

string

7D81F7133CE6A5405A2A2D3E51649435E5428B3E

The SHA1 hash of the source file of this asset.

duration

String/TimeSpan/null

00:15:42.156

A dotnet TimeSpan for how long this video/audio file is.

thumbnailUrl

string/url/null

 

A url for a small thumbnail for this asset.

largeThumbnailUrl

string/url/null

 

A larger thumbnail for the asset.

videoUrl

string/url/null

 

A url for streaming this specific asset as video

audioUrl

string/url/null

 

A url for streaming this specific asset as audio.

pdfUrl

string/url/null

 

A url for a pdf rendered version of this asset.

sourceUrl

string/url/null

 

A url for streaming the source file of this asset.

assetCode

string

image-11

The original file name of the asset, without the extension

deleted

boolean

true or false

bool indicating if this asset has been soft deleted. Soft deleted assets generally won’t be returned in search responses.

uploadComputer

string

Digizuite Media Manager

The computerName that was used when uploading this asset.

uploadUserName

string

contentcreator

The username of the user that uploaded this asset.

sourceLocationFileName

string

16.jpg

The filename of the file in the underlying storage. This is usually the asset id + extension.

sourceLocations

array

 

Information about which destinations in the digizuite the source file is available at.

originalFileName

string

image-11

The original file name of the asset, without the extension.

transcodes

array

 

The transcodes that are available and has currently been generated for this asset.

transcodes.mediaFormatId

int

2

The id of the mediaFormat this transcode was generated as.

transcodes.destinationId

int

13

The id of the destination this format is available on.

transcodes.mediaTranscodeId

int

 

The id of the media transcode that was used to generate this media format.

transcodes.name

string

 

The name of this media format

transcodes.transcodeFileName

string

 

The name of the generated file in storage.

transcodes.url

string/url/null

 

A url for streaming this specific format.

transcodes.md5Hash

string

 

An md5 hash of the generated file.

transcodes.sha1Hash

string

 

A SHA1 hash of the generated file.

additionalMetadata

dictionary

 

Any additional metadata that was requested using the metaFieldItemGuids parameter. The dictionary is keys by the guid of each metafield. See documentation for each response type here

lockInfo

object

 

Information about the locked/checkout status of the asset.

lockInfo.assetId

int

 

The id of the asset that is locked. Same value as the assetId on the root of the response.

lockInfo.isLocked

boolean

true or false

If this file is locked/checked out by someone.

lockInfo.lockedByMemberId

int/null

 

The id of the user that has locked this asset, or null if not locked.

lockInfo.expirationDate

DateTimeOffset/null

 

The date when the lock will automatically open if not renewed before, or null if not locked.

lockInfo.note

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==
{ "itemType": 0, "assetType": 4, "assetId": 16, "itemId": 9588, "itemGuid": "b05b0e39-2bba-4098-8304-5dac38dff0d8", "derivedFrom": null, "replacedWith": null, "uploadMemberId": 23, "hasWriteAccess": false, "fileSize": 45179, "fileExtension": "jpg", "uploadDate": "2023-05-31T17:36:18.4330000", "lastModified": "2023-06-26T15:38:37.9630000", "title": "image-11", "description": "I am an image", "cropName": "", "height": 1920, "width": 1080, "hashSha1": "7D81F7133CE6A5405A2A2D3E51649435E5428B3E", "duration": null, "thumbnailUrl": "https://<my-dam>/DigizuiteCore/LegacyService/api/assetstream/16/3.jpg?timestamp=2023-05-31T17%3A38%3A54.9730000&signature=JR2LNitdJoUe4mooGJ4jbs8F5evjP5nCQdNEc8UPNfQTqEKOaA3nl1OH3f5Shu2TpsCW6u5JgiOJzylpewNxTSWooLj2uRxwB7_XvlgvVDFXADq6ls93h2HoaJrbocRWyBKUF2preU7WoE9e__fMc0oy-YhzFTG9pHxye1R1PG0QAAAAAwAAAAAAAACsqgAA", "largeThumbnailUrl": "https://<my-dam>/DigizuiteCore/LegacyService/api/assetstream/16/2.jpg?timestamp=2023-05-31T17%3A38%3A54.9730000&signature=I1CB0-JP-h3buM_B0qlKMHIHi3nj4pofj6_HUUttYlzW2Uw7W-Th7kPrtvPQ6p6SdJgWLGEG4QgravmQgFvU5yaB1lEzp6ha0-zQwUZCTZu8IduEjWncu0_9-_oiFsRYD2dM7Rc9hf8eMgxJbRtjtiigPbEadNqlT8S9VLJkWUAQAAAAAgAAAAAAAACsqgAA", "videoUrl": null, "audioUrl": null, "pdfUrl": null, "sourceUrl": "https://<my-dam>/DigizuiteCore/LegacyService/api/assetstream/16?timestamp=2023-05-31T17%3A36%3A20.7270000&signature=0OysTXpDEGf5jfq6mTdqRchIL7VSEkuz9E1pU6TzyA3sK9JuNn-4-1BNy8xm0qm01lCg4xLz0mwPXnkHddoq-6qDNdLk26ezYQpdlmpostuXNlkaffHcgXIH40tP9dDlN9NG8susFuYrl8U2jQ5R0CT22mOci6k5ICcszDEWq5UQAAAAAAAAAAAAAACsqgAA", "assetCode": "image-11", "deleted": false, "uploadComputer": "Digizuite Media Manager", "uploadUserName": "contentcreator", "sourceLocationFileName": "16.jpg", "sourceLocations": [ { "locationId": 16, "destinationId": 13, "location": "00.000.000/00.000/000/16/16.jpg" } ], "originalFileName": "image-11", "transcodes": [ { "mediaFormatId": 2, "destinationId": 13, "mediaTranscodeId": 3, "name": "Thumb 1920x1080", "transcodeFileName": "16_2.jpg", "url": "https://<my-dam>/DigizuiteCore/LegacyService/api/assetstream/16/2.jpg?timestamp=2023-05-31T17%3A38%3A54.9730000&signature=I1CB0-JP-h3buM_B0qlKMHIHi3nj4pofj6_HUUttYlzW2Uw7W-Th7kPrtvPQ6p6SdJgWLGEG4QgravmQgFvU5yaB1lEzp6ha0-zQwUZCTZu8IduEjWncu0_9-_oiFsRYD2dM7Rc9hf8eMgxJbRtjtiigPbEadNqlT8S9VLJkWUAQAAAAAgAAAAAAAACsqgAA", "md5Hash": "2FD4E2331874B41C1DE661E5AFAFDB37", "sha1Hash": "4EB5465E3999B2A946A57FDC9018361E37313F8A" } // More results omitted ], "additionalMetadata": { "6afe78b7-3f24-49f3-bf95-24890ea62696": { "values": [ { "id": 50226, "label": "kat", "optionValue": "kat", "comboId": 50225 } // More results omitted ], "type": 169, "itemId": 9588, "labelId": 10437 }, "bf0ad1a6-984a-494e-a227-9d70c6a864f9": { "values": [ { "id": 12, "label": "Folder C", "optionValue": "731ff326-f635-4e84-8035-1fc99277df7e", "parentId": null, "labelPath": "Folder C", "optionValuePath": "731ff326-f635-4e84-8035-1fc99277df7e", "treeNodeId": 12, "parentTreeNodeId": null, "treeNodeIdPath": "12" } // More results omitted ], "type": 300, "itemId": 9588, "labelId": 50749 } }, "lockInfo": { "assetId": 16, "isLocked": false, "lockedByMemberId": null, "expirationDate": null, "note": null } }

Bulk get assets

 

 

URL: /digizuitecore/legacyservice/api/assets/bulk-get

Method: POST

Auth required: YES

Request properties

Name

Example

Description

Name

Example

Description

assetIds

[123456, 789456]

The asset ids of the assets to get.

itemIds

[456123, 456789]

The item ids of the assets to get.

itemGuids

["2D569054-068E-4396-9773-F906CFDA70E0", "78B778DB-DDDF-4555-A833-7506704A3D66"]

The item guids of the assets to get.

metaFieldItemGuids

metaFieldItemGuids=6afe78b7-3f24-49f3-bf95-24890ea62696&metaFieldItemGuids=bf0ad1a6-984a-494e-a227-9d70c6a864f9

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!!!!

languageId

languageId=3

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 or itemGuids 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.