AssetsByPath
Gets the asset info given their path
Defined in: assetsByPath.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
AssetsByPath(paths, verbose, fields)
Given the file paths in "paths", this endpoint returns their asset info.
|
Class Detail
AssetsByPath(paths, verbose, fields)
Given the file paths in "paths", this endpoint returns their asset info.
- Parameters:
- paths
- an array of files paths.
- verbose Optional, Default: false
- Setting this to true will collect a variety of default values for each asset.
- fields Optional
- An array of field id's to collect the values for each asset
- Returns:
- [{assetInfo}, ... ]
A published renditions section will be sent in response with preset names and public S3 URLs as keys
and values respectively if a license for renditions is enabled.
/wf/restapi/v2/AssetsByPath
Parameters:
paths=["asset/data/path1.txt","asset/data/path2.txt"]
verbose=true
Response:
[
{
"id": 201629307,
"name": "path1.txt",
"path": "asset/data/path1.txt",
"height": 0,
"width": 0,
"bytes": 0,
"lastModified": 1507845948000,
"mimeType": "text/plain",
"previews": {
"thumbnail": "../servlet/jb.view?table=thumbnails&col=thumbnails&id=pe_323031363239333037",
"viewex": "../servlet/jb.view?table=viewex&col=viewex&id=pe_323031363239333037",
"downloadUrl": "../servlet/dload?id=pe_323031363239333037"
},
"publishedRenditions": {
"webPNG": "https://aws-cloud-host-s3Bucket/c1ba4a79-2a82-7823-ab28-5a0a1fa8220a/c1ba4a79-2a82-7823-ab28-5a0a1fa8220a.png",
"webJpeg": "https://aws-cloud-host-s3Bucket/9ff45e98-dcc0-7823-9e45-c3be6390d3bf/9ff45e98-dcc0-7823-9e45-c3be6390d3bf.jpeg",
"webGif": "https://aws-cloud-host-s3Bucket/11a081b2-53cf-7823-bb08-2a7f75c4ccee/11a081b2-53cf-7823-bb08-2a7f75c4ccee.gif"
}
},
{
"id": 201629308,
"name": "path2.txt",
"path": "asset/data/path2.txt",
"height": 0,
"width": 0,
"bytes": 0,
"lastModified": 1507845948000,
"mimeType": "text/plain",
"previews": {
"thumbnail": "../servlet/jb.view?table=thumbnails&col=thumbnails&id=pe_323031363239333038",
"viewex": "../servlet/jb.view?table=viewex&col=viewex&id=pe_323031363239333038",
"downloadUrl": "../servlet/dload?id=pe_323031363239333038"
}
}
]