This tutorial demonstrates how to move a single file to a folder.
The commands are provided in curl and can be run from the command prompt when the 12d Synergy Server is running (or in a batch script).
Additional API documentation
To get a list of most of the API requests available, with the 12d Synergy server running, browse http://synergy.myserver.com/api-docs/ui/index.
(Replace synergy.myserver.com with the external server address and update the port numbers if necessary.)
1.1. Getting the Personal Access Token to Access API
The tutorial for getting the PAT is here: Generate PAT in Web client.
This request can be found in the API documentation under Files marked 'Move a file to a folder'.
Click in the line below to see the code.
Sample Request
curl --location 'http://synergy.myserver.com/api/v1/files/move' \
--header 'Authorization: Bearer <your-token-here>' \
--header 'Content-Type: application/json' \
--data '{
"copy_to_new_version": true,
"folder_id": {
"_id": 0,
"_server_id": 0,
"_server_guid": "00000000-0000-0000-0000-000000000000",
"IDString": "string"
},
"new_name": "string",
"restore_if_deleted": true,
"id": {
"_id": 0,
"_server_id": 0,
"_server_guid": "00000000-0000-0000-0000-000000000000",
"IDString": "string"
},
"description": "string",
"change_attributes": [
{
"attribute_id": {
"_id": 0,
"_server_id": 0,
"_server_guid": "00000000-0000-0000-0000-000000000000",
"IDString": "string"
},
"type": 0,
"value": {}
}
],
"file_attributes": [
{
"attribute_id": {
"_id": 0,
"_server_id": 0,
"_server_guid": "00000000-0000-0000-0000-000000000000",
"IDString": "string"
},
"type": 0,
"value": {}
}
],
"workflow_capture_data": [
{}
]
}'
Sample Response
The response will either be true if successful, or false otherwise.