Skip to main content
The App DB API allows developers to interact with AppDB, a NoSQL database for storing arbitrary JSON documents. This API supports CRUD operations, querying, and aggregation, enabling developers to manage data efficiently within their Domo applications.

Features

  • CRUD Operations: Create, read, update, and delete documents in AppDB collections.
  • Collection Management: Programmatically update collections.

Endpoints

Get Document

Description: Retrieve a specific document from a collection.

Playground

HTTP Request:
GET /api/datastores/v1/collections/{collectionId}/documents/{documentId}
Headers:
  • X-DOMO-Developer-Token: <developer token here>
  • Accept: application/json
  • Content-Type: application/json
Response:
HTTP/1.1 200 OK

Query Document

Description: Retrieve a specific document from a collection via query.

Playground

HTTP Request:
POST /api/datastores/v2/collections/{collectionId}/documents/query
Headers:
  • X-DOMO-Developer-Token: <developer token here>
  • Accept: application/json
  • Content-Type: application/json
Request Body:
{
  "content.userId": {
    "$eq": "123456789"
  }
}
Response:
HTTP/1.1 200 OK

List Documents

Description: Retrieve all documents from a specified collection. Note there is an upper limit of 10,000 documents. We recommend using pagination to retrieve large sets of documents.

Playground

HTTP Request:
GET /api/datastores/v1/collections/{collectionId}/documents
Headers:
  • X-DOMO-Developer-Token: <developer token here>
  • Accept: application/json
  • Content-Type: application/json
Response:
HTTP/1.1 200 OK

Create Document

Description: Add a new document to a specified collection.

Playground

HTTP Request:
POST /api/datastores/v1/collections/{collectionId}/documents/
Headers:
  • X-DOMO-Developer-Token: <developer token here>
  • Accept: application/json
  • Content-Type: application/json
Request Body:
{
  "content": {
    // content goes here
  }
}
Response:
HTTP/1.1 200 OK

Update Document

Description: Modify an existing document in a collection.

Playground

HTTP Request:
PUT /api/datastores/v1/collections/{collectionId}/documents/{documentId}
Headers:
  • X-DOMO-Developer-Token: <developer token here>
  • Accept: application/json
  • Content-Type: application/json
Request Body:
{
  "content": {
    // content goes here
  }
}
Response:
HTTP/1.1 200 OK

Delete Document

Description: Remove a document from a collection.

Playground

HTTP Request:
DELETE /api/datastores/v1/collections/{collectionId}/documents/{documentId}
Headers:
  • X-DOMO-Developer-Token: <developer token here>
  • Accept: application/json
  • Content-Type: application/json
Response:
HTTP/1.1 204 No Content

Bulk Delete Documents

Description: Remove multiple documents from a collection in a single request. Please note, this will end up reaching the maximum url length limit of your browser/client. If you have a large number of documents to delete, this can be done in batches.

Playground

HTTP Request:
DELETE /api/datastores/v1/collections/{collectionId}/documents/bulk?ids=[ids]
Headers:
  • X-DOMO-Developer-Token: <developer token here>
  • Accept: application/json
  • Content-Type: application/json
Response:
HTTP/1.1 200 OK

Update Collection Schema

Description: Update the schema of a collection.

Playground

HTTP Request:
PUT /api/datastores/v1/collections/{collectionId}
Headers:
  • X-DOMO-Developer-Token: <developer token here>
  • Accept: application/json
  • Content-Type: application/json
Request Body:
{
  "schema": {
    "columns": [
      {
        "type": "STRING",
        "name": "username",
        "visible": true
      },
      {
        "type": "STRING",
        "name": "band",
        "visible": true
      },
      {
        "type": "STRING",
        "name": "favorite color",
        "visible": true
      }
    ]
  },
  "syncEnabled": true
}
Response:
HTTP/1.1 200 OK

Update Collection Permissions

Description: Update permissions for a collection as it relates to a specific Custom App. Proxy ID is available in the Asset Library

Playground

Parameter Options:
PermissionNameDescription
readReadGrants the ability to read documents in the collection.
shareShareGrants the ability to share the collection with other users or groups.
deleteDeleteAllows the deletion of the entire collection.
writeWriteProvides write access to the collection, including creating and updating data.
adminAdminGrants full administrative control over the collection.
create_contentCreate ContentAllows creating new documents in the collection.
read_contentRead ContentEnables reading the content of documents in the collection.
update_contentUpdate ContentPermits updating existing documents in the collection.
delete_contentDelete ContentAuthorizes the deletion of documents from the collection.
HTTP Request:
PUT /api/datastores/v1/collections/{collectionId}/permission/RYUU_APP/{proxyId}?permissions=read,create_content,read_content,update_content,delete_content
Headers:
  • X-DOMO-Developer-Token: <developer token here>
  • Accept: application/json
  • Content-Type: application/json
Response:
HTTP/1.1 204 No Content