Rivier/ Reference/ content

Declare one of the platform's own types, or its next version

post/data/types

Declare one of the platform's own types, or its next version: typed fields (the content model's), an optional unique field, which of business and customer every row carries, who besides the platform may read or write (a business's owner reads; a customer reads or writes their own), whose a business's rows are when its connection ends, and what forgetting a customer does to theirs. A change that would refuse rows already kept is refused with what breaks; the same declaration again changes nothing.

Before you call

Credential
Authorization: Bearer $KEY
Scope
content:admin
Graphql
Mutation.contentDataTypeDeclare
Sdk
content.dataType.declare
Cli
content data type declare

Request bodyapplication/json, required

  • keystringrequired
    Pattern: ^[a-z][a-z0-9_]{0,39}$.
  • namestringrequired
    At most 120 characters.
  • descriptionstring
    At most 600 characters.
  • fieldsobjectrequired
  • titleFieldstring
    Pattern: ^[a-z][A-Za-z0-9_]{0,39}$.
  • uniquestring
    Pattern: ^[a-z][A-Za-z0-9_]{0,39}$.
  • scopestring
    One of: project, business, customer, business_customer. Default: project.
  • accessobject
    Default: {}.
    • businessstring
      One of: none, read. Default: none.
    • customerstring
      One of: none, read, write. Default: none.
  • keepstring
    One of: platform, business. Default: platform.
  • erasestring
    One of: remove, detach. Default: remove.

Responses

  • 201application/json
    Success
    • 400application/json
      The request was malformed
      • errorstringrequired
      • messagestring
    • 401application/json
      No valid credential
      • errorstringrequired
      • messagestring
    • 403application/json
      The credential lacks the scope, origin or address
      • errorstringrequired
      • messagestring
    • 429application/json
      Over the key's rate limit; see Retry-After
      • errorstringrequired
      • messagestring

    This page as Markdown