DTXS API REST API Folders

Folders

Endpoints to work with folders.

For the definition of the folder and explanation how it should be used, see this page.

You need to be authenticated and have your OAuth access token before sending requests. See authentication for more details.

POST /database/{$databaseName}/folder

Create a folder.

cURL example

curl \
  -X POST \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
  -d '{ "folderName": "TestFolder", "parentFolderUid": "f4ee08cb8a79-0c9597ea-9054-11ef-8950" }' \
  https://dtxs-server.example.com/database/TestDatabase/folder

Parameters

Parameter Required Description Example
databaseName yes, extracted from endpoint URL Name of the database to insert the folder into. TestDatabase
folderName yes Name of the folder you wish to create TestFolder
parentFolderUid no UID of the parent folder the new folder will be inserted into 0c9597ea-9054-11ef-8950-f4ee08cb8a79

Responses

Code Description Return value Example
200 Success. UID of the created folder. 0c9597ea-9054-11ef-8950-f4ee08cb8a79
400 Unknown error.
401 Not authorized.
404 Database does not exist.
406 Format of the request is not valid.

GET /database/{$databaseName}/folder/{$folderUid}

Get the contents of a folder.

GET example

curl \
  -X GET \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
  -d '' \
  https://dtxs-server.example.com/database/TestDatabase/folder/f4ee08cb8a79-0c9597ea-9054-11ef-8950

Parameters

Parameter Required Description Example
databaseName yes, extracted from endpoint URL Name of the database the folder is. TestDatabase
folderUid yes, extracted from endpoint URL UID of the folder. 0c9597ea-9054-11ef-8950-f4ee08cb8a79

Responses

Code Description Return value Example
200 Success. Contents of the folder. See example
400 Unknown error.
401 Not authorized.
404 Database or folder does not exist.
406 Format of the request is not valid.

Examples

Example of folder content

{
  'folder': {
    'uid': `0c9597ea-9054-11ef-8950-f4ee08cb8a79`,
    'owner': test.user,
    'confidentiality': 5,
    'restrictedUserRoles': 'Role2',
    'grantedUserRoles': 'Role1',
    'folderName': 'TestFolder',
    'parentFolderUid': 'TestParentFolder',
  },
  'parentFolder': {
    'uid': `f4ee08cb8a79-0c9597ea-9054-11ef-8950`,
    'owner': test.user,
    'confidentiality': 5,
    'restrictedUserRoles': 'Role2',
    'grantedUserRoles': 'Role1',
    'folderName': 'TestParentFolder',
    'parentFolderUid': null,
  },
  'subFolders': {
    {
      'uid': `0c9508cb8a79-f4ee97ea-9054-11ef-8950`,
      'owner': test.user,
      'confidentiality': 5,
      'restrictedUserRoles': 'Role2',
      'grantedUserRoles': 'Role1',
      'folderName': 'TestSubFolder1',
      'parentFolderUid': null,
    },
    {
      'uid': `8a79f4ee08cb-0c9597ea-9054-11ef-8950`,
      'owner': test.user,
      'confidentiality': 5,
      'restrictedUserRoles': 'Role2',
      'grantedUserRoles': 'Role1',
      'folderName': 'TestSubFolder2',
      'parentFolderUid': null,
    },
  },
  'documents': [
    {
      'uid': '1683e60c-e85b-11ef-b10c-04bf1ba25820',
      'version': 2,
      'createTime': 2025-02-11T09:35:05.000Z,
      'author': 'test.user',
      'owner': 'test.user',
      'class': 'Actors.Persons',
      'confidentiality': 6,
      'restrictedUserRoles': '',
      'grantedUserRoles': '',
      'folderUid': 'root',
      'name': 'document1.txt',
      'size': 0,
      'checksum': 0
    },
    {
      'uid': 'ef77a382-ef7a-11ef-87b4-04bf1ba25820',
      'version': 1,
      'createTime': 2025-02-20T11:46:00.000Z,
      'author': 'test.user',
      'owner': 'test.user',
      'class': 'Actors.Teams',
      'confidentiality': 0,
      'restrictedUserRoles': '',
      'grantedUserRoles': '',
      'folderUid': 'root',
      'name': 'document2.txt',
      'size': 310,
      'checksum': 308
    }
  ]
}

DELETE /database/{$databaseName}/folder/{$folderUid}

Delete a folder.

DELETE example

curl \
  -X DELETE \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
  -d '' \
  https://dtxs-server.example.com/database/TestDatabase/folder/f4ee08cb8a79-0c9597ea-9054-11ef-8950

Parameters

Parameter Required Description Example
databaseName yes, extracted from endpoint URL Name of the database the folder is. TestDatabase
folderUid yes, extracted from endpoint URL UID of the folder to delete. 0c9597ea-9054-11ef-8950-f4ee08cb8a79

Responses

Code Description Return value Example
200 Success. Number of rows affected 1
400 Unknown error.
401 Not authorized.
403 Folder is not empty and cannot be deleted.
404 Database or folder does not exist.
406 Format of the request is not valid.
(C) wai.blue | Rendered using GuideVis