Rivier/ Reference/ keys

Declare a metadata key on one kind of object, or replace its declaration

put/metadata-fields/{object}/{key}

Declare a metadata key on one kind of object, or replace its declaration: a kind (text, number, integer, boolean, date, datetime, enum, url), whether it is required, bounds, a pattern or options. Every write of metadata by the project's keys is then checked against it, inside the businesses a platform works in too; undeclared keys stay free and values stay text. Values already kept are checked again only when written.

Before you call

Credential
Authorization: Bearer $KEY
Scope
keys:admin
Graphql
Mutation.keysMetadataFieldDeclare
Sdk
keys.metadataField.declare
Cli
keys metadata field declare

Parameters

  • objectstringrequired
    In the path
  • keystringrequired
    In the path

Request bodyapplication/json, required

  • kindstringrequired
    One of: text, number, integer, boolean, date, datetime, enum, url.
  • descriptionstring
    At most 300 characters.
  • requiredboolean
    Default: false.
  • minnumber
  • maxnumber
  • patternstring
    At most 200 characters.
  • optionslist of string

Responses

  • 200application/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