Documents
Endpoints to work with documents.
For the definition of the document 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/{$folderName}/document
Create a document.
cURL example
curl \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
-d '{ "class": "Assets.Tangibles.Parts", "confidentiality": 2, "name":"TestDocument.txt", "content": {"Name": "Pipe elbow large"} }' \
https://dtxs-server.example.com/database/TestDatabase/folder/0c9597ea-9054-11ef-8950-f4ee08cb8a79/document
Parameters
Parameter |
Required |
Description |
Example |
databaseName |
yes, extracted from endpoint URL |
Name of the database to insert the document into. |
TestDatabase |
folderUid |
yes, extracted from endpoint URL |
Folder UID where the document should be created in |
0c9597ea-9054-11ef-8950-f4ee08cb8a79 |
class |
yes |
Class of the new document. |
Assets.Tangibles.Parts |
confidentiality |
yes |
Confidentiality of the new document. |
2 |
name |
yes |
Name of the new document. |
TestDocument |
content |
yes |
Content of the new document. |
Any file |
Responses
Code |
Description |
Return value |
Example |
200 |
Success. |
UID of the created document. |
f4ee08cb8a79-9054-11ef-8950-0c9597ea |
400 |
Unknown error. |
|
|
401 |
Not authorized. |
|
|
404 |
Database or folder does not exist. |
|
|
406 |
Format of the request is not valid. |
|
|
PUT /database/{$databaseName}/folder/{$folderName}/document/{$documentUid}
Update a document.
PUT example
curl \
-X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
-d '{ "newContent": {"Name": "Pipe elbow large"} }' \
https://dtxs-server.example.com/database/TestDatabase/folder/f4ee08cb8a79-0c9597ea-9054-11ef-8950/document/0c9597ea-9054-11ef-8950-f4ee08cb8a79
Parameters
Parameter |
Required |
Description |
Example |
databaseName |
yes, extracted from endpoint URL |
Name of the database where the document is. |
TestDatabase |
folderUid |
yes, extracted from endpoint URL |
Name of the folder where the document is. |
f4ee08cb8a79-0c9597ea-9054-11ef-8950 |
documentUid |
yes, extracted from endpoint URL |
UID of the document to update. |
0c9597ea-9054-11ef-8950-f4ee08cb8a79 |
newContent |
yes |
New content for the document. |
Any file |
Responses
Code |
Description |
Return value |
Example |
200 |
Success. |
Version of the document. |
2 |
400 |
Unknown error. |
|
|
401 |
Not authorized. |
|
|
404 |
Database, folder or document does not exist. |
|
|
406 |
Format of the request is not valid. |
|
|
GET /database/{$databaseName}/folder/{$folderName}/document/{$documentUid}
Get document information.
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/document/0c9597ea-9054-11ef-8950-f4ee08cb8a79
Parameters
Parameter |
Required |
Description |
Example |
databaseName |
yes, extracted from endpoint URL |
Name of the database where the document is. |
TestDatabase |
folderUid |
yes, extracted from endpoint URL |
Folder name where the document is. |
f4ee08cb8a79-0c9597ea-9054-11ef-8950 |
documentUid |
yes, extracted from endpoint URL |
UID of the document to get. |
0c9597ea-9054-11ef-8950-f4ee08cb8a79 |
Responses
Code |
Description |
Return value |
Example |
200 |
Success. |
Document information |
See example. |
400 |
Unknown error. |
|
|
401 |
Not authorized. |
|
|
404 |
Database, folder or document does not exist. |
|
|
406 |
Format of the request is not valid. |
|
|
Examples
Example of the returned value for GET /database/{$databaseName}/folder/{$folderName}/document/{$documentUid}
{
uid: 'ef77a382-ef7a-11ef-87b4-04bf1ba25820',
version: 2,
createTime: 2025-02-20T11:46:00.000Z,
author: 'your.name',
owner: 'your.name',
class: 'Actors.Teams',
confidentiality: 0,
restrictedUserRoles: '',
grantedUserRoles: '',
folderUid: 'f4ee08cb8a79-0c9597ea-9054-11ef-8950',
name: 'document.txt',
size: 310
}
GET /database/{$databaseName}/folder/{$folderName}/document/{$documentUid}/download
Download a document.
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/document/0c9597ea-9054-11ef-8950-f4ee08cb8a79/download
Parameters
Parameter |
Required |
Description |
Example |
databaseName |
yes, extracted from endpoint URL |
Name of the database where the document is. |
TestDatabase |
folderUid |
yes, extracted from endpoint URL |
Folder name where the document is. |
f4ee08cb8a79-0c9597ea-9054-11ef-8950 |
documentUid |
yes, extracted from endpoint URL |
UID of the document to download. |
0c9597ea-9054-11ef-8950-f4ee08cb8a79 |
Responses
Code |
Description |
Return value |
Example |
200 |
Success. |
Document file |
|
400 |
Unknown error. |
|
|
401 |
Not authorized. |
|
|
404 |
Database, folder or document does not exist. |
|
|
406 |
Format of the request is not valid. |
|
|
DELETE /database/{$databaseName}/folder/{$folderName}/document/{$documentUid}
Delete a document.
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/document/0c9597ea-9054-11ef-8950-f4ee08cb8a79
Parameters
Parameter |
Required |
Description |
Example |
databaseName |
yes, extracted from endpoint URL |
Name of the database where the document is. |
TestDatabase |
folderUid |
yes, extracted from endpoint URL |
Folder UID where the document is. |
f4ee08cb8a79-0c9597ea-9054-11ef-8950 |
documentUid |
yes, extracted from endpoint URL |
UID of the document to delete. |
0c9597ea-9054-11ef-8950-f4ee08cb8a79 |
Responses
Code |
Description |
Return value |
Example |
200 |
Success. |
Number of affected rows |
2 |
400 |
Unknown error. |
|
|
401 |
Not authorized. |
|
|
403 |
Document cannot be deleted. |
|
|
404 |
Database, folder or document does not exist. |
|
|
406 |
Format of the request is not valid. |
|
|
POST /database/{$databaseName}/documents
List all available documents.
POST example
curl \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
-d '' \
https://dtxs-server.example.com/database/TestDatabase/documents
Parameters
Parameter |
Required |
Description |
Example |
databaseName |
yes, extracted from endpoint URL |
Name of the database where the document is. |
TestDatabase |
Responses
Code |
Description |
Return value |
Example |
200 |
Success. |
List of all documents. |
See example. |
400 |
Unknown error. |
|
|
401 |
Not authorized. |
|
|
404 |
Database does not exist. |
|
|
406 |
Format of the request is not valid. |
|
|
Examples
Example of the list of documents for POST /database/{$databaseName}/documents
[
{
uid: '1683e60c-e85b-11ef-b10c-04bf1ba25820',
version: 2,
createTime: 2025-02-11T09:35:05.000Z,
author: 'your.name',
owner: 'your.name',
class: 'Actors.Persons',
confidentiality: 6,
restrictedUserRoles: '',
grantedUserRoles: '',
folderUid: 'f4ee08cb8a79-0c9597ea-9054-11ef-8950',
name: 'document1.txt',
size: 0
},
{
uid: 'ef77a382-ef7a-11ef-87b4-04bf1ba25820',
version: 1,
createTime: 2025-02-20T11:46:00.000Z,
author: 'your.name',
owner: 'your.name',
class: 'Actors.Teams',
confidentiality: 0,
restrictedUserRoles: '',
grantedUserRoles: '',
folderUid: 'f4ee08cb8a79-0c9597ea-9054-11ef-8950',
name: 'document2.txt',
size: 310
}
]