v1
latestOpenAPI 3.1.02026-07-13154170539.0 KBLogs
Create From Logs
Creates one or more entries based on body.equation and body.referenced_logs.
When body.derived=True (default): Eagerly computes each derived value and stores it in LogEvent.data.
When body.derived=False: Computes values and stores them directly in the base logs as regular entries.
The context parameter can be:
- A string: Uses the string as the context name with default values (description=None, is_versioned=False)
- An object: Uses the object's name, description, and is_versioned properties
post/v0/logs/derived
Request body
Example request
{
"project_name": "eval-project",
"context": {
"name": "experiment1/trial1",
"description": "Context for experiment 1 trial 1",
"is_versioned": true,
"allow_duplicates": true,
"unique_keys": {
"company_id": "int",
"department_id": "int",
"first_name": "str",
"last_name": "str"
},
"auto_counting": {
"company_id": "department_id"
},
"foreign_keys": [
{
"default": 0,
"name": "department_id",
"on_delete": "SET DEFAULT",
"on_update": "CASCADE",
"references": "Departments.id"
}
]
},
"key": "score_diff",
"equation": "{log0:score} - {log1:score}",
"referenced_logs": {
"log0": [
0,
1,
2
],
"log1": {
"filter_expr": "score > 0.5"
}
}
}Response
Derived log entries created successfully.
{"stackTrail":"paths:/v0/logs/derived:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}