v1
latestOpenAPI 3.1.02026-07-13154170539.0 KBLogs
Create Fields
Creates one or more fields in a project. Fields are field definitions that can be used in logs. This endpoint allows pre-defining fields before adding any log data.
Each field can have an optional description. If a field already exists, its description will be updated.
post/v0/logs/fields
Request body
Example request
{
"project_name": "eval-project",
"context": "experiment1/trial1",
"fields": {
"email": {
"description": "User email address",
"type": "str",
"unique": true
},
"score": "int",
"status": {
"type": "enum",
"values": [
"pending",
"approved",
"rejected"
]
},
"timestamp": {
"description": "ISO-8601 timestamp",
"format": "date-time",
"type": "string"
}
},
"backfill_logs": true
}Response
Fields created successfully
{"stackTrail":"paths:/v0/logs/fields:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}