Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/schedule-list-runs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@truefoundry/trueforge": patch
---

Add GET /api/v1/schedules/{schedule_id}/runs to list a schedule's runs (newest `scheduled_for` first), with the same creator-or-admin access as other schedule routes.
166 changes: 164 additions & 2 deletions .github/fern/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1551,6 +1551,20 @@
],
"type": "object"
},
"ListScheduleRunsResponse": {
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/ScheduleRun"
},
"type": "array"
}
},
"required": [
"data"
],
"type": "object"
},
"ListSchedulesResponse": {
"properties": {
"data": {
Expand Down Expand Up @@ -2914,6 +2928,65 @@
],
"type": "object"
},
"ScheduleRun": {
"additionalProperties": false,
"properties": {
"created_at": {
"format": "date-time",
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"schedule_id": {
"type": "string"
},
"scheduled_for": {
"format": "date-time",
"type": "string"
},
"status": {
"$ref": "#/components/schemas/ScheduleRunStatus"
},
"triggered_at": {
"format": "date-time",
"type": [
"string",
"null"
]
},
"triggered_by": {
"type": "string"
},
"updated_at": {
"format": "date-time",
"type": "string"
}
},
"required": [
"id",
"schedule_id",
"name",
"scheduled_for",
"status",
"triggered_by",
"triggered_at",
"created_at",
"updated_at"
],
"type": "object"
},
"ScheduleRunStatus": {
"enum": [
"scheduled",
"triggered",
"failed"
],
"type": "string"
},
"ScheduleStatus": {
"default": "active",
"enum": [
Expand Down Expand Up @@ -5481,7 +5554,7 @@
}
}
},
"description": "The schedule was modified concurrently (usually the controller advancing it). Retry."
"description": "The name is already taken for this agent, or the schedule was modified concurrently (retry)."
}
},
"summary": "Create a schedule",
Expand Down Expand Up @@ -5531,6 +5604,16 @@
}
},
"description": "Unauthenticated."
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestErrorResponse"
}
}
},
"description": "The caller is not the schedule creator."
}
},
"summary": "Delete a schedule",
Expand Down Expand Up @@ -5569,6 +5652,16 @@
},
"description": "The schedule."
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestErrorResponse"
}
}
},
"description": "The caller is not the schedule creator."
},
"404": {
"content": {
"application/json": {
Expand Down Expand Up @@ -5636,6 +5729,16 @@
},
"description": "Invalid cron."
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestErrorResponse"
}
}
},
"description": "The caller is not the schedule creator."
},
"404": {
"content": {
"application/json": {
Expand All @@ -5654,7 +5757,7 @@
}
}
},
"description": "The schedule was modified concurrently (usually the controller advancing it). Retry."
"description": "The name is already taken for this agent, or the schedule was modified concurrently (retry)."
}
},
"summary": "Update a schedule",
Expand All @@ -5667,6 +5770,65 @@
"x-fern-sdk-method-name": "update"
}
},
"/api/v1/schedules/{schedule_id}/runs": {
"get": {
"description": "List runs of a schedule, newest `scheduled_for` first. Only the schedule creator (or an admin) may list its runs.",
"parameters": [
{
"description": "Immutable schedule identifier.",
"in": "path",
"name": "schedule_id",
"required": true,
"schema": {
"description": "Immutable schedule identifier.",
"maxLength": 64,
"minLength": 1,
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListScheduleRunsResponse"
}
}
},
"description": "Runs of the schedule."
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestErrorResponse"
}
}
},
"description": "The caller is not the schedule creator."
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestErrorResponse"
}
}
},
"description": "Not found."
}
},
"summary": "List runs of a schedule",
"tags": [
"Schedules"
],
"x-fern-sdk-group-name": [
"schedules"
],
"x-fern-sdk-method-name": "list_runs"
}
},
"/api/v1/sessions": {
"get": {
"description": "List the caller's sessions (newest first by default), token-paginated. Results are scoped to the authenticated identity via the session store's `created_by` filter (not a client query param). Optional `agent_id` filters to sessions bound to that named agent. Pass `page_token` to fetch the next page, keeping the other query params constant.",
Expand Down
Loading