Data

Change a document

Send data to replace the whole document, or merge to change some fields (JSON Merge Patch, RFC 7396: a field you send replaces that field, null removes it, an object is merged field by field). Not both. The result must match the schema of the collection. Triggers do not fire on a change.

patch/collections/{id}/documents/{docId}

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/collections/{id}/documents/{docId}
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.hypamoon.com/oauth/authorize, token URL https://api.hypamoon.com/oauth/token, scopes: data:write)

Path parameters

idstring required

The id of the collection, or its name.

docIdstring uuid required

The id of the document.

Request body

dataobject

The document: any JSON object, at most 64 kB.

mergeobject

Merged into the document as a JSON Merge Patch (RFC 7396): a field you send replaces that field, null removes it, an object is merged field by field.

Response

The document as it is now.

idstring uuid required

The id of the document.

collection_idstring uuid required

The id of its collection.

dataobject required

The document itself: a JSON object.

source'api' | 'public' required

api: added with an API key. public: sent from a form on a website.

created_atstring date-time required

When the document was added.

updated_atstring date-time required

When the document last changed.

testboolean required

true for a document of a test project. No email was sent for it.

Changes

No recorded changes to this operation across all 1 revision of this API.