Перейти к содержимому

API: runs

Статус: GA Доступ: по токену контракт API: 0.3.0 · capability 2026-09-03.1 Открыть как Markdown Открыть в Claude Открыть в ChatGPT

List Runs

Открыть отдельной страницей →

filtered, paginated run list (default sort createtime:desc).

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
statusqueryнетstring | null
pipeline_idqueryнетstring | null
entityqueryнетstring | null
contractqueryнетinteger | null
limitqueryнетinteger
offsetqueryнетinteger
sortqueryнетstring

Ответы:

КодСмыслТело
200Successful ResponseRunListResponse
401Missing or invalid authentication credentialsErrorResponse
422Validation ErrorHTTPValidationError

Launch Run

Открыть отдельной страницей →

validate, create a queued run, stage the fixture, enqueue the job.

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
Idempotency-KeyheaderнетstringOptional.

Тело запроса: application/json — схема RunLaunchRequest

ПолеТипОбязательноОписание
allow_regeneratebooleanнет
entitystringда
guidintegerда
mode"live" | "mock" | "replay"нет
paramsobjectнет
pipeline_idstringда
pipeline_variantstring | nullнет
pipeline_versionstring | nullнет
stepsмассив string | nullнет

Пример:

{
"allow_regenerate": false,
"entity": "generated_articles",
"guid": 31567,
"mode": "live",
"params": {},
"pipeline_id": "generate"
}

Ответы:

КодСмыслТело
201Successful ResponsePipelineRunRead
401Missing or invalid authentication credentialsErrorResponse
409The record already generated successfully and allow_regenerate is false, or the entity is lockedErrorResponse
422Validation ErrorHTTPValidationError
429Agent token: the concurrent-run cap for this token is reachedErrorResponse

Пример ответа (201):

{
"createtime": "2026-09-03T02:14:04Z",
"current_step": "make_article_structure",
"entity_guid": 31567,
"entity_name": "generated_articles",
"guid": 1842,
"metrics": {
"llm_calls": 11
},
"mode": "live",
"pipeline_id": "generate",
"started_at": "2026-09-03T02:14:05Z",
"started_by": "agent@entherium.dev",
"status": "running",
"steps_done": 7,
"steps_total": 18,
"trigger": "api",
"updatetime": "2026-09-03T02:19:40Z"
}

List Pipelines

Открыть отдельной страницей →

every registered pipeline definition.

Авторизация: нужен Authorization: Bearer <token>

Ответы:

КодСмыслТело
200Successful Responseмассив PipelineDefRead
401Missing or invalid authentication credentialsErrorResponse

Get Pipeline Def

Открыть отдельной страницей →

a single pipeline definition.

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
pipeline_idpathдаstring

Ответы:

КодСмыслТело
200Successful ResponsePipelineDefRead
401Missing or invalid authentication credentialsErrorResponse
422Validation ErrorHTTPValidationError

Run Preflight

Открыть отдельной страницей →

Can this run launch? Returns can_launch + blocking reasons WITHOUT creating a run, so a caller can check quota, pool and pipeline state before spending a launch.

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
pipeline_idqueryдаstring
guidqueryдаinteger
entityqueryнетstring | null

Ответы:

КодСмыслТело
200Successful Responseobject
401Missing or invalid authentication credentialsErrorResponse
422Validation ErrorHTTPValidationError

List Schedules

Открыть отдельной страницей →

every schedule, newest first.

Авторизация: нужен Authorization: Bearer <token>

Ответы:

КодСмыслТело
200Successful Responseмассив RunScheduleRead
401Missing or invalid authentication credentialsErrorResponse

Create Schedule

Открыть отдельной страницей →

create a schedule (validates pipeline + cron; computes next_fire_at).

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
Idempotency-KeyheaderнетstringOptional.

Тело запроса: application/json — схема RunScheduleCreate

ПолеТипОбязательноОписание
cronstringда
enabledbooleanнет
entitystringда
max_targets_per_fireintegerнет
modestringнет
namestringда
paramsobjectнет
pipeline_idstringда
selectorobjectда
stepsмассив string | nullнет

Ответы:

КодСмыслТело
201Successful ResponseRunScheduleRead
401Missing or invalid authentication credentialsErrorResponse
422Validation ErrorHTTPValidationError

Delete Schedule

Открыть отдельной страницей →

delete a schedule (idempotent).

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
schedule_idpathдаinteger
Idempotency-KeyheaderнетstringOptional.

Ответы:

КодСмыслТело
204Successful Response—
401Missing or invalid authentication credentialsErrorResponse
422Validation ErrorHTTPValidationError

Get Schedule

Открыть отдельной страницей →

a single schedule.

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
schedule_idpathдаinteger

Ответы:

КодСмыслТело
200Successful ResponseRunScheduleRead
401Missing or invalid authentication credentialsErrorResponse
422Validation ErrorHTTPValidationError

