{
"$defs": {
"MgmtCustomFieldInput": {
"additionalProperties": false,
"description": "A provider custom field value in provision/update (`value: null` clears).",
"properties": {
"key": {
"description": "The field key.",
"type": "string"
},
"value": {
"description": "The value; `null` clears.",
"type": [
"string",
"null"
]
}
},
"required": [
"key"
],
"type": "object"
},
"ProfilePatch": {
"additionalProperties": false,
"description": "A partial profile update from K2.",
"properties": {
"custom_fields": {
"description": "Provider custom fields to set or clear; unlisted keys are kept.",
"items": {
"$ref": "#/$defs/MgmtCustomFieldInput"
},
"type": "array"
},
"display_name": {
"description": "A new display name, 1–100 characters.",
"type": [
"string",
"null"
]
},
"email": {
"description": "Set or clear the email.",
"type": [
"string",
"null"
]
},
"pronouns": {
"description": "Set or clear the pronouns (≤ 40).",
"type": [
"string",
"null"
]
},
"title": {
"description": "Set or clear the title (≤ 100).",
"type": [
"string",
"null"
]
},
"username": {
"description": "A new handle.",
"pattern": "^[a-z0-9_-]{2,64}$",
"type": [
"string",
"null"
]
}
},
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"description": "Body of `POST /mgmt/v1/principals/update`.",
"properties": {
"external_id": {
"description": "Who to update.",
"maxLength": 128,
"pattern": "^(k2:(principal|workspace|connect):[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|k2:owner|k2:server|local:[a-z0-9_-]{2,64}|link:[1-9][0-9]{0,18}:[A-Z2-7]{16}|app:[a-z0-9][a-z0-9._-]{0,63}|erased:[1-9][0-9]{0,18})$",
"type": "string"
},
"profile": {
"$ref": "#/$defs/ProfilePatch",
"description": "What to change."
}
},
"required": [
"external_id",
"profile"
],
"title": "UpdatePrincipalRequest",
"type": "object"
}