Assets
Collects assets data
Defined in: assets.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Assets(ids, resolver, verbose, FILTERS, fields)
Given a resolver URL or an array of Id's, this endpoint returns asset data for each asset
|
Class Detail
Assets(ids, resolver, verbose, FILTERS, fields)
Given a resolver URL or an array of Id's, this endpoint returns asset data for each asset
- Parameters:
- ids Optional
- The asset id's
- resolver Optional
- A resolver url
- verbose Optional, Default: false
- Setting this to true will collect a variety of default values for each asset.
- FILTERS Optional
- Filtering can be applied to the "id", "name", "path", "height", "width", "bytes", "lastModified", "mimeType", and "resolver" properties if verbose=true.
- fields Optional
- An array of field id's to collect the values for each asset
- Returns:
- [{assetInfo}, ... ]
/wf/restapi/v2/assets
Parameters:
ids=[201629291]
Response:
[
{
"id": 201629291
}
]
/wf/restapi/v2/assets
Parameters:
ids=[201629291,201629290]
Response:
[
{
"id": 201629291
},
{
"id": 201629290
}
]
/wf/restapi/v2/assets
Parameters:
resolver=directory://237
Response:
[
{
"id": 201629290
},
{
"id": 201629291
}
]
/wf/restapi/v2/assets get the users current selection
Parameters:
resolver=currentSelection://-1
Response:
[
{
"id": 201629292
}
]
/wf/restapi/v2/assets
Parameters:
ids=[201629291]
fields=["http://purl.org/dc/elements/1.1/ title","http://purl.org/dc/elements/1.1/ subject"]
Response:
[
{
"id": 201629291,
"fields": {
"http://purl.org/dc/elements/1.1/ title": "DC title field",
"http://purl.org/dc/elements/1.1/ subject": [
"check",
"1",
"2"
]
}
}
]
/wf/restapi/v2/assets
Parameters:
ids=[201629291]
verbose=true
Response:
[
{
"id": 201629291,
"name": "asset4.xmp",
"path": "RESTTest/assets/inner/asset4.xmp",
"height": 1,
"width": 1,
"bytes": 4096,
"lastModified": 1507813578000,
"mimeType": "application/octet-stream",
"previews": {
"thumbnail": "../servlet/jb.view?table=thumbnails&col=thumbnails&id=pe_323031363239323931",
"viewex": "../servlet/jb.view?table=viewex&col=viewex&id=pe_323031363239323931",
"downloadUrl": "../servlet/dload?id=pe_323031363239323931"
}
}
]