curl
curl -sS -X POST "https://gateway.orbit/api/v1/schedules" \
--cacert /path/to/orbit-root-ca.pem \
-H 'Accept: application/json' \
-H 'X-Orbit-Request-Id: 9d6b1e5c-4a3f-4a1b-9f0e-6d2c3f5a7b81' \
-H 'Content-Type: application/json' \
-d '{"target_type": "node", "target_id": 12, "name": "daily-report", "calendar": "daily", "command": "/usr/bin/php artisan queue:work"}'
{
"data": {
"id": "<string>",
"target_type": "<string>",
"target_id": 123,
"name": "<string>",
"calendar": "<string>",
"command": "<string>",
"timeout_seconds": 123,
"desired_timer_state": "<string>",
"status": "<string>",
"failed_step": "<string>",
"error_code": "<string>",
"last_run_at": "<string>",
"last_run_status": "<string>"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"data": {
"id": "<string>",
"target_type": "<string>",
"target_id": 123,
"name": "<string>",
"calendar": "<string>",
"command": "<string>",
"timeout_seconds": 123,
"desired_timer_state": "<string>",
"status": "<string>",
"failed_step": "<string>",
"error_code": "<string>",
"last_run_at": "<string>",
"last_run_status": "<string>"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Schedules
Create a Schedule
Create one Node or Instance Schedule, or a Project Schedule definition.
POST
/
api
/
v1
/
schedules
curl
curl -sS -X POST "https://gateway.orbit/api/v1/schedules" \
--cacert /path/to/orbit-root-ca.pem \
-H 'Accept: application/json' \
-H 'X-Orbit-Request-Id: 9d6b1e5c-4a3f-4a1b-9f0e-6d2c3f5a7b81' \
-H 'Content-Type: application/json' \
-d '{"target_type": "node", "target_id": 12, "name": "daily-report", "calendar": "daily", "command": "/usr/bin/php artisan queue:work"}'
{
"data": {
"id": "<string>",
"target_type": "<string>",
"target_id": 123,
"name": "<string>",
"calendar": "<string>",
"command": "<string>",
"timeout_seconds": 123,
"desired_timer_state": "<string>",
"status": "<string>",
"failed_step": "<string>",
"error_code": "<string>",
"last_run_at": "<string>",
"last_run_status": "<string>"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"data": {
"id": "<string>",
"target_type": "<string>",
"target_id": 123,
"name": "<string>",
"calendar": "<string>",
"command": "<string>",
"timeout_seconds": 123,
"desired_timer_state": "<string>",
"status": "<string>",
"failed_step": "<string>",
"error_code": "<string>",
"last_run_at": "<string>",
"last_run_status": "<string>"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Body
application/json
Available options:
node, instance Required range:
x >= 1Schedule name
Maximum string length:
63Pattern:
^[a-z0-9]+(?:-[a-z0-9]+)*$(?![\s\S])Native systemd calendar expression
Maximum string length:
255Pattern:
^[\x20-\x7E]+$(?![\s\S])Command to run
Maximum string length:
4096Required range:
1 <= x <= 86400