v1
latestOpenAPI 3.1.02026-07-13154170539.0 KBContexts
Add Logs To Context
Adds existing logs to a context within a project. The logs must already exist in the project and can be specified by their IDs or by log_args criteria. The same logs can be associated with multiple contexts.
The context_name can be provided as a string or as an object with a name field. If the context doesn't exist, it will be created automatically.
If copy=True, new copies of the logs will be created and added to the context. If copy=False (default), the existing logs will be associated with the context.
post/v0/project/{project_name}/contexts/add_logs
Path parameters
project_namestring required
Name of the project to create context in.
Name of the project to create context in.
Request body
Example request
{
"context_name": "experiment1/trial1",
"log_ids": [
123,
456,
789
],
"log_args": {
"filter_expr": "metric > 0.9"
}
}Response
Successful Response
{"stackTrail":"paths:/v0/project/{project_name}/contexts/add_logs:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}