Asset.SetMetadata
Creates the key/value metadata pair for the specified asset, if the key already exists for the asset then its value is updated.
Parameters and required information
Here's a list of all the parameters you'll need to pass to the Asset.SetMetadata method. All of the parameters are required unless otherwise noted.
SessionKey- The session key obtained from User.Login
AssetID- The id of an asset obtained from Workspace.GetAll or Asset.GetDetail
Key- The key for the metadata pair
Value- The value for the metadata pair
Type- The type of asset you are creating the metadata for, possible values are (asset,fileasset). This parameter is not required, the default is "asset"
Return Codes
Success
Status: success- Returns success if the metadata was created/updated correctly.
Status: fail- The call was not successful. Either the session has expired or the XML was not formatted correctly.
Error
-
5002: Authentication Failure
- No active session exists with this session key and developer account id. The user session has expired and the user has to to log on again.
-
101: The ASSETID attribute is required in the ASSET.SETMETADATA function
- The ASSETID was not passed along.
-
101: The KEY attribute is required in the ASSET.SETMETADATA function
- The KEY was not passed along.
-
101: The VALUE attribute is required in the ASSET.SETMETADATA function
- The VALUE was not passed along.
-
505: Restricted - This user is not authorized to access this asset
- The user tried to access an asset id that is outside of the list of permitted workspaces.
HTTP POST
<?xml version="1.0" encoding="utf-8"?> <request> <sessionkey>string</sessionkey> <assetid>string</assetid> <key>string</key> <value>string</value> <type>string</type> </request>
<?xml version="1.0" encoding="utf-8"?> <mediasilo_response method="Asset.SetMetadata" status="success"> </mediasilo_response>
