Skip to main content
PUT
/
v2
/
entity-type-fields
/
{id}
Update Entity Type Field
curl --request PUT \
  --url https://public.api.serval.com/v2/entity-type-fields/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "enumOptions": [
    {
      "value": "<string>",
      "displayName": "<string>",
      "displayOrder": 123
    }
  ]
}
'
{
  "data": {
    "schemaMigrationId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The ID of the entity type field to update.

Body

application/json
name
string | null

New display name. When provided and different from the current name, the field is renamed (key re-derived via slugify). Omit to leave unchanged.

dataType
enum<string> | null

New data type. When provided and different from the current type, the field's type is changed and existing values are converted. Omit to leave unchanged.

Available options:
DATA_TYPE_UNSPECIFIED,
TEXT,
NUMBER,
BOOL,
TIMESTAMP,
ENUM,
ENTITY_REF,
USER_REF,
UNIQUE,
MULTI_SELECT,
FILE
enumOptions
EnumOptionInput · object[]

Required when data_type is changing to ENUM or MULTI_SELECT: the option set for the converted field.

Response

Success

data
data · object

Reference to the staged migration applying the change. data.schema_migration_id is empty if the request was a no-op. At most one attribute may change per request; changing both name and data_type at once returns InvalidArgument.