Create a new entity

View as Markdown
Create a new entity of the specified type in the given workspace. If name is not provided, it will be auto-generated based on the entity type. Example: ``` POST /apis/entities/v2/workspaces/default/entities/customization_config { "name": "my-config", "data": { "target_id": "llama-2-7b", "training_options": {"learning_rate": 0.01} } } ```

Path parameters

workspacestringRequired
entity_typestringRequired

Request

This endpoint expects an object.
datamap from strings to anyRequired

Entity-specific data (schema is opaque to entity store, validated by client SDK)

namestringOptionalformat: "^[a-z](?!.*--)[a-z0-9\-@.+_]{1,62}(?<!-)$"

Entity name (optional - auto-generated if not provided). Name must start with a lowercase letter, be 2-63 characters, and contain only lowercase letters, digits, and hyphens (no consecutive hyphens, cannot end with a hyphen).

parentstringOptional
Parent entity ID for nested entities
projectstringOptional
The name of the project associated with this entity

Response

Successful Response
entity_typestring
Entity type identifier
idstring
UUID identifier
workspacestring
Workspace identifier
namestring
Entity name
datamap from strings to any
Entity data
created_atdatetime
Timestamp of entity creation
updated_atdatetime
Timestamp of last entity update
db_versioninteger
Database version of the entity for optimistic locking.
parentstring
Parent entity ID for nested entities
projectstring
The name of the project associated with this entity
created_bystring
Principal id for entity creator
updated_bystring
Principal id for last entity update

Errors

422
Unprocessable Entity Error