API Reference
Auto-generated
Research Schedules
API reference for research schedules endpoints.
Auto-generated
This page was generated from the OpenAPI spec. Run
make generate-docs to refresh after spec changes.POST /api/v1/research/schedules
POST
/api/v1/research/schedulesCreate a research schedule
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| X-Organization-Id | string | Optional | X-Organization-Id |
| name | string | Required | Name |
| cron | string | Required | Cron expression (5 fields), e.g. '0 9 * * *' |
| timezone | string | Optional | TimezoneDefault: UTC |
| research_config | object | Required | Frozen research request run on each schedule tick. The webhook lives on the schedule (''webhook_url'') and a fresh signing secret is minted per run; plan approval would stall an unattended run, so ''plan_first'' is rejected. |
| webhook_url | string | Optional | webhook_url |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/research/schedules \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name",
"cron": "example_cron",
"timezone": "example_timezone",
"research_config": "..."
}'Response Example
JSON
{
"status": "ok"
}GET /api/v1/research/schedules
GET
/api/v1/research/schedulesList research schedules
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | Optional | limitDefault: 20 |
| offset | integer | Optional | offsetDefault: 0 |
| active_only | boolean | Optional | active_onlyDefault: False |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/research/schedules \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"schedules": [],
"total": 0
}GET /api/v1/research/schedules/{schedule_id}
GET
/api/v1/research/schedules/{schedule_id}Get research schedule details
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| schedule_id | string | Required | schedule_id |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/research/schedules/<schedule_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"name": "example",
"cron": "example",
"timezone": "example",
"research_config": {},
"webhook_url": "example"
}PATCH /api/v1/research/schedules/{schedule_id}
PATCH
/api/v1/research/schedules/{schedule_id}Update a research schedule
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| schedule_id | string | Required | schedule_id |
| name | string | Optional | name |
| cron | string | Optional | cron |
| timezone | string | Optional | timezone |
| research_config | object | Optional | Frozen research request run on each schedule tick. The webhook lives on the schedule (''webhook_url'') and a fresh signing secret is minted per run; plan approval would stall an unattended run, so ''plan_first'' is rejected. |
| webhook_url | string | Optional | webhook_url |
| enabled | boolean | Optional | enabled |
Request Example
Bash
curl -X PATCH https://api.alterlab.io/api/v1/research/schedules/<schedule_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"name": "example",
"cron": "example",
"timezone": "example",
"research_config": {},
"webhook_url": "example"
}DELETE /api/v1/research/schedules/{schedule_id}
DELETE
/api/v1/research/schedules/{schedule_id}Delete a research schedule
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| schedule_id | string | Required | schedule_id |
Request Example
Bash
curl -X DELETE https://api.alterlab.io/api/v1/research/schedules/<schedule_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}POST /api/v1/research/schedules/{schedule_id}/pause
POST
/api/v1/research/schedules/{schedule_id}/pausePause a research schedule
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| schedule_id | string | Required | schedule_id |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/research/schedules/<schedule_id>/pause \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"name": "example",
"cron": "example",
"timezone": "example",
"research_config": {},
"webhook_url": "example"
}POST /api/v1/research/schedules/{schedule_id}/resume
POST
/api/v1/research/schedules/{schedule_id}/resumeResume a paused research schedule
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| schedule_id | string | Required | schedule_id |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/research/schedules/<schedule_id>/resume \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"name": "example",
"cron": "example",
"timezone": "example",
"research_config": {},
"webhook_url": "example"
}POST /api/v1/research/schedules/{schedule_id}/run
POST
/api/v1/research/schedules/{schedule_id}/runManually trigger a research schedule run
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| schedule_id | string | Required | schedule_id |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/research/schedules/<schedule_id>/run \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"id": "example",
"schedule_id": "example",
"status": "example",
"job_id": "example",
"error": "example",
"started_at": "example"
}GET /api/v1/research/schedules/{schedule_id}/runs
GET
/api/v1/research/schedules/{schedule_id}/runsList research schedule run history
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| schedule_id | string | Required | schedule_id |
| limit | integer | Optional | limitDefault: 20 |
| offset | integer | Optional | offsetDefault: 0 |
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/research/schedules/<schedule_id>/runs \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"runs": [],
"total": 0
}