Documentation Index
Fetch the complete documentation index at: https://docs.velahq.xyz/docs/llms.txt
Use this file to discover all available pages before exploring further.
List schemas
schemas = app_res.schemas.list()
Get by event name
schema = app_res.schemas.get_by_event_name("order.placed")
Create a schema
schema = app_res.schemas.create({
"event_name": "order.placed",
"description": "Emitted when a checkout completes",
"fields": [
{
"id": "fld-order-id",
"name": "orderId",
"type": "string",
"required": True,
"validation": {"min": 1, "max": 128},
},
{
"id": "fld-amount",
"name": "amountCents",
"type": "number",
"required": True,
},
{
"id": "fld-currency",
"name": "currency",
"type": "enum",
"required": True,
"enum_values": ["USD", "EUR", "GBP"],
},
],
"metadata_fields": [
{"id": "meta-env", "name": "environment", "type": "string"},
],
})
Update a schema
updated = app_res.schemas.update(schema.id, {"description": "Updated"})
Field types
| Type | Description | Validation options |
|---|
string | Text value | min, max (length), pattern (regex) |
number | Numeric value | min, max |
boolean | True or False | — |
date | ISO-8601 date string | — |
enum | Fixed set of strings | Provide enum_values list |
object | Nested dict | — |
You can also manage schemas as code using the Vela CLI.