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 create. | TestDatabase |
class | yes | Class to which the record is classified. | 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
{
"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 to create. | TestDatabase |
recordUid | yes, extracted from endpoint URL | UID of the record to update. | 0c9597ea-9054-11ef-8950-f4ee08cb8a79 |
content | yes | New content of the new record. | See example. |
Responses
Code | Description | Return value | Example |
---|---|---|---|
200 | Success. | UID of the update record. | 0c9597ea-9054-11ef-8950-f4ee08cb8a79 |
400 | Unknown error. | ||
401 | Not authorized. | ||
404 | Database or record do not exist. | ||
406 | Format of the request is not valid. |
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 to create. | TestDatabase |
recordUid | yes, extracted from endpoint URL | UID of the record to update. | 0c9597ea-9054-11ef-8950-f4ee08cb8a79 |
Responses
Code | Description | Return value | Example |
---|---|---|---|
200 | Success. | UID of the update record. | 0c9597ea-9054-11ef-8950-f4ee08cb8a79 |
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. |
GET /database/{$databaseName}/record/{$recordUid}
Get 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 to create. | TestDatabase |
recordUid | yes, extracted from endpoint URL | UID of the record to update. | 0c9597ea-9054-11ef-8950-f4ee08cb8a79 |
Responses
Code | Description | Return value | Example |
---|---|---|---|
200 | Success. | Record data. | See example. |
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. |
Examples
Example success response for GET /database/{$databaseName}/record/{$recordUid}
{
"recordId": "HslFTT2WwXj91DxSWx5",
"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"
]
}
}
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 '{ "class": "Actors.Persons", "content.GivenName": "Thomas" }' \
https://dtxs-server.example.com/database/TestDatabase/records
Parameters
Parameter | Required | Description | Example |
---|---|---|---|
databaseName | yes, extracted from endpoint URL | Name of the database to create. | TestDatabase |
query | no | Search query. | See example. |
Responses
Code | Description | Return value | Example |
---|---|---|---|
200 | Success. | List of found records. | |
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. |
Examples
Example search query for POST /database/{$databaseName}/records
{
"class": "Actors.Persons",
"content.GivenName": "Thomas"
}