This tutorial demonstrates how to get a folder by ID via RESTful API.
The steps include:
Getting a folder using the folder ID
The commands are provided in curl and can be run from the command prompt when the 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.
1.2. Get Folder by ID
This request can be found in the API documentation under Folders marked 'Get a folder by id'
Sample Request
curl --location 'http://synergy.myserver.com/api/v1/folders/{folder-id}?retrieve_attributes=false' \
--header 'Authorization: Bearer <your-token-here>' \
--header 'Content-Type: application/json'
Optional: retrieve_attributes = true to include folder attributes.
Click in the line below to see the code.
Sample Response
{
"ID": {
"_id": 2,
"_server_id": 1,
"_server_guid": "b993c729-bf98-490c-989d-5621e3b48139",
"IDString": "2_1"
},
"Name": "Sample Folder",
"ParentFolderID": null,
"JobID": {
"_id": 1,
"_server_id": 1,
"_server_guid": "b993c729-bf98-490c-989d-5621e3b48139",
"IDString": "1_1"
},
"Attributes": [],
"FileAttributes": [],
"FileChangeAttributes": [],
"CreatedByID": {
"_id": 1,
"_server_id": 1,
"_server_guid": "b993c729-bf98-490c-989d-5621e3b48139",
"IDString": "1_1"
},
"CreatedOn": "2024-12-17T22:52:14.48",
"InheritsPermissions": true,
"UpdatedOn": "2025-03-26T09:03:51.49",
"FolderType": 0,
"ActiveCheckout": null,
"HasSubFolders": true,
"Has12dProjects": false,
"IsManagedFolder": false,
"NoOfSubFolders": 2,
"NumberOf12dProjects": 0,
"FolderState": 0,
"InheritsFileAttributes": false,
"InheritsFileNamingRules": true,
"LockInfo": null,
"Type": 1,
"Path": "Test/Sample Folder/",
"EntityObject": null
}