DTXS API REST API Databases

Databases

Endpoints to manage list of databases.

For the definition of the database 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}

Create an empty 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

Parameters

Parameter Required Description Example
databaseName yes, extracted from endpoint URL Name of the database to create. TestDatabase

Responses

Code Description Return value Example
200 Success. Name of the created database. TestDatabase
400 Unknown error.
401 Not authorized.
406 Format of the request is not valid.

DELETE /database/{$databaseName}

Delete a database.

cURL example

curl \
  -X DELETE \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
  -d '' \
  https://dtxs-server.example.com/database/TestDatabase

Parameters

Parameter Required Description Example
databaseName yes, extracted from endpoint URL Name of the database to delete. TestDatabase

Responses

Code Description Return value Example
200 Success. Name of the deleted database. TestDatabase
400 Unknown error.
401 Not authorized.
404 Database does not exist.
406 Format of the request is not valid.

GET /databases

Get list of available databases.

cURL example

curl \
  -X GET \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
  -d '' \
  https://dtxs-server.example.com/databases

Parameters

No parameters.

Responses

Code Description Return value Example
200 Success. List of available databases. See example.
400 Unknown error.
401 Not authorized.
406 Format of the request is not valid.

Examples

Succesfull response for GET /databases

[
  {
    "name": "testDatabase",
    "created": "2024-10-30T09:04:44.928Z"
  }
]
(C) wai.blue | Rendered using GuideVis