Navigation modeDigital Asset Manager Add-on Documentation > Developer Guide
REST service operations (deprecated)
Overview
The TIBCO EBX® Digital Asset Manager Add-on provides features that allow you to use REST services to get asset information. Responses are returned in the JSON format shown below where status
indicates completion success, message
returns any messages, and data
is the response data if successful and null otherwise:
{
"status" : "success" ,
"message" : "Get success" ,
"data" : { }
}
|
See the following sections for details and examples:
Retrieve an asset's URL
The following table provides an example of asset URL retrieval:
Note
This REST operation was deprecated in the TIBCO EBX® Digital Asset Manager Add-on 2.0.0 release.
Request URL | http://<host>[:<port>]/ebx-addon-dama/rest-service/getAssetInformation?assetUUID=<anAssetPrimaryKey> |
|
Request parameters | anAssetPrimaryKey : The asset's primary key.
|
Sample response | {
"status" : "success" ,
"message" : "Get success" ,
"data" : {
"uuid" : "A3CE402E-0A27-4151-9093-49366491892E" ,
"name" : {
"locale" : "en_US" ,
"label" : "asset_01.PNG" ,
"description" : ""
},
"preview_url" : "http://<host>[:<port>]/ebx-addon-dama/AssetProvider?assetPath=A3C...892E&versionId=B8D...A9B" "&height=150&width=150&original=true&uuid=fa6...0ca&moduleName=ebx-addon-dama&contentId=B8D...A9B" ,
"URL" : "http://<host>[:<port>]/ebx-addon-dama/AssetProvider?assetPath=A3C...892E&versionId=B8D...A9B" "&uuid=fa6...0ca&moduleName=ebx-addon-dama&contentId=B8D...A9B&download=true" ,
"defaultIcon" : "http://<host>[:<port>]/ebx-addon-dama/AssetProvider?assetPath=B7R...656V&versionId=SFA...A4T" "&uuid=fa6...0ca&moduleName=ebx-addon-dama&contentId=SFA...A4T" ,
"creation_date" : "01/01/2019 17:08:33" ,
"last_updated_date" : "01/01/2019 17:08:33" ,
"versions" : [
{
"uuid_version" : "B8DCB43A-55C0-4968-9635-84EA9C5FEA9B" ,
"version_name" : "" ,
"comment" : "" ,
"preview_url" : "http://<host>[:<port>]/ebx-addon-dama/AssetProvider?assetPath=A3C...892E&versionId=B8D...A9B" "&height=150&width=150&original=true&uuid=fa6...0ca&moduleName=ebx-addon-dama&contentId=B8D...A9B" ,
"URL" : "http://<host>[:<port>]/ebx-addon-dama/AssetProvider?assetPath=A3C...892E&versionId=B8D...A9B" "&uuid=fa6...0ca&moduleName=ebx-addon-dama&contentId=B8D...A9B&download=true" ,
}
],
"metadata" : []
}
}
|
|
Response parameters | uuid : The asset's primary key.
name : The label and description based on the request header language (defaults to EN).
URL : The asset's URL.
creation_date : The asset's creation date.
last_update_date : The asset's most recent update date.
versions : The asset's version information.
metadata : All of the assets' metadata values.
preview_url : The URL of the asset preview.
defaulticon : The URL of the default file extension icon.
|
Note | When using the addon-Token mechanism, the URL stays live for 30 minutes after the initial call. In other cases the URL is authenticated by TIBCO EBX®. (HTTP Request, or login/password) |
The example in the following table shows retrieval of all mediaType fields registered in the EBX Digital Asset Manager Add-on:
Note
This REST operation was deprecated in the TIBCO EBX® Digital Asset Manager Add-on 2.0.0 release.
Request URL | http://<host>[:<port>]/ebx-addon-dama/rest-service/getMediaFields/<dataspaceKey>/<datasetName>?tablePath=<aTablePath> |
|
Request parameters | dataspaceKey : An encoded dataspace key of the user's dataspace.
datasetName : An encoded dataset name of the user's dataset.
aTablePath : An encoded table path in the schema to get all media fields.
|
Sample response | {
"status" : "success" ,
"message" : "Get success" ,
"data" : [
{
"fieldPath" : "/fieldComplexCase/Group1/Group2/media" ,
"dacCode" : "_root_TestComplexCase_fieldComplexCase_Group1_Group2_media" ,
"message" : ""
},
{
"fieldPath" : "/fieldComplexCase2/group1/media1" ,
"dacCode" : "_root_TestComplexCase_fieldComplexCase2_group1_media1" ,
"message" : ""
}
]
}
|
|
Response parameters | fieldPath : The mediaType field's path in the adaptation.
dacCode : The dacCode registered in the mediaType field's D.A.C.
message : The message returned when the mediaType field isn't registered in the D.A.C.
|
The following table contains an example of getting information for assets attached to a mediaType field:
Note
This REST operation was deprecated in the TIBCO EBX® Digital Asset Manager Add-on 2.0.0 release.
Request URL | http://<host>[:<port>]/ebx-addon-dama/rest-service/getAttachedAssetsInformation/<dataspaceKey>/<datasetName>?tablePath=<aTablePath> &primaryKey=<aPrimaryKey>&fieldPath=<aFieldPath>&useAddonToken=<useAddonToken>
&pageSize=<aPageSize>&pageIndex=<aPageIndex>
|
|
Request parameters | dataspaceKey : An encoded dataspace key of the user dataspace.
datasetName : An encoded dataset name of the user dataset.
aTablePath : An encoded table path (in the schema).
aPrimaryKey : The current record's primary key.
aFieldPath : An encoded field path (in the adaptation).
useAddonToken : (optional) Determines whether the asset token will contain the add-on token. Defaults to false.
aPageSize : (optional) Number of assets per page. Defaults to 10.
aPageIndex : (optional) The page index. Defaults to 1.
|
Sample response | {
"fieldPath" : "/fieldSimpleCase" ,
"viewMode" : "mosaic_view" ,
"permissions" : {
"change_current_version" : true ,
"delete" : true ,
"detach" : true ,
"edit" : true ,
"share_and_download" : true ,
"upload" : true ,
"upload_new_version" : true ,
"view_digital_asset_of_other_user" : true
},
"count" : 10 ,
"assetsInfo" : [
{
"asset_status" : 0 ,
"asset_status_message" : "" ,
"uuid" : "3896DE7A-BEC8-4E2A-BF2F-BC41790CF349" ,
"name" : {
"locale" : "en_US" ,
"label" : "asset_01.png" ,
"description" : ""
},
"URL" : "http://<host>[:<port>]/ebx-addon-dama/AssetProvider?assetPath=389...349&versionId=523...000" , "defaultIcon" : "" ,
"creation_date" : "1512456124962" ,
"last_updated_date" : "1512456124971" ,
"mimeType" : "png" ,
"fileSize" : "0.1" ,
"metadata" : []
}
]
}
|
|
Response parameters | viewMode : The configuration view mode (mosaic view/ list view).
permissions : The permissions on the D.A.C.
count : The number of assets attached to the field.
assetInfo : The attached asset information.
|
Getting all assets in a Drive
The following table contains an example of getting all assets in a Drive:
Note
This REST operation was deprecated in the TIBCO EBX® Digital Asset Manager Add-on 2.0.0 release.
Request URL | http://<host>[:<port>]/ebx-addon-dama/rest-service/getAllAssets/<dataspaceKey>/<datasetName>?tablePath=<aTablePath> &fieldPath=<aFieldPath>&useAddonToken=<useAddonToken>&pageSize=<aPageSize>
&pageIndex=<aPageIndex>
|
|
Request parameters | dataspaceKey : An encoded dataspace key of the user dataspace.
datasetName : An encoded dataset name of the user dataset.
aTablePath : An encoded table path (in the schema).
aFieldPath : An encoded field path (in the adaptation).
useAddonToken : (optional) Determines whether the asset token will contain the add-on token. Defaults to false.
aPageSize : (optional) Number of assets per page. Defaults to 10.
aPageIndex : (optional) The page index. Defaults to 1.
|
Sample response | {
"asset_status" : 0 ,
"asset_status_message" : "" ,
"uuid" : "110...741" ,
"name" : {
"locale" : "en_US" ,
"label" : "asset_01.jpg" ,
"description" : ""
},
"URL" : "http://<host>[:<port>]/ebx-addon-dama/AssetProvider?assetPath=110...741&versionId=5BB...15A" , "defaultIcon" : "" ,
"creation_date" : "1519617088917" ,
"last_updated_date" : "1519627827201" ,
"mimeType" : "jpg" ,
"fileSize" : "0.2" ,
"metadata" : [],
"attached" : true
}
|
|
Attach assets to a record
The following table contains an example of attaching assets to a record:
Attention
This REST operation has been deprecated in the EBX Digital Asset Manager Add-on 1.5.0 release.
Method type: | POST |
Request URL | http://<host>[:<port>]/ebx-addon-dama/rest-service/attachAssets/<dataspaceKey>/<datasetName> |
|
Request parameters | dataspaceKey : An encoded dataspace key of the user dataspace.
datasetName : An encoded dataset name of the user dataset.
|
Request body | Content-type: application/x-www-form-urlencoded Parameters: aTablePath : An encoded table path (in the schema).
aFieldPath : An encoded field path (in the adaptation).
primaryKey : The current record's primary key.
uuids : The UUIDs of assets to attach.
overwrite : (optional) If true, existing assets are replaced. If false, new assets are attached alongside existing assets. Defaults to false if undefined.
|
Sample responses | If one attachment fails when attaching multiple assets, no assets will be attached and an error message is returned. If successful:
If unsuccessful (all message content will follow the request locale): {
"status" : "unsuccess" ,
"message" : {
"type" : "error" ,
"code" : "1" ,
"messageContent" : "has error ..."
}
}
|
|
Detach assets from a record
The following table contains an example of detaching assets from a record:
Attention
This REST operation has been deprecated in the EBX Digital Asset Manager Add-on 1.5.0 release.
Method type: | POST |
Request URL | http://<host>[:<port>]/ebx-addon-dama/rest-service/detachAssets/<dataspaceKey>/<datasetName> |
|
Request parameters | dataspaceKey : An encoded dataspace key of the user dataspace.
datasetName : An encoded dataset name of the user dataset.
|
Request body | Content-type: application/x-www-form-urlencoded Parameters: aTablePath : An encoded table path (in the schema).
aFieldPath : An encoded field path (in the adaptation).
primaryKey : The current record's primary key.
uuids : The UUIDs of assets to attach.
detachAll : (optional) If true, all assets attached to a media field will be detached. You do not need to provide asset UUIDs in this case. If false, only assets identified by the UUIDs are detached. Defaults to false if undefined.
|
Sample responses | If successful:
If unsuccessful (all message content will follow the request locale): {
"status" : "unsuccess" ,
"message" : {
"type" : "error" ,
"code" : "1" ,
"messageContent" : "has error ..."
}
}
|
|
Upload an asset from a record
The following table provides an example of uploading an asset via REST:
Note
This REST operation was deprecated in the TIBCO EBX® Digital Asset Manager Add-on 2.0.0 release.
Method type | POST |
URL | http://<host>[:<port>]/ebx-addon-dama/rest/asset/v1/<dataspaceKey>/<datasetName>:upload? tablePath=<aTablePath>&fieldPath=<aFieldPath>&primaryKey=<primaryKey>
|
|
Parameters | dataspaceKey : An encoded dataspace key of the user dataspace.
datasetName : An encoded dataset name of the user dataset.
aTablePath : An encoded table path (in the schema).
aFieldPath : An encoded field path (in the adaptation).
primaryKey : The record's primary key.
|
Request headers | Authorization : The EBX®'s authorization key.
Content-Type : application/x-www-form-urlencoded
|
Request body | file : The binary file (required).
name : The asset's name (required).
tags : (optional) The assets' tags. This is an array of tags, separated by comma. Example: "tag1, tag2, tag3".
attach : (optional) If true , the asset will be uploaded and attached into record. Otherwise, it will be uploaded without being attached.
|
Sample response | {
"URL" : "http://<host>[:<port>]/ebx-addon-dama/AssetProvider?assetPath=520...D61&versionId=FB3...8C2" , "asset_status" : "0" ,
"asset_status_message" : "" ,
"creation_date" : "01/01/2019 10:54:14" ,
"fileSize" : "0.2" ,
"last_update_date" : "01/01/2019 10:54:14" ,
"logicalName" : "asset_01.png" ,
"metaData" : [],
"mimeType" : "png" ,
"name" : {
"label" : "asset_01" ,
"locale" : "en"
},
"tags" : [
"tag1" ,
"tag2" ,
"tag3"
],
"uuid" : "520A6F13-60B0-4EAA-901E-A1D28D677D61" ,
"versionId" : "FB34C7B4-1595-47FD-BAA9-B14387DB98C2"
}
|
|
Response parameters | URL : The asset's URL.
asset_status : The asset's status.
asset_status_message : The asset's status message.
creation_date : The asset's creation date.
fileSize : The asset's creation date.
last_update_date : The asset's most recent update date.
logicalName : The asset's logical name.
metadata : The assets' metadata values.
mimeType : The asset's mime type.
name : The asset's name.
tags : The assets' tags values.
uuid : The asset's primary key.
versions : The asset's version information.
|