Skip to main content
Update a field in a model in the Application

Authorizations

Authorization
string
header
required

Builder authentication and authorization

x-sutro-api-client
string
header
required

A unique identifier for the API Client making a request

Path Parameters

applicationId
string<uuid>
required
modelId
string
required
Pattern: ^urn:sutro:model:.*$
fieldId
string
required
Pattern: ^urn:sutro:edge:.*$

Body

application/json
name
string

The name of the field, e.g. user

relationshipOwner
boolean

If true, this field's parent model is the owner of the relationship - basically always except if this is a 'belongs to' pointer. Every relationship needs to point to another model's field.

min
number

The minimum number of values that can be stored in this field

max
number | null

The maximum number of values that can be stored in this field

to
enum<string>

The type of the field's value

Available options:
p_TEXT,
p_IMAGE,
p_BOOLEAN,
p_NUMBER,
p_DATE,
p_DATE_TIME,
p_TIME,
p_ADDRESS,
p_PHONE_NUMBER,
p_CURRENCY_AMOUNT,
p_LINK,
p_VIDEO,
p_STAR_RATING,
p_FILE
accessControl
object
computed
string

Optional computed expression for the field

defaultValue
any

The default value for the field

enum
(string | number | boolean)[]

If set, the field is an enum and can only take on these values

Response

The updated application

An application

id
string<uuid>
required

Unique identifier for the application

scode
SCode representation of an Application · object
required

The application's SCode definition

projectId
string<uuid>
required

The project this application belongs to

status
object
required
isActive
boolean
required

Whether the application is currently active for billing/runtime purposes

name
string

The name of the application

serverVersion
string

The current saved server version (semver)

lastPublishedAt
string<date-time>

When the application was last published

lastUnpublishedAt
string<date-time>

When the application was last unpublished