|
1551 | 1551 | ], |
1552 | 1552 | "type": "object" |
1553 | 1553 | }, |
| 1554 | + "ListScheduleRunsResponse": { |
| 1555 | + "properties": { |
| 1556 | + "data": { |
| 1557 | + "items": { |
| 1558 | + "$ref": "#/components/schemas/ScheduleRun" |
| 1559 | + }, |
| 1560 | + "type": "array" |
| 1561 | + } |
| 1562 | + }, |
| 1563 | + "required": [ |
| 1564 | + "data" |
| 1565 | + ], |
| 1566 | + "type": "object" |
| 1567 | + }, |
1554 | 1568 | "ListSchedulesResponse": { |
1555 | 1569 | "properties": { |
1556 | 1570 | "data": { |
|
2914 | 2928 | ], |
2915 | 2929 | "type": "object" |
2916 | 2930 | }, |
| 2931 | + "ScheduleRun": { |
| 2932 | + "additionalProperties": false, |
| 2933 | + "properties": { |
| 2934 | + "created_at": { |
| 2935 | + "format": "date-time", |
| 2936 | + "type": "string" |
| 2937 | + }, |
| 2938 | + "id": { |
| 2939 | + "type": "string" |
| 2940 | + }, |
| 2941 | + "name": { |
| 2942 | + "type": "string" |
| 2943 | + }, |
| 2944 | + "schedule_id": { |
| 2945 | + "type": "string" |
| 2946 | + }, |
| 2947 | + "scheduled_for": { |
| 2948 | + "format": "date-time", |
| 2949 | + "type": "string" |
| 2950 | + }, |
| 2951 | + "status": { |
| 2952 | + "$ref": "#/components/schemas/ScheduleRunStatus" |
| 2953 | + }, |
| 2954 | + "triggered_at": { |
| 2955 | + "format": "date-time", |
| 2956 | + "type": [ |
| 2957 | + "string", |
| 2958 | + "null" |
| 2959 | + ] |
| 2960 | + }, |
| 2961 | + "triggered_by": { |
| 2962 | + "type": "string" |
| 2963 | + }, |
| 2964 | + "updated_at": { |
| 2965 | + "format": "date-time", |
| 2966 | + "type": "string" |
| 2967 | + } |
| 2968 | + }, |
| 2969 | + "required": [ |
| 2970 | + "id", |
| 2971 | + "schedule_id", |
| 2972 | + "name", |
| 2973 | + "scheduled_for", |
| 2974 | + "status", |
| 2975 | + "triggered_by", |
| 2976 | + "triggered_at", |
| 2977 | + "created_at", |
| 2978 | + "updated_at" |
| 2979 | + ], |
| 2980 | + "type": "object" |
| 2981 | + }, |
| 2982 | + "ScheduleRunStatus": { |
| 2983 | + "enum": [ |
| 2984 | + "scheduled", |
| 2985 | + "triggered", |
| 2986 | + "failed" |
| 2987 | + ], |
| 2988 | + "type": "string" |
| 2989 | + }, |
2917 | 2990 | "ScheduleStatus": { |
2918 | 2991 | "default": "active", |
2919 | 2992 | "enum": [ |
|
5481 | 5554 | } |
5482 | 5555 | } |
5483 | 5556 | }, |
5484 | | - "description": "The schedule was modified concurrently (usually the controller advancing it). Retry." |
| 5557 | + "description": "The name is already taken for this agent, or the schedule was modified concurrently (retry)." |
5485 | 5558 | } |
5486 | 5559 | }, |
5487 | 5560 | "summary": "Create a schedule", |
|
5531 | 5604 | } |
5532 | 5605 | }, |
5533 | 5606 | "description": "Unauthenticated." |
| 5607 | + }, |
| 5608 | + "403": { |
| 5609 | + "content": { |
| 5610 | + "application/json": { |
| 5611 | + "schema": { |
| 5612 | + "$ref": "#/components/schemas/RequestErrorResponse" |
| 5613 | + } |
| 5614 | + } |
| 5615 | + }, |
| 5616 | + "description": "The caller is not the schedule creator." |
5534 | 5617 | } |
5535 | 5618 | }, |
5536 | 5619 | "summary": "Delete a schedule", |
|
5569 | 5652 | }, |
5570 | 5653 | "description": "The schedule." |
5571 | 5654 | }, |
| 5655 | + "403": { |
| 5656 | + "content": { |
| 5657 | + "application/json": { |
| 5658 | + "schema": { |
| 5659 | + "$ref": "#/components/schemas/RequestErrorResponse" |
| 5660 | + } |
| 5661 | + } |
| 5662 | + }, |
| 5663 | + "description": "The caller is not the schedule creator." |
| 5664 | + }, |
5572 | 5665 | "404": { |
5573 | 5666 | "content": { |
5574 | 5667 | "application/json": { |
|
5636 | 5729 | }, |
5637 | 5730 | "description": "Invalid cron." |
5638 | 5731 | }, |
| 5732 | + "403": { |
| 5733 | + "content": { |
| 5734 | + "application/json": { |
| 5735 | + "schema": { |
| 5736 | + "$ref": "#/components/schemas/RequestErrorResponse" |
| 5737 | + } |
| 5738 | + } |
| 5739 | + }, |
| 5740 | + "description": "The caller is not the schedule creator." |
| 5741 | + }, |
5639 | 5742 | "404": { |
5640 | 5743 | "content": { |
5641 | 5744 | "application/json": { |
|
5654 | 5757 | } |
5655 | 5758 | } |
5656 | 5759 | }, |
5657 | | - "description": "The schedule was modified concurrently (usually the controller advancing it). Retry." |
| 5760 | + "description": "The name is already taken for this agent, or the schedule was modified concurrently (retry)." |
5658 | 5761 | } |
5659 | 5762 | }, |
5660 | 5763 | "summary": "Update a schedule", |
|
5667 | 5770 | "x-fern-sdk-method-name": "update" |
5668 | 5771 | } |
5669 | 5772 | }, |
| 5773 | + "/api/v1/schedules/{schedule_id}/runs": { |
| 5774 | + "get": { |
| 5775 | + "description": "List runs of a schedule, newest `scheduled_for` first. Only the schedule creator (or an admin) may list its runs.", |
| 5776 | + "parameters": [ |
| 5777 | + { |
| 5778 | + "description": "Immutable schedule identifier.", |
| 5779 | + "in": "path", |
| 5780 | + "name": "schedule_id", |
| 5781 | + "required": true, |
| 5782 | + "schema": { |
| 5783 | + "description": "Immutable schedule identifier.", |
| 5784 | + "maxLength": 64, |
| 5785 | + "minLength": 1, |
| 5786 | + "type": "string" |
| 5787 | + } |
| 5788 | + } |
| 5789 | + ], |
| 5790 | + "responses": { |
| 5791 | + "200": { |
| 5792 | + "content": { |
| 5793 | + "application/json": { |
| 5794 | + "schema": { |
| 5795 | + "$ref": "#/components/schemas/ListScheduleRunsResponse" |
| 5796 | + } |
| 5797 | + } |
| 5798 | + }, |
| 5799 | + "description": "Runs of the schedule." |
| 5800 | + }, |
| 5801 | + "403": { |
| 5802 | + "content": { |
| 5803 | + "application/json": { |
| 5804 | + "schema": { |
| 5805 | + "$ref": "#/components/schemas/RequestErrorResponse" |
| 5806 | + } |
| 5807 | + } |
| 5808 | + }, |
| 5809 | + "description": "The caller is not the schedule creator." |
| 5810 | + }, |
| 5811 | + "404": { |
| 5812 | + "content": { |
| 5813 | + "application/json": { |
| 5814 | + "schema": { |
| 5815 | + "$ref": "#/components/schemas/RequestErrorResponse" |
| 5816 | + } |
| 5817 | + } |
| 5818 | + }, |
| 5819 | + "description": "Not found." |
| 5820 | + } |
| 5821 | + }, |
| 5822 | + "summary": "List runs of a schedule", |
| 5823 | + "tags": [ |
| 5824 | + "Schedules" |
| 5825 | + ], |
| 5826 | + "x-fern-sdk-group-name": [ |
| 5827 | + "schedules" |
| 5828 | + ], |
| 5829 | + "x-fern-sdk-method-name": "list_runs" |
| 5830 | + } |
| 5831 | + }, |
5670 | 5832 | "/api/v1/sessions": { |
5671 | 5833 | "get": { |
5672 | 5834 | "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.", |
|
0 commit comments