Asset Update Metadata
- 2 Minutes to read
- DarkLight
Asset Update Metadata
- 2 Minutes to read
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
To update an asset metadata, mention the following in the postman and then click Send.
PUT
How to update the metadata?
To update the asset's metadata, pull the asset's metadata by using a GET call, and then update its attributes by changing the call method to PUT.
Headers
Authorization: Specify required Auth Token in the header.
Request Parameters
Expand to see the parameters and description
Parameter | Parameter Type | Data Type | Accepted Values | Description |
Name | Required | String | An asset filename. | Specifies the asset's filename. |
Tags | Optional | Array of Strings | Any tags desired. | Provides an array of tags applicable to an asset. |
BinaryAssetId | Required | String | GUID | Binary asset identifier. |
CollectionCount | Optional | Integer | Collection count | A number of collections. |
UploadDate | Required | Integer | YYYY-MM-DD | Determines an upload date. |
SourceUrl | Required | String | An asset's source URL | Ensures the asset is not duplicated. |
Stats | Required | Array of Strings | Asset details | Includes information about the asset file. |
Id | Part of Stats | String | An asset GUID | It's an asset identifier. |
BinaryId | Part of Stats | String | The binary file GUID | Identifier of a binary file. |
Hash | Part of Stats | String | Checksum used for validation | Contains a hash for the validation of assets. |
Description | Part of Stats | String | A file name | Describes a file name. |
Height | Part of Stats | Integer | Height in pixels | Defines an asset height. |
Width | Part of Stats | Integer | Width in pixels | Defines an asset width. |
Format | Part of Stats | String | A file format | Defines a file format for example: jpg, png, jpeg. |
FileSize | Part of Stats | Integer | Size in bytes | Gives info about the file size. |
DPI | Part of Stats | Float | DPI of an asset. | Provides info about an asset DPI. |
HasClippingPath | Part of Stats | Boolean | True/False | Defines if an asset has a clipping path included. |
Frames | Part of Stats | Integer | Default is 1 | |
Duration | Part of Stats | Float | Default is 0.0 | |
Codec | Part of Stats | String | Codec type e.g. mjpeg | Sets a codec type of an image. |
IsArchived | Optional | Boolean | True/False | Defines if an asset is archived. |
AltText | Optional | Array of Strings | Includes a locale and a description. | Used for accessibility purposes. |
Id | Required | String | Asset GUID. | It's an asset identifier. |
DataOwner | Required | String | GUID | Company ID GUID |
AuditInfo | Optional | Array of Strings | Examples: CreateDate, CreatorName. | Provides audit data. |
ContextId | Part of AuditInfo | String | Context GUID | |
CreateDate | Part of AuditInfo | String | YYYY-MM-DD | Provides a create date. |
CreatorId | Part of Auditnfo | String | Creator GUID | Provides the creator identifier. |
CreatorName | Part of AuditInfo | String | Creator first & last name | Provides info on the creator of the asset. |
LastModifiedDate | Part of AuditInfo | String | YYYY-MM-DD | Shows the last modified date. |
PrincipleId | Part of AuditInfo | String | Principle GUID | An identifier of the principle. |
PrincipleName | Part of AuditInfo | String | Principle first & last name | |
MachineName | Part of AuditInfo | String | Machine Id | |
Properties | Required | Array of Strings | Asset properties | Provides you with information about the asset properties. |
SpecialPurpose | Part of Properties | String | Example: Ad, Marketing | Used for specifying the purpose of an asset. |
Variant | Part of Properties | String | TBA | Makes it easy to set variants for assets. |
CPVIdentifier | Part of Properties | String | Identifier | TBA |
ContentDescription | Part of Properties | String | A description of the asset's content | TBA |
FileFormatDescription | Part of Properties | String | File format description. | |
FileOptimalViewerName | Part of Properties | String | ||
FileOriginCountry | Part of Properties | String | Country of origin | |
FileCameraPerspective | Part of Properties | String | Example: Front | Provides information about the camera perspective. |
IsPrimaryFile | Part of Properties | Boolean | True/False | Defines if the file is primary. |
IsBackgroundTransparent | Part of Properties | Boolean | True/False | Marks if the background of an asset is transparent. |
AssetMetadataIsLocked | Part of Properties | Boolean | True/False |
IMPORTANT
Not including the required attributes will result in wiping them out from the asset metadata!
Also, if the data is stored in the attributes mentioned below, it's important to include them in the request payload:
"Stats"
"Properties"
"Tags
Request
{
"Name": "ac_sy300.jpg",
"Tags": [
"Testing tags",
"Tags need to be included every time you update metadata."
],
"BinaryAssetId": "e548edb5-729b-4542-8187-2817149cbf37",
"CollectionCount": 0,
"UploadDate": "2023-06-21T10:45:44.7724417Z",
"SourceUrl": "https://m.media-amazon.com/images/I/612yLr7777S._AC_SY300_SX300_.jpg",
"Stats": {
"id": "4d89e018-fb7b-49bf-b8e9-49fb99bd24e3",
"BinaryId": "e548edb5-729b-4542-8187-2817149cbf37",
"Hash": "a59e4e0f42d38233c746697b88cc937539a14845cd0911c761349de76cd86cb9",
"Description": "ac_sy300.jpg",
"Height": 300,
"Width": 300,
"Format": "jpeg",
"FileSize": 14726,
"Dpi": {
"X": 0.0,
"Y": 0.0
},
"HasClippingPath": false,
"Frames": 1,
"Duration": 0.0,
"Codec": "mjpeg"
},
"IsArchived": false,
"AltText": {
"en": "A man with sunglasses"
},
"id": "4d89e018-fb7b-49bf-b8e9-49fb99bd24e3",
"DataOwner": "3b904928-20b7-413e-bda6-28edf4b2ff31",
"Properties": {
"SpecialPurpose": "Ad",
"Variant": "1",
"CPVIdentifier": "TEST",
"ContentDescription": "Description",
"FileFormatDescription": "It is a jpg, and it has been updated through API.",
"FileOptimalViewerName": "Front",
"FileOriginCountry": "Bing",
"FileCameraPerspective": "Rear",
"IsPrimaryFile": "false",
"IsBackgroundTransparent": "false",
"AssetMetadataIsLocked": "true"
},
"Partition": "4d89e018-fb7b-49bf-b8e9-49fb99bd24e3",
"Type": "Asset"
}
Response 200 OK
true
Was this article helpful?