Create Schedule
POST
/dev/projects/{project_id}/schedulesRequest
Path Params
project_id
string
required
Example:
1
Header Params
Secret-Key
string
required
Example:
{{secret-key}}
Body Params application/json
name
string
required
cron
string
required
request
object
required
body
object
required
url
string
required
Example
{
"name": "New Schedule",
"cron": "5 14 * * 1-3 *",
"request": {
"body": {
"status": true
},
"url": "https://example.com/api/update-status"
}
}
Request samples
Responses
Create Schedule(0)
HTTP Code: 0
Content Type : JSONapplication/json
Data Schema
success
boolean
required
message
string
required
data
object
required
scheduleId
integer
required
details
object
required
ExampleCreate Schedule
{
"success": true,
"message": "Schedule created successfully",
"data": {
"scheduleId": 1,
"details": {
"id": 1,
"project_id": 1,
"name": "project_id-1-1714738169351",
"description": "No Description",
"request": {
"body": {
"status": true
},
"url": "https://example.com/api/update-status"
},
"cron_expression": "10 0 * * ? *",
"paused": false,
"scheduled_for": "10 0 * * ? *",
"rule_arn": "arn:aws:events:ap-south-1:508660910536:rule/project_id-1-1714738169351",
"target_id": "79eb39fc-b6eb-4cbf-8320-8e332fd9bef5",
"createdAt": "2024-05-03T12:09:31.000Z",
"updatedAt": "2024-05-03T12:09:31.000Z"
}
}
}
Last modified: 6 months ago