Request
Body Params application/json
{
"name": "New Schedule",
"cron": "5 14 * * 1-3 *",
"request": {
"body": {
"status": true
},
"url": "https://example.com/api/update-status"
}
}
Request samples
curl --location --request POST 'https://mock.apidog.com/m1/534343-0-d3d6fe3f/dev/projects/1/schedules' \
--header 'Secret-Key: 123' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "New Schedule",
"cron": "5 14 * * 1-3 *",
"request": {
"body": {
"status": true
},
"url": "https://example.com/api/update-status"
}
}'
Responses
application/json {
"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"
}
}
}
Modified at 2024-05-10 16:23:28