Create Attribute Definition
Create a user attribute definition in the workspace.
Returns 409 if name is already used by another definition in the workspace.
The data_type is fixed at creation time and cannot be changed afterwards.
post/workspaces/{workspace_id}/user_attribute_definitions
Authorizations
AuthorizationstringRequired
A Personal Access Token (PAT).
Path parameters
workspace_idstringRequired
Body
namestringRequired
A stable, unique key for this definition within the workspace, referenced by the data model - unlike label, it can't be changed after creation.
data_typestring · enumRequiredPossible values:
Determines the format required in value wherever this definition is used: "string" allows free text, "number" requires a parseable number, "date" requires YYYY-MM-DD.
labelstringRequired
The human-facing display text for this definition; unlike name, this can be changed at any time.
Responses
201
Successful Response
application/json
4XX
Client Error
application/json
5XX
Server Error
application/json
post/workspaces/{workspace_id}/user_attribute_definitions
curl -L -X POST https://api-external.zenlytic.com/api/v2/workspaces/<workspace_id>/user_attribute_definitions \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"data_type": "string", "label": "Region", "name": "region"}'
{
"data": {
"id": "uad_123",
"workspace_id": "ws_456",
"name": "region",
"data_type": "string",
"label": "Region"
},
"meta": {
"status": "success",
"errors": [],
"warnings": []
}
}Last updated
Was this helpful?

