GET/POST http://yourserver.com/metadata/<reportname>.csv?assetPath=<folderPath|containerPath|assetPath>&fields=field1,field2,field3 http://yourserver.com/metadata/<reportname>.json?assetIds=assetId1,assetId2,assetId3 http://yourserver.com/metadata/<reportname>.json?q=status:published |
What does it do?
Downloads a JSON or CSV overview report of metadata fields and their values of one or more assets.
The format in which the file is created is defined in the URL by adding the extension .json or .csv.
Log in requirement
Before being able to request information from Assets Server by using a GET request or make changes to the system through a POST request, a log in to Assets Server is required. For information about the available APIs for logging in, see Assets Server REST API - introduction.
Parameters
assetIds |
Comma-separated list of asset IDs. Either assetIds, assetPath, or q must be specified. Optional. |
assetPath |
assetPath of the asset, folder, or Container (a Dossier or Collection). Either assetIds, assetPath, or q must be specified. In case of a folder or Container, the report is generated for the assets that the folder or Container contains. Optional. |
fields |
Comma-separated list of metadata fields to include in the report. If not specified, all fields are included. Optional. |
q |
Requires Assets Server 6.52 or higher. A report will be created of any asset that matches the query string added to the q parameter. Either assetIds, assetPath, or q must be specified. Optional. |
Errors
Bad Request | 400 | Occurs when incorrect parameters or a combination of incorrect parameters are specified. |
Not Found | 404 | Occurs when the specified value of assetIds or the assetPath is incorrect. |
Examples
Note: The following examples apply to creating a report for single assets.
Example 1
Request
GET http://localhost:8080/metadata/report.json?assetIds=633_adVi45yBorT7pmS7Lw&fields=assetPath,assetCreated,tags |
Result: a downloaded report in json format with the following content:
{"assetCreated":{"value":1582726693230,"formatted":"2020-02-26 14:18:13 +0000"},"assetPath":"/A/IMG_6124 (1).HEIC","tags":[]}
Request
Example 2
Request
GET http://localhost:8080/metadata/report.csv?assetIds=633_adVi45yBorT7pmS7Lw |
Result: a downloaded report in csv format with the following content:
gpsLongitude,4.81171388888889
widthPt,3024.0
software,13.3
...
fileType,HEIC
focalLength,4.25
heightMm,1422.3999999999999
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.