Skip to content
Navigation

updateRepoCustomModel

Rename a custom model, which moves its API name, so later requests address it by the new one, or name its primary field: the text, integer, picklist, or date field whose value names its records wherever they are referenced. A model starts with its first text field as its primary field. A change that leaves a policy reading a name or custom field the model no longer has is refused with SchemaChangeBreaksPolicy.

PATCH
/repos/{repo_id}/branches/{branch}/custom-models/{model_api_name}

Path parameters

  • repo_id
    string
    required
    pattern: ^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$
  • branch
    string
    required
    minLength: 1
  • model_api_name
    string
    required
    minLength: 1

Request body JSON required

  • name
    optional
    string
    minLength: 1
  • primary_field
    optional
    string
    minLength: 1

Returns

200

CustomModel

JSON
  • name
    string
    required
    minLength: 1
  • api_name
    string
    required
    minLength: 1
  • extension_id
    required

    One of the following:

    • ExtensionId
    • null
  • extension_installation_id
    required

    One of the following:

    • ExtensionInstallationId
    • null
  • fields
    array of
    object
    required
    • id
      string
      required
      pattern: ^field_[0-7][0-9a-hjkmnp-tv-z]{25}$
    • name
      string
      required
      minLength: 1
    • api_name
      string
      required
      minLength: 1
    • type
      text
      or
      rich_text
      or
      integer
      or
      decimal
      or
      currency
      or
      percent
      +11 more
      required
    • options
      required

      One of the following:

      • array<string>
      • null
    • required
      boolean
      required
    • unique
      boolean
      required
    • target_repo_id
      required

      One of the following:

      • RepoId
      • null
    • target_model_id
      required

      One of the following:

      • TypeId
      • null
    • on_delete
      required

      One of the following:

      • string
      • null
    • default_value
      required

      One of the following:

      • Option 1
      • null
    • formula
      required

      One of the following:

      • string
      • null
    • target_model
      required

      One of the following:

      • string
      • null
    • filter
      object
      required

      How a search takes this field: the operators its type takes, whether sort takes it, and the form its values are written in.

      • operators
        array of
        eq
        or
        ne
        or
        gt
        or
        gte
        or
        lt
        or
        lte
        +13 more
        required
      • sortable
        boolean
        required
      • value_format
        string
        required
  • primary_field
    required

    One of the following:

    • string
    • null
  • id
    string
    required
    pattern: ^custom_model_[0-7][0-9a-hjkmnp-tv-z]{25}$
  • id_prefix
    string
    required
    minLength: 1

400

InvalidRequest | RequestBodyTooDeep
JSON

One of the following:

  • InvalidRequestEncoded
    • _tag
      InvalidRequest
      required
    • part
      path
      or
      query
      or
      headers
      or
      body
      required
    • issues
      array of
      object
      required
      • path
        array of
        required

        One of the following:

        • string
        • integer
      • message
        string
        required
  • RequestBodyTooDeepEncoded
    • _tag
      RequestBodyTooDeep
      required
    • max_depth
      integer
      required
      maximum: 9007199254740991 · minimum: -9007199254740991

401

InvalidCredentials
JSON
  • _tag
    InvalidCredentials
    required

403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired
JSON

One of the following:

  • ForbiddenEncoded
    • _tag
      Forbidden
      required
    • message
      string
      required
  • ForbiddenOriginEncoded
    • _tag
      ForbiddenOrigin
      required
  • RequiresPersonalSessionEncoded
    • _tag
      RequiresPersonalSession
      required
  • RunBranchRequiredEncoded
    • _tag
      RunBranchRequired
      required
    • branch
      string
      required
      minLength: 1
    • message
      string
      required

404

BranchNotFound | CustomModelNotFound | RepoNotFound
JSON

One of the following:

  • BranchNotFoundEncoded
    • _tag
      BranchNotFound
      required
    • branch
      string
      required
      minLength: 1
  • CustomModelNotFoundEncoded
    • _tag
      CustomModelNotFound
      required
    • api_name
      string
      required
      minLength: 1
  • RepoNotFoundEncoded
    • _tag
      RepoNotFound
      required

409

InstalledSchemaReadOnly | SchemaChangeBreaksPolicy | RepoArchived
JSON

One of the following:

  • InstalledSchemaReadOnlyEncoded
    • _tag
      InstalledSchemaReadOnly
      required
    • extension_installation_id
      string
      required
      pattern: ^extension_installation_[0-7][0-9a-hjkmnp-tv-z]{25}$
  • SchemaChangeBreaksPolicyEncoded
    • _tag
      SchemaChangeBreaksPolicy
      required
    • problems
      array of
      object
      required
      • severity
        error
        or
        warning
        required
      • code
        syntax
        or
        unsupported
        or
        truthiness
        or
        duplicate
        or
        unknownModel
        or
        unknownField
        +14 more
        required
      • message
        string
        required
      • fix
        required

        One of the following:

        • string
        • null
      • location
        required

        One of the following:

        • object
          • line
            integer
            required
            maximum: 9007199254740991 · minimum: -9007199254740991
          • column
            integer
            required
            maximum: 9007199254740991 · minimum: -9007199254740991
        • null
      • policy
        required

        One of the following:

        • string
        • null
      • statement
        required

        One of the following:

        • integer
        • null
      • term
        required

        One of the following:

        • array<integer>
        • null
  • RepoArchivedEncoded
    • _tag
      RepoArchived
      required

