curl -XGET https://qstash.upstash.io/v1/schedules/scd_1234 \
-H "Authorization: Bearer <token>"
{
"scheduleId": "scd_5mA1sL5RX6YphLfBnRTtiYPzZ8pt",
"cron": "0 * * * *",
"createdAt": 1691245856333,
"content": {
"header": {
"Content-Type": ["application/json"]
},
"body": "{\"message\":\"hello\"}"
},
"destination": {
"topic": {
"topicId": "tpc_7EfEryZiheEKzpMuvjYdhhhbNNJA",
"name": "test",
"endpoints": [
{
"endpointId": "ept_6j7BNZus3ZyPy6P7QtLUMCC3Rq7h",
"url": "https://www.example.com",
"topicId": "tpc_7EfEryZiheEKzpMuvjYdhhhbNNJA"
}
],
"type": "url",
"url": "https://www.example.com"
},
"settings": {
"retries": 3
}
}
}
Schedules
Get Schedule
This endpoint returns the schedule with the specified ID.
GET
/
v1
/
schedules
/
{scheduleId}
curl -XGET https://qstash.upstash.io/v1/schedules/scd_1234 \
-H "Authorization: Bearer <token>"
{
"scheduleId": "scd_5mA1sL5RX6YphLfBnRTtiYPzZ8pt",
"cron": "0 * * * *",
"createdAt": 1691245856333,
"content": {
"header": {
"Content-Type": ["application/json"]
},
"body": "{\"message\":\"hello\"}"
},
"destination": {
"topic": {
"topicId": "tpc_7EfEryZiheEKzpMuvjYdhhhbNNJA",
"name": "test",
"endpoints": [
{
"endpointId": "ept_6j7BNZus3ZyPy6P7QtLUMCC3Rq7h",
"url": "https://www.example.com",
"topicId": "tpc_7EfEryZiheEKzpMuvjYdhhhbNNJA"
}
],
"type": "url",
"url": "https://www.example.com"
},
"settings": {
"retries": 3
}
}
}
Request
string
required
The unique id of the schedule.
Response
Content
required
int
Unix timestamp with millisecond precision when the schedule was created.
string
required
The cron expression.
Destination
required
Destination of the schedule. The destination can either be a URL or a topic. Check the
type field first to determine which one it is.Show Destination
Show Destination
Topic
Show Topic
Show Topic
Array<Endpoint>
required
string
required
A user given name must only contain alphanumeric, hyphen, underscore and periods.
string
required
Id for this topic
string
required
Determines the type of the destination, either topic or url. Depending on this field, either the topic or url field will be set.
string
The url of the destination. Only set if
type is url.string
required
The unique id of the schedule
Settings
Show Settings
Show Settings
int
The time at which message should be delivered at the latest
int
The delay in seconds before the message is delivered.
int
The time before which the message should not be delivered.
int
The number of retries that should be attempted in case of delivery failure.
string
The delay in seconds before the message is delivered..
curl -XGET https://qstash.upstash.io/v1/schedules/scd_1234 \
-H "Authorization: Bearer <token>"
{
"scheduleId": "scd_5mA1sL5RX6YphLfBnRTtiYPzZ8pt",
"cron": "0 * * * *",
"createdAt": 1691245856333,
"content": {
"header": {
"Content-Type": ["application/json"]
},
"body": "{\"message\":\"hello\"}"
},
"destination": {
"topic": {
"topicId": "tpc_7EfEryZiheEKzpMuvjYdhhhbNNJA",
"name": "test",
"endpoints": [
{
"endpointId": "ept_6j7BNZus3ZyPy6P7QtLUMCC3Rq7h",
"url": "https://www.example.com",
"topicId": "tpc_7EfEryZiheEKzpMuvjYdhhhbNNJA"
}
],
"type": "url",
"url": "https://www.example.com"
},
"settings": {
"retries": 3
}
}
}
Was this page helpful?
⌘I