From c1c5d320f7168b4600614da4de7a600f32e31ff4 Mon Sep 17 00:00:00 2001 From: CahidArda Date: Tue, 7 Oct 2025 13:19:53 +0300 Subject: [PATCH 1/2] feat: enhance schedule API response fields and update documentation --- qstash/api/schedules/get.mdx | 60 +++++++++++++++++++++++++++----- qstash/api/schedules/list.mdx | 65 ++++++++++++++++++++++++++++------- 2 files changed, 104 insertions(+), 21 deletions(-) diff --git a/qstash/api/schedules/get.mdx b/qstash/api/schedules/get.mdx index 5d755ff4..fc4f69ab 100644 --- a/qstash/api/schedules/get.mdx +++ b/qstash/api/schedules/get.mdx @@ -13,17 +13,14 @@ authMethod: "bearer" ## Response - - The creation time of the object. UnixMilli - The id of the schedule. The cron expression used to schedule the message. - - IP address where this schedule created from. + + The creation time of the object. UnixMilli Url or URL Group name @@ -31,12 +28,15 @@ authMethod: "bearer" The HTTP method to use for the message. - + The headers of the message. - + The body of the message. + + The base64 encoded body of the message. + The number of retries that should be attempted in case of delivery failure. @@ -46,6 +46,45 @@ authMethod: "bearer" The url where we send a callback to after the message is delivered + + The url where we send a callback to after the message delivery fails + + + IP address where this schedule was created from. + + + Whether the schedule is paused or not. + + + The flow control key for rate limiting. + + + The maximum number of parallel executions. + + + The rate limit for this schedule. + + + The time interval during which the specified rate of requests can be activated using the same flow control key. In seconds. + + + The retry delay expression for this schedule, if retry_delay was set when creating the schedule. + + + The label assigned to the schedule for filtering purposes. + + + The timestamp of the last scheduled execution. + + + The timestamp of the next scheduled execution. + + + The states of the last scheduled messages. Maps message id to state (IN_PROGRESS, SUCCESS, FAIL). + + + The IP address of the caller who created the schedule. + @@ -94,15 +133,18 @@ defer resp.Body.Close() ```json 200 OK { "scheduleId": "scd_1234", - "createdAt": 1623345678001, "cron": "0 0 1 * *", + "createdAt": 1623345678001, "destination": "https://example.com", "method": "POST", "header": { "Content-Type": ["application/json"] }, "body": "{\"message\":\"hello\"}", - "retries": 3 + "retries": 3, + "isPaused": false, + "callerIP": "192.168.1.1", + "nextScheduleTime": 1623345700000 } ``` diff --git a/qstash/api/schedules/list.mdx b/qstash/api/schedules/list.mdx index 70ecd4b2..c49a61bc 100644 --- a/qstash/api/schedules/list.mdx +++ b/qstash/api/schedules/list.mdx @@ -9,37 +9,75 @@ authMethod: "bearer" - - The creation time of the object. UnixMilli - - + The id of the schedule. The cron expression used to schedule the message. + + The creation time of the object. UnixMilli + Url or URL Group (topic) name - The HTTP method to use for the message. - + The headers of the message. - + The body of the message. - + The number of retries that should be attempted in case of delivery failure. - + The delay in seconds before the message is delivered. - + The url where we send a callback to after the message is delivered + + The url where we send a callback to after the message delivery fails + + + IP address where this schedule was created from. + + + Whether the schedule is paused or not. + + + The flow control key for rate limiting. + + + The maximum number of parallel executions. + + + The rate limit for this schedule. + + + The time interval during which the specified rate of requests can be activated using the same flow control key. In seconds. + + + The retry delay expression for this schedule, if retry_delay was set when creating the schedule. + + + The label assigned to the schedule for filtering purposes. + + + The timestamp of the last scheduled execution. + + + The timestamp of the next scheduled execution. + + + The states of the last scheduled messages. Maps message id to state (IN_PROGRESS, SUCCESS, FAIL). + + + The IP address of the caller who created the schedule. + @@ -90,15 +128,18 @@ defer resp.Body.Close() [ { "scheduleId": "scd_1234", - "createdAt": 1623345678001, "cron": "0 0 1 * *", + "createdAt": 1623345678001, "destination": "https://example.com", "method": "POST", "header": { "Content-Type": ["application/json"] }, "body": "{\"message\":\"hello\"}", - "retries": 3 + "retries": 3, + "isPaused": false, + "callerIP": "192.168.1.1", + "nextScheduleTime": 1623345700000 } ] ``` From 4d7b8406c3d7245c70176817c4a6c5896725e2cf Mon Sep 17 00:00:00 2001 From: CahidArda Date: Wed, 8 Oct 2025 10:51:21 +0300 Subject: [PATCH 2/2] feat: update schedule API response examples with new fields and values --- qstash/api/schedules/get.mdx | 29 +++++++++++++++++------------ qstash/api/schedules/list.mdx | 29 +++++++++++++++++------------ 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/qstash/api/schedules/get.mdx b/qstash/api/schedules/get.mdx index fc4f69ab..154c7b42 100644 --- a/qstash/api/schedules/get.mdx +++ b/qstash/api/schedules/get.mdx @@ -132,19 +132,24 @@ defer resp.Body.Close() ```json 200 OK { - "scheduleId": "scd_1234", - "cron": "0 0 1 * *", - "createdAt": 1623345678001, - "destination": "https://example.com", - "method": "POST", - "header": { - "Content-Type": ["application/json"] + createdAt: 1754565618803, + scheduleId: "schedule-id", + cron: "* * * * *", + destination: "https://your-website/api", + method: "GET", + header: { + "Content-Type": [ "application/json" ], }, - "body": "{\"message\":\"hello\"}", - "retries": 3, - "isPaused": false, - "callerIP": "192.168.1.1", - "nextScheduleTime": 1623345700000 + retries: 3, + delay: 25, + lastScheduleTime: 1755095280020, + nextScheduleTime: 1759909800000, + lastScheduleStates: { + msg_7YoJxFpwk: "SUCCESS", + }, + callerIP: "127.43.12.54", + isPaused: true, + parallelism: 0, } ``` diff --git a/qstash/api/schedules/list.mdx b/qstash/api/schedules/list.mdx index c49a61bc..df7455d9 100644 --- a/qstash/api/schedules/list.mdx +++ b/qstash/api/schedules/list.mdx @@ -127,19 +127,24 @@ defer resp.Body.Close() ```json 200 OK [ { - "scheduleId": "scd_1234", - "cron": "0 0 1 * *", - "createdAt": 1623345678001, - "destination": "https://example.com", - "method": "POST", - "header": { - "Content-Type": ["application/json"] + createdAt: 1754565618803, + scheduleId: "schedule-id", + cron: "* * * * *", + destination: "https://your-website/api", + method: "GET", + header: { + "Content-Type": [ "application/json" ], }, - "body": "{\"message\":\"hello\"}", - "retries": 3, - "isPaused": false, - "callerIP": "192.168.1.1", - "nextScheduleTime": 1623345700000 + retries: 3, + delay: 25, + lastScheduleTime: 1755095280020, + nextScheduleTime: 1759909800000, + lastScheduleStates: { + msg_7YoJxFpwk: "SUCCESS", + }, + callerIP: "127.43.12.54", + isPaused: true, + parallelism: 0, } ] ```