413

WriteTooLarge | RequestBodyTooLarge
JSON

One of the following:

  • WriteTooLargeEncoded
    • _tag
      WriteTooLarge
      required
    • message
      string
      required
  • RequestBodyTooLargeEncoded
    • _tag
      RequestBodyTooLarge
      required
    • max_bytes
      integer
      required
      maximum: 9007199254740991 · minimum: -9007199254740991

422

InvalidCustomModel | WriteRefused
JSON

One of the following:

  • InvalidCustomModelEncoded
    • _tag
      InvalidCustomModel
      required
    • reason
      string
      required
      minLength: 1
  • WriteRefusedEncoded
    • _tag
      WriteRefused
      required
    • violations
      array of
      required

      One of the following:

      • object
        • kind
          required

          One of the following:

          • string
        • model
          string
          required
          minLength: 1
        • field
          string
          required
          minLength: 1
        • reason
          string
          required
          minLength: 1
        • record_ids
          array of
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
      • object
        • kind
          required

          One of the following:

          • string
        • model
          string
          required
          minLength: 1
        • field
          string
          required
          minLength: 1
        • reason
          string
          required
          minLength: 1
        • record_ids
          array of
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
      • object
        • kind
          required

          One of the following:

          • string
        • model
          string
          required
          minLength: 1
        • field
          string
          required
          minLength: 1
        • record_id
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
        • written_by
          ours
          or
          theirs
          required
        • value
          unknown
          required
        • reason
          string
          required
          minLength: 1
      • object
        • kind
          required

          One of the following:

          • string
        • model
          string
          required
          minLength: 1
        • field
          string
          required
          minLength: 1
        • record_id
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
        • referenced_model
          required

          One of the following:

          • string
          • null
        • referenced_record_id
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
      • object
        • kind
          required

          One of the following:

          • string
        • model
          string
          required
          minLength: 1
        • field
          string
          required
          minLength: 1
        • target_model
          required

          One of the following:

          • string
          • null
        • record_ids
          array of
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
      • object
        • kind
          required

          One of the following:

          • string
        • model
          string
          required
          minLength: 1
        • field
          string
          required
          minLength: 1
        • target_model
          required

          One of the following:

          • string
          • null
        • record_ids
          array of
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
      • object
        • kind
          required

          One of the following:

          • string
        • model
          string
          required
          minLength: 1
        • field
          string
          required
          minLength: 1
        • record_ids
          array of
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
      • object
        • kind
          required

          One of the following:

          • string
        • model
          string
          required
          minLength: 1
        • field
          string
          required
          minLength: 1
        • record_ids
          array of
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
      • object
        • kind
          required

          One of the following:

          • string
        • model
          string
          required
          minLength: 1
        • field
          string
          required
          minLength: 1
        • api_name
          string
          required
          minLength: 1
        • record_ids
          array of
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
      • object
        • kind
          required

          One of the following:

          • string
        • model
          string
          required
          minLength: 1
        • field
          string
          required
          minLength: 1
        • api_name
          string
          required
          minLength: 1
        • record_ids
          array of
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
      • object
        • kind
          required

          One of the following:

          • string
        • model
          string
          required
          minLength: 1
        • field
          string
          required
          minLength: 1
        • name
          string
          required
          minLength: 1
        • record_ids
          array of
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
      • object
        • kind
          required

          One of the following:

          • string
        • model
          string
          required
          minLength: 1
        • field
          string
          required
          minLength: 1
        • name
          string
          required
          minLength: 1
        • version
          string
          required
          minLength: 1
        • peer
          string
          required
          minLength: 1
        • range
          string
          required
          minLength: 1
        • peer_version
          required

          One of the following:

          • string
          • null
        • record_ids
          array of
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
      • object
        • kind
          required

          One of the following:

          • string
        • model
          string
          required
          minLength: 1
        • field
          string
          required
          minLength: 1
        • record_id
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
        • attachment_blob_id
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
      • object
        • kind
          required

          One of the following:

          • string
        • model
          string
          required
          minLength: 1
        • field
          string
          required
          minLength: 1
        • reason
          string
          required
          minLength: 1
        • record_ids
          array of
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
      • object
        • kind
          required

          One of the following:

          • string
        • reason
          string
          required
          minLength: 1
        • record_ids
          array of
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
        • field
          string
          required
          minLength: 1

429

RateLimited
JSON
  • _tag
    RateLimited
    required

500

RepoFailure
JSON
  • _tag
    RepoFailure
    required
  • reason
    string
    required

503

RepoBusy | SessionUnavailable | RateLimitUnavailable
JSON

One of the following:

  • RepoBusyEncoded
    • _tag
      RepoBusy
      required
    • message
      string
      required
  • SessionUnavailableEncoded
    • _tag
      SessionUnavailable
      required
  • RateLimitUnavailableEncoded
    • _tag
      RateLimitUnavailable
      required

Type to search…

↑↓ navigate↵ selectEsc close