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:
The following table provides an example of asset URL retrieval:
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 |
|
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 |
|
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:
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 |
|
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 |
|
The following table contains an example of getting information for assets attached to a mediaType field:
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 |
|
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 |
|
The following table contains an example of getting all assets in a Drive:
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 |
|
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 } |
The following table contains an example of attaching assets to a record:
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 |
|
Request body | Content-type: Parameters:
|
Sample responses | If one attachment fails when attaching multiple assets, no assets will be attached and an error message is returned. If successful: { "status": "success" } If unsuccessful (all message content will follow the request locale): { "status": "unsuccess", "message": { "type": "error", "code": "1", "messageContent": "has error ..." } } |
The following table contains an example of detaching assets from a record:
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 |
|
Request body | Content-type: Parameters:
|
Sample responses | If successful: { "status": "success" } If unsuccessful (all message content will follow the request locale): { "status": "unsuccess", "message": { "type": "error", "code": "1", "messageContent": "has error ..." } } |
The following table provides an example of uploading an asset via REST:
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 |
|
Request headers |
|
Request body |
|
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 |
|