Data

Change a collection

Changes the name, description, access, triggers or schema. Fields you leave out stay as they are, including inside access and triggers. A new schema applies to new and changed documents; existing documents are not checked again. A new name breaks a form that posts to the old one.

patch/collections/{id}

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/collections/{id}
  • 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.

Request body

namestring

The name of the collection, unique in the project: 2 to 40 characters, a lowercase letter first, then lowercase letters, digits and underscores (contact, signups, menu). A form posts to it by this name.

descriptionstring nullable

What the collection is for, for your own overview.

schemaobject nullable

Optional JSON Schema (a subset of draft 2020-12, at most 16 kB) that every document must match, with type "object" at the root. Supported: type, properties, required, additionalProperties, items, minItems, maxItems, enum, const, minLength, maxLength, pattern, format (email, uri, date, date-time, time), minimum, maximum, exclusiveMinimum, exclusiveMaximum, title and description.

Response

The collection as it is now.

idstring uuid required

The id of the collection. Its name works in the path as well.

namestring required

The name, unique in the project. A form posts to it by this name.

descriptionstring nullable required

What the collection is for, or null.

schemaobject nullable required

The JSON Schema every document must match, or null.

personal_databoolean

true for a collection with personal data imported from WordPress (form entries, orders, customers, users, reviews). It always stays private.

document_countinteger required

How many documents the collection has now.

created_atstring date-time required

When the collection was created.

updated_atstring date-time required

When the collection last changed.

testboolean required

true for a collection of a test project.

Changes

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