Skip to main content

Automations & monitoring

Operational endpoints for a deployed Magic App: its scheduled automations, its logs, and its tool-usage statistics. All require app:write.

Automations

Automations are scheduled HTTP calls made through the app proxy. An agent with a cron: field in informer.yaml desugars into an automation that POSTs to the agent's _trigger on the schedule.

GET /api/apps/{id}/automations

List the app's automations.

List an app’s automationsGET /api/apps/00000000-0000-4000-8000-000000000001/automations
GET /api/apps/{id}/automations lists the app’s scheduled automations. An agent with a `cron:` field desugars into one that POSTs to the agent’s _trigger.
Response · 200
[
{
"id": "00000000-0000-4000-8000-000000000002",
"tenant": "acme",
"appId": "00000000-0000-4000-8000-000000000001",
"name": "order-watcher:cron",
"description": "Cron schedule for agent order-watcher",
"method": "POST",
"route": "/agents/order-watcher/_trigger",
"interval": "0 6 * * *",
"payload": {
"event": "_cron",
"payload": {
"cron": "0 6 * * *"
}
},
"params": null,
"query": null,
"headers": null,
"status": "active",
"nextRunAt": "2026-01-15T16:20:00.000Z",
"ownerId": "admin",
"source": "agent",
"createdAt": "2026-01-15T16:20:00.000Z",
"updatedAt": "2026-01-15T16:20:00.000Z"
}
]
Captured from the API examples test suite; ids and timestamps are normalized.

GET /api/apps/{id}/automations/{automationId}

Get one automation.

Get one automationGET /api/apps/00000000-0000-4000-8000-000000000001/automations/00000000-0000-4000-8000-000000000002
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/apps/00000000-0000-4000-8000-000000000001/automations/00000000-0000-4000-8000-000000000002"
}
},
"id": "00000000-0000-4000-8000-000000000002",
"tenant": "acme",
"appId": "00000000-0000-4000-8000-000000000001",
"name": "order-watcher:cron",
"description": "Cron schedule for agent order-watcher",
"method": "POST",
"route": "/agents/order-watcher/_trigger",
"interval": "0 6 * * *",
"payload": {
"event": "_cron",
"payload": {
"cron": "0 6 * * *"
}
},
"params": null,
"query": null,
"headers": null,
"status": "active",
"nextRunAt": "2026-01-15T16:20:00.000Z",
"ownerId": "admin",
"source": "agent",
"createdAt": "2026-01-15T16:20:00.000Z",
"updatedAt": "2026-01-15T16:20:00.000Z"
}
Captured from the API examples test suite; ids and timestamps are normalized.

PUT /api/apps/{id}/automations/{automationId}

Update an automation.

FieldTypeDescription
statusstringactive or stopped. stopped clears nextRunAt; active recomputes it from the interval.
descriptionstringOptional description.
Update an automationPUT /api/apps/00000000-0000-4000-8000-000000000001/automations/00000000-0000-4000-8000-000000000002
PUT /api/apps/{id}/automations/{automationId} updates { status, description }. status "stopped" pauses it (clears nextRunAt); "active" recomputes nextRunAt from the interval. Requires app:write.
Request body
{
"status": "stopped"
}
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/apps/00000000-0000-4000-8000-000000000001/automations/00000000-0000-4000-8000-000000000002"
}
},
"id": "00000000-0000-4000-8000-000000000002",
"tenant": "acme",
"appId": "00000000-0000-4000-8000-000000000001",
"name": "order-watcher:cron",
"description": "Cron schedule for agent order-watcher",
"method": "POST",
"route": "/agents/order-watcher/_trigger",
"interval": "0 6 * * *",
"payload": {
"event": "_cron",
"payload": {
"cron": "0 6 * * *"
}
},
"params": null,
"query": null,
"headers": null,
"status": "stopped",
"nextRunAt": null,
"ownerId": "admin",
"source": "agent",
"createdAt": "2026-01-15T16:20:00.000Z",
"updatedAt": "2026-01-15T16:20:00.000Z"
}
Captured from the API examples test suite; ids and timestamps are normalized.

Logs

GET /api/apps/{id}/logs

Return the app's logs as { logs, summary }.

Query paramDescription
leveldebug | info | warn | error
sourceserver | webhook | tool | agent
agentId / toolIdFilter to one agent or tool (uuid).
limitMax rows (1–500, default 100).
beforeISO timestamp for paging back.
Read an app’s logsGET /api/apps/00000000-0000-4000-8000-000000000001/logs
GET /api/apps/{id}/logs returns { logs, summary }. Filter with ?level= (debug|info|warn|error), ?source= (server|webhook|tool|agent), ?agentId=, ?toolId=, ?limit= (max 500), ?before= (ISO). Requires app:write.
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/apps/00000000-0000-4000-8000-000000000001/logs"
}
},
"logs": [],
"summary": []
}
Captured from the API examples test suite; ids and timestamps are normalized.

Tool-usage stats

GET /api/apps/{id}/stats/tools

Return { tools, recent, daily } — per-tool call and error counts, recent runs, and a daily rollup. Filter to one tool with ?toolName=.

Read an app’s tool-usage statsGET /api/apps/00000000-0000-4000-8000-000000000001/stats/tools
GET /api/apps/{id}/stats/tools returns { tools, recent, daily } — per-tool call/error counts, recent runs, and a daily rollup. Filter with ?toolName=. Requires app:write.
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/apps/00000000-0000-4000-8000-000000000001/stats/tools"
}
},
"tools": [],
"recent": [],
"daily": []
}
Captured from the API examples test suite; ids and timestamps are normalized.