Models

Updates only the properties present in the body; omitted properties keep their current value. Send null (or an empty string) for label, description, groupLabel, format, aiContext, synonyms or sampleValues to clear it. For drillFields, null reverts to the view default and an empty list or empty string removes drill. Timeframe fields (for example created_at[date]) and the shared fields of a composite topic cannot be cleared; that request is a 400.

patch/api/v1/models/{modelId}/view/{viewName}/field/{fieldName}

Request

  • Base URL
    https://omniapp.co (the document declares no server; this is the origin it was published from)
  • URL
    https://omniapp.co/api/v1/models/{modelId}/view/{viewName}/field/{fieldName}
  • Auth
    HTTP bearer

Path parameters

modelIdstring uuid required

Model UUID

Example:123e4567-e89b-12d3-a456-426614174000
viewNamestring required

View name. Must not contain whitespace; a trailing .view or .query.view file suffix is ignored.

Example:orders
fieldNamestring required

Field name

Example:total_amount

Query parameters

branch_idstring uuid

The branch to work in: its orgBranchId, or its per-model branch ID as listed under branches by GET /api/v1/models?include=activeBranches. 404 when the branch has no branch on this model.

Example:123e4567-e89b-12d3-a456-426614174001

Request body

aiContextstring nullable

AI context for the field; null or an empty string clears it

descriptionstring nullable

Field description; null or an empty string clears it

elseValuestring

Else value for grouped fields

formatstring nullable

Field format; null or an empty string clears it

groupLabelstring nullable

Group label; null or an empty string clears it

labelstring nullable

Field label; null or an empty string clears it

newFieldNamestring

New field name (for rename)

newViewNamestring

New view name (for move)

sqlstring

SQL expression for the field

topicContextstring

Topic context for the field

Example request

{
  "newViewName": "orders"
}

Response

Field updated successfully

successboolean required

Whether the operation was successful

Example response

{
  "success": true
}

Changes

    • breaking

      added the pattern ^\S*$ to the path request parameter viewName

    • breaking

      the request property type changed from array to no type

    • info

      added subschema #1 subschema #2 to the request property anyOf list

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      request property list-of-types was widened by adding types null and string to media type application/json

    • info

      request property list-of-types was widened by adding types string to media type application/json

    • info

      request property list-of-types was widened by adding types string to media type application/json

    • info

      request property list-of-types was widened by adding types null and string to media type application/json

    • info

      request property list-of-types was widened by adding types string to media type application/json

    • info

      request property list-of-types was widened by adding types string to media type application/json

    • info

      request property list-of-types was widened by adding types string to media type application/json

    • info

      request property list-of-types was widened by adding types string to media type application/json

    • info

      request property list-of-types was widened by adding types string to media type application/json

    • info

      request property list-of-types was widened by adding types string to media type application/json

    • info

      request property list-of-types was widened by adding types null and string to media type application/json

    • info

      request property list-of-types was widened by adding types null and string to media type application/json

    • info

      request property list-of-types was widened by adding types string to media type application/json