Records
Endpoints to work with records.
For the definition of the record 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}/record
Create a record.
cURL example
curl \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
-d '{ "class": "Assets.Tangibles.Parts", "content": {"Name": "Pipe elbow large"} }' \
https://dtxs-server.example.com/database/TestDatabase/record
Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
| databaseName | yes, extracted from endpoint URL | Name of the database to insert the record into. | TestDatabase |
| class | yes | Class which the record is classified as. | Assets.Tangibles.Parts |
| content | yes | Content of the new record. | See example. |
Responses
| Code | Description | Return value | Example |
|---|---|---|---|
| 200 | Success. | UID of the created record. | 0c9597ea-9054-11ef-8950-f4ee08cb8a79 |
| 400 | Unknown error. | ||
| 401 | Not authorized. | ||
| 404 | Database does not exist. | ||
| 406 | Format of the request is not valid. |
Examples
Example value of content parameter
"content": {
"Name": "Cutting pipe",
"Number": "Task.1234",
"Start": "2022-03-28T09:37:51",
"Duration": 18,
"TeamId": "HslFTT2WwXj91DxSWx5",
"ApplicationId": "HslFTT2WwXj91DxSWx5",
"WorkplaceId": "HslFTT2WwXj91DxSWx5",
"MethodIds": [
"1W_HslFTT2WwXj91DxSWx5",
"3A5j_91DxSHslFTT2WwXWa"
]
}
PUT /database/{$databaseName}/record/{$recordUid}
Update a record.
cURL example
curl \
-X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
-d '{ "class": "Assets.Tangibles.Parts", "content": {"Name": "Pipe elbow large"} }' \
https://dtxs-server.example.com/database/TestDatabase/record/0c9597ea-9054-11ef-8950-f4ee08cb8a79
Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
| databaseName | yes, extracted from endpoint URL | Name of the database, which has the record. | TestDatabase |
| recordUid | yes, extracted from endpoint URL | UID of the record to update. | 0c9597ea-9054-11ef-8950-f4ee08cb8a79 |
| class | yes | Class to which the record is classified under. | Assets.Tangibles.Parts |
| content | yes | New content of the record. | See example. |
Responses
| Code | Description | Return value | Example |
|---|---|---|---|
| 200 | Success. | Versions of the record | 2 |
| 400 | Unknown error. | ||
| 401 | Not authorized. | ||
| 404 | Database or record do not exist. | ||
| 406 | Format of the request is not valid. |
GET /database/{$databaseName}/record/{$recordUid}
Get a record from the database.
cURL example
curl \
-X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
-d '{"version" : 2}' \
https://dtxs-server.example.com/database/TestDatabase/record/0c9597ea-9054-11ef-8950-f4ee08cb8a79
Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
| databaseName | yes, extracted from endpoint URL | Name of the database, which has the record. | TestDatabase |
| recordUid | yes, extracted from endpoint URL | UID of the record to get. | 0c9597ea-9054-11ef-8950-f4ee08cb8a79 |
| version | no | Version to retrieve. Leave empty for the latest version. | 1 |
Responses
| Code | Description | Return value | Example |
|---|---|---|---|
| 200 | Success. | Record data. | See example. |
| 400 | Unknown error. | ||
| 401 | Not authorized. | ||
| 404 | Database or record do not exist. | ||
| 406 | Format of the request is not valid. |
Examples
Example result for GET /database/{$databaseName}/record/{$recordUid}
{
uid: '472bbcad-eeb9-11ef-a2ce-04bf1ba25820',
version: 1,
createTime: 2025-02-19T12:01:40.000Z,
author: 'your.name',
owner: 'your.name',
class: 'ndo:Scenarios',
confidentiality: 9,
restrictedUserRoles: '',
grantedUserRoles: '',
ifcModel: '',
ifcGuid: '',
content: { "name":"Charlotte" }
}
GET /database/{$databaseName}/record/{$recordUid}/history
Get history of a record.
cURL example
curl \
-X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
-d '' \
https://dtxs-server.example.com/database/TestDatabase/record/0c9597ea-9054-11ef-8950-f4ee08cb8a79/history
Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
| databaseName | yes, extracted from endpoint URL | Name of the database, which has the record. | TestDatabase |
| recordUid | yes, extracted from endpoint URL | UID of the record to get. | 0c9597ea-9054-11ef-8950-f4ee08cb8a79 |
Responses
| Code | Description | Return value | Example |
|---|---|---|---|
| 200 | Success. | List of the record's history. | See example. |
| 400 | Unknown error. | ||
| 401 | Not authorized. | ||
| 404 | Database or record do not exist. | ||
| 406 | Format of the request is not valid. |
Examples
Example result for GET /database/{$databaseName}/record/{$recordUid}/history
[
{
uid: '472bbcad-eeb9-11ef-a2ce-04bf1ba25820',
version: 1,
createTime: 2025-02-19T12:01:40.000Z,
author: 'your.name',
owner: 'your.name',
class: 'ndo:Scenarios',
confidentiality: 9,
restrictedUserRoles: '',
grantedUserRoles: '',
ifcModel: '',
ifcGuid: '',
content: { "name":"Charlotte" }
},
{
uid: '472bbcad-eeb9-11ef-a2ce-04bf1ba25820',
version: 2,
createTime: 2025-02-22T12:01:40.000Z,
author: 'your.name',
owner: 'your.name',
class: 'ndo:Scenarios',
confidentiality: 9,
restrictedUserRoles: '',
grantedUserRoles: '',
ifcModel: '',
ifcGuid: '',
content: { "name":"Charlotte", "status":"analysis" }
},
]
DELETE /database/{$databaseName}/record/{$recordUid}
Delete a record.
cURL example
curl \
-X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
-d '' \
https://dtxs-server.example.com/database/TestDatabase/record/0c9597ea-9054-11ef-8950-f4ee08cb8a79
Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
| databaseName | yes, extracted from endpoint URL | Name of the database, which has the record. | TestDatabase |
| recordUid | yes, extracted from endpoint URL | UID of the record 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 | Record cannot be deleted. | ||
| 404 | Database or record do not exist. | ||
| 406 | Format of the request is not valid. |
POST /database/{$databaseName}/records
Get a list of all records from a database.
cURL example
curl \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
-d '' \
https://dtxs-server.example.com/database/TestDatabase/records
Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
| databaseName | yes, extracted from endpoint URL | Name of the database, which has the records. | TestDatabase |
Responses
| Code | Description | Return value | Example |
|---|---|---|---|
| 200 | Success. | List of found records. | See example |
| 400 | Unknown error. | ||
| 401 | Not authorized. | ||
| 404 | Database or record do not exist. | ||
| 406 | Format of the request is not valid. |
Examples
Example result for POST /database/{$databaseName}/records
[
{
uid: '472bbcad-eeb9-11ef-a2ce-04bf1ba25820',
version: 2,
createTime: 2025-02-20T12:04:30.000Z,
author: 'your.name',
owner: 'your.name',
class: 'Actors.Persons',
confidentiality: 2,
restrictedUserRoles: '',
grantedUserRoles: '',
ifcModel: '',
ifcGuid: '',
content: { name: 'charlotte' }
},
{
uid: '51d9d08c-ef83-11ef-87b4-04bf1ba25820',
version: 1,
createTime: 2025-02-20T12:07:56.000Z,
author: 'your.name',
owner: 'your.name',
class: 'ndo:Workplaces',
confidentiality: 0,
restrictedUserRoles: '',
grantedUserRoles: '',
ifcModel: '',
ifcGuid: '',
content: { roomName: 'A2112' }
}
]
POST /database/{$databaseName}/records
Get a list of record based on a search query.
cURL example
curl \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
-d '{"query": [{ "property": "class", "match": "Persons" }, { "property": "content", "path": "$.GivenName", "match": "John" }]}' \
https://dtxs-server.example.com/database/TestDatabase/records
Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
| databaseName | yes, extracted from endpoint URL | Name of the database, which has the records. | TestDatabase |
| query | no | Search query. | See example. |
Available properties for search
- uid
- owner
- class
- content
Available search operations
- equals - looks for an exact match of the given string
- match - looks for a record containing the given string
Responses
| Code | Description | Return value | Example |
|---|---|---|---|
| 200 | Success. | List of found records. | See example |
| 400 | Unknown error. | ||
| 401 | Not authorized. | ||
| 404 | Database does not exist. | ||
| 406 | Format of the request is not valid. |
Examples
Example search query for POST /database/{$databaseName}/records
{"query":
[
{ "property": "class", "match": "Persons" },
{ "property": "content", "path": "$.GivenName", "match": "John" }
]
}
When creating a content search query property you need to add another parameter path.
This is needed for the search to go through the JSON object in the database.
With $., you are indicating this is the root of the JSON object tree.
With a series of keys separated by dots you can lead the search through the JSON object.
For example $.name.lastName.
Example result for POST /database/{$databaseName}/records
[
{
uid: '472bbcad-eeb9-11ef-a2ce-04bf1ba25820',
version: 2,
createTime: 2025-02-20T12:04:30.000Z,
author: 'your.name',
owner: 'your.name',
class: 'Actors.Persons',
confidentiality: 2,
restrictedUserRoles: '',
grantedUserRoles: '',
ifcModel: '',
ifcGuid: '',
content: { name: 'charlotte' }
},
{
uid: '51d9d08c-ef83-11ef-87b4-04bf1ba25820',
version: 1,
createTime: 2025-02-20T12:07:56.000Z,
author: 'your.name',
owner: 'your.name',
class: 'ndo:Workplaces',
confidentiality: 0,
restrictedUserRoles: '',
grantedUserRoles: '',
ifcModel: '',
ifcGuid: '',
content: { roomName: 'A2112' }
}
]