Get folder items

Prev Next

This tutorial demonstrates how to get folder items via RESTful API.

Folder items contain the details about the folder, such as the folder ID, parent ID, job ID, sub-folders inside, 12d jobs, and files inside it.

The steps include:

  • Getting folder items 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 folder items'.

Sample Request

curl --location 'http://{your-server-here}/api/v1/folders/{folder-id}/items' \

--header 'Authorization: Bearer <your-token-here>' \

--header 'Content-Type: application/json'

Below is a sample response for a specific folder and the items inside it.

Click in the line below to see the code.

Sample Response

{

    "FolderID": {

        "_id": 60008,

        "_server_id": 1,

        "_server_guid": "b993c729-bf98-490c-989d-5621e3b48139",

        "IDString": "60008_1"

    },

    "ParentFolderID": {

        "_id": 60007,

        "_server_id": 1,

        "_server_guid": "b993c729-bf98-490c-989d-5621e3b48139",

        "IDString": "60007_1"

    },

    "JobID": {

        "_id": 1,

        "_server_id": 1,

        "_server_guid": "b993c729-bf98-490c-989d-5621e3b48139",

        "IDString": "1_1"

    },

    "SubFolders": [],

    "TDJobs": [],

    "Files": {

        "PageNumber": 1,

        "PageSize": 20,

        "TotalRows": 1,

        "TotalPages": 1,

        "Result": [

            {

                "ID": {

                    "_id": 170158,

                    "_server_id": 1,

                    "_server_guid": "b993c729-bf98-490c-989d-5621e3b48139",

                    "IDString": "170158_1"

                },

                "FileName": "random file.txt",

                "DisplayName": null,

                "FolderID": {

                    "_id": 60008,

                    "_server_id": 1,

                    "_server_guid": "b993c729-bf98-490c-989d-5621e3b48139",

                    "IDString": "60008_1"

                },

                "State": "Deleted",

                "LastChangeType": 3,

                "LastChangedBy": "",

                "LastChangedTime": "2025-04-30T01:35:55.953",

                "IsCheckedOut": false,

                "LastModified": "2025-04-30T01:35:55.95",

                "CreatedOn": "2024-10-15T04:36:40.493",

                "Path": "Test/random file.txt",

                "LatestVersion": 15,

                "SizeReadable": "12B",

                "Size": 12,

                "ActiveCheckout": null,

                "ActiveFolderCheckout": null,

                "FileType": "TXT File",

                "FileIcon": "",

                "HasReferences": false,

                "IsLinked": false,

                "LinkedPath": "",

                "Attributes": null,

                "ChangeAttributes": null,

                "EntityObject": null,

                "ActiveMs365Session": null

            }

        ]

    }

}