Skip to content
Navigation

Update a data-object definition

Applies a field-by-key diff to a definition. Authorization: organization administrators only — other callers get 403. Body is strict (immutable name/field keys rejected). Fields present are upserted; omitting an active field soft-archives it (archive-on-omit). Changing a field type while live objects exist returns 409 type_change_blocked (with fieldKey); the version bumps only on a schema-affecting change. Unknown id → 404, invalid body → 422 validation_failed. Returns { definition }.

PATCH
https://api.cloudraker.com/objects/definitions/{definitionId}
Try it
Path parameters
Request body
Live API request

This request can change data or incur charges for the selected organization.

Authorization

  • bearerAuth
    HTTP
    required

Path parameters

  • definitionId
    string
    required

Request body JSON required

  • labelSingular
    optional
    string
    maxLength: 200 · minLength: 1
  • labelPlural
    optional
    string
    maxLength: 200 · minLength: 1
  • namePlural
    optional
    string
    maxLength: 64 · minLength: 1
  • description
    optional
    string
    maxLength: 2000
  • icon
    optional
    string
    maxLength: 64 · minLength: 1
  • color
    optional
    string
    or null
  • labelFieldKey
    optional
    string
    minLength: 1
  • fields
    optional
    array of
    map<unknown>

    Field descriptors. Each names a key, a type and its type-specific options.

  • fieldGroups
    optional
    array of
    map<unknown>

Returns

200

The updated definition.

JSON
  • definition
    object
    required
    • _id
      string
      required
    • nameSingular
      string
      required
    • namePlural
      string
      required
    • labelSingular
      string
      required
    • labelPlural
      string
      required
    • description
      string
      required
    • icon
      string
      required
    • color
      string | null
      required
    • labelFieldKey
      string
      required

      Field key whose value is the object’s display label.

    • fields
      array of
      map<unknown>
      required

      The type-discriminated field model (13 field types plus composites). Emitted permissively so the resource stays navigable.

    • fieldGroups
      array of
      map<unknown>
      required
    • version
      number
      required

      Bumps only on a schema-affecting change.

    • archivedAt
      required

      Any of the following:

      • string
      • null
    • createdAt
      string
      required
      format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
    • updatedAt
      string
      required
      format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
    • createdBy
      string
      required

403

Caller is not an org admin.

404

No definition with that id.

409

type_change_blocked — a field type change is blocked by live objects.

422

validation_failed — the patch body is invalid.

Type to search…

↑↓ navigate↵ selectEsc close