Media API
For a comprehensive guide on using these endpoints, see here.
GET list
Summary
Lists all files in the given directory (recursive).
URL
GET /api/service/media/list
Query Params
directory string
Response
{
"status": {
"code": 0,
"message": "",
"details": [
{
"type_url": "",
"value": ""
}
]
},
"files": [
{
"path": "",
"size": "",
"creationDate": "",
"lastWriteDate": ""
}
]
}
POST provision
Summary
Copies or downloads a file from a remote source to destinations on the local machine. Can be used to populate a Designer project with media files.
URL
POST /api/service/media/provision
Request
{
"mediaPath": "",
"localPath": [
""
],
"uid": "",
"transfers": [
{
"mediaPath": "",
"uid": "",
"localPath": [
""
]
}
]
}
Response
{
"status": {
"code": 0,
"message": "",
"details": [
{
"type_url": "",
"value": ""
}
]
},
"result": [
{
"taskUid": "",
"success": false,
"errorMessage": {
"mediaPath": "",
"localPath": "",
"message": ""
},
"taskType": "",
"taskStatusStream": ""
}
]
}
POST remove
Summary
Removes a file or folder from the local machine. Useful for cleaning up assets or directories within a Designer project. When Designer is running, it can automatically unlock files in the active project before deleting them, ensuring a smooth and error-free cleanup process.
URL
POST /api/service/media/remove
Request
{
"path": ""
}
Response
{
"status": {
"code": 0,
"message": "",
"details": [
{
"type_url": "",
"value": ""
}
]
},
"taskUid": ""
}