Add a new schedule
POST
/api/v2/organizations/{organization}/projects/{project}/crawlers/{crawler}/schedules
const url = 'https://dashboard.quantcdn.io/api/v2/organizations/example/projects/example/crawlers/example/schedules';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Daily Crawl","schedule_cron_string":"0 2 * * *"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://dashboard.quantcdn.io/api/v2/organizations/example/projects/example/crawlers/example/schedules \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Daily Crawl", "schedule_cron_string": "0 2 * * *" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organization
required
string
Organization identifier
project
required
string
Project identifier
crawler
required
string
Crawler identifier
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
Schedule name. If not provided, defaults to ‘Schedule {crawler_name}’.
string
Example
Daily Crawlschedule_cron_string
required
Standard Unix cron expression with 5 space-separated fields: minute, hour, day-of-month, month, day-of-week. Example: 0 2 * * * for daily at 2 AM.
string
Example
0 2 * * *Responses
Section titled “Responses”The request has succeeded.
Media typeapplication/json
object
id
required
Schedule ID
integer
name
Schedule name
string
crawler_config_id
required
Crawler config ID
integer
crawler_uuid
Crawler UUID
string
project_id
required
Project ID
integer
crawler_last_run_id
required
Last run ID
integer
schedule_cron_string
required
Standard Unix cron expression with 5 space-separated fields: minute, hour, day-of-month, month, day-of-week. Example: 0 2 * * * runs daily at 2 AM.
string
created_at
Creation timestamp
string format: date-time
updated_at
Last update timestamp
string format: date-time
Example
{ "id": 1, "name": "Test schedule", "crawler_config_id": 456, "crawler_uuid": "550e8400-e29b-41d4-a716-446655440000", "project_id": 789, "crawler_last_run_id": 12345, "schedule_cron_string": "0 2 * * *", "created_at": "2024-01-20T09:15:00Z", "updated_at": "2024-10-11T16:45:00Z"}The server could not understand the request due to invalid syntax.
Media typeapplication/json
object
message
required
Error message
string
error
required
Error flag
boolean
Example
{ "message": "The requested resource was not found", "error": true}Access is forbidden.
Media typeapplication/json
object
message
required
Error message
string
error
required
Error flag
boolean
Example
{ "message": "The requested resource was not found", "error": true}