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.
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
Revisions
- 13 August 2020: Updated the introduction with information about defining the format of the downloaded file.
- 13 August 2020: Removed the format parameter from the example 1.
- 11 August 2020: Added the 'q' parameter.
Comments
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 here.
2 comments
Hi,
Parameter 'format' is used in Example 1. Please add it into the list of parameters along with possible values.
Hi Sergei,
We actually removed the 'format' parameter recently because it does not apply to Assets Server. However, we forgot to remove it from example 1 and we also did not explain how the format is now set (through the extension in the URL).
I have now updated the article, thanks for pointing this out.
Best regards,
Maarten van Kleinwee
Senior Technical Writer, WoodWing Software
Please sign in to leave a comment.