Update Schedule

Открыть отдельной страницей →

partial update; a changed cron recomputes next_fire_at.

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
schedule_idpathдаinteger
Idempotency-KeyheaderнетstringOptional.

Тело запроса: application/json — схема RunScheduleUpdate

ПолеТипОбязательноОписание
cronstring | nullнет
enabledboolean | nullнет
max_targets_per_fireinteger | nullнет
modestring | nullнет
namestring | nullнет
paramsobject | nullнет
selectorobject | nullнет
stepsмассив string | nullнет

Ответы:

КодСмыслТело
200Successful ResponseRunScheduleRead
401Missing or invalid authentication credentialsErrorResponse
422Validation ErrorHTTPValidationError

Fire Now

Открыть отдельной страницей →

fire now (same seam as the tick-loop / an external Cloud Scheduler).

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
schedule_idpathдаinteger
Idempotency-KeyheaderнетstringOptional.

Ответы:

КодСмыслТело
200Successful ResponseScheduleFireResult
401Missing or invalid authentication credentialsErrorResponse
422Validation ErrorHTTPValidationError

Schedule Runs

Открыть отдельной страницей →

guids of the runs this schedule produced (params.schedule_id).

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
schedule_idpathдаinteger

Ответы:

КодСмыслТело
200Successful Responseмассив integer
401Missing or invalid authentication credentialsErrorResponse
422Validation ErrorHTTPValidationError

Get Run

Открыть отдельной страницей →

run record + its steps + target card + pipeline def.

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
run_guidpathдаinteger

Ответы:

КодСмыслТело
200Successful ResponseRunDetailResponse
401Missing or invalid authentication credentialsErrorResponse
422Validation ErrorHTTPValidationError

Cancel Run

Открыть отдельной страницей →

Cancel a run. A queued run is cancelled immediately; a run that is already executing is marked cancelled but finishes its current execution (mid-flight interruption is not implemented). Idempotent: a terminal run answers 409.

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
run_guidpathдаinteger
Idempotency-KeyheaderнетstringOptional.

Ответы:

КодСмыслТело
200Successful ResponsePipelineRunRead
401Missing or invalid authentication credentialsErrorResponse
409The run is already terminalErrorResponse
422Validation ErrorHTTPValidationError

Пример ответа (200):

{
"createtime": "2026-09-03T02:14:04Z",
"current_step": "make_article_structure",
"entity_guid": 31567,
"entity_name": "generated_articles",
"guid": 1842,
"metrics": {
"llm_calls": 11
},
"mode": "live",
"pipeline_id": "generate",
"started_at": "2026-09-03T02:14:05Z",
"started_by": "agent@entherium.dev",
"status": "running",
"steps_done": 7,
"steps_total": 18,
"trigger": "api",
"updatetime": "2026-09-03T02:19:40Z"
}

Get Run Log

Открыть отдельной страницей →

assembled log; step filters to one step, tail keeps last N.

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
run_guidpathдаinteger
stepqueryнетstring | null
tailqueryнетinteger | null

Ответы:

КодСмыслТело
200Successful ResponseRunLogResponse
401Missing or invalid authentication credentialsErrorResponse
422Validation ErrorHTTPValidationError

Retry Run

Открыть отдельной страницей →

create a new run; from_step resumes from a step snapshot.

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
run_guidpathдаinteger
Idempotency-KeyheaderнетstringOptional.

Тело запроса: application/json — схема RunRetryRequest

ПолеТипОбязательноОписание
from_stepstring | nullнет

Пример:

{
"from_step": "step_15_make_layout"
}

Ответы:

КодСмыслТело
201Successful ResponsePipelineRunRead
401Missing or invalid authentication credentialsErrorResponse
409The run cannot be retried from its current stateErrorResponse
422Validation ErrorHTTPValidationError
429Agent token: the concurrent-run cap for this token is reachedErrorResponse

Пример ответа (201):

{
"createtime": "2026-09-03T02:14:04Z",
"current_step": "make_article_structure",
"entity_guid": 31567,
"entity_name": "generated_articles",
"guid": 1842,
"metrics": {
"llm_calls": 11
},
"mode": "live",
"pipeline_id": "generate",
"started_at": "2026-09-03T02:14:05Z",
"started_by": "agent@entherium.dev",
"status": "running",
"steps_done": 7,
"steps_total": 18,
"trigger": "api",
"updatetime": "2026-09-03T02:19:40Z"
}

Get Run Steps

Открыть отдельной страницей →

the step rows of a run, ordered by seq/attempt.

Авторизация: нужен Authorization: Bearer <token>

ПараметрГдеОбязателенТипОписание
run_guidpathдаinteger

Ответы:

КодСмыслТело
200Successful Responseмассив RunStepRead
401Missing or invalid authentication credentialsErrorResponse
422Validation ErrorHTTPValidationError