API reference
Cron Jobs
Scheduled commands of an account.
#List cron jobs
GET/api/v1/accounts/{id}/cron
- Who
- root, reseller (ACL: create-user-session); customer
- API tokens
- admin token area: accounts; account token area: cron
- Feature
cron- Operation
cronList · ky call cronList
Parameters
Responses
- 200 OK
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: not-ready
- 500 Internal Server Error: internal
#Set the cron output email
PUT/api/v1/accounts/{id}/cron/email
- Who
- root, reseller (ACL: create-user-session); customer
- API tokens
- admin token area: accounts; account token area: cron
- Feature
cron- Operation
cronEmail · ky call cronEmail
Parameters
Request body
Responses
- 200 OK
- 400 Bad Request: rejected, validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: not-ready
- 500 Internal Server Error: internal
#Add a cron job
POST/api/v1/accounts/{id}/cron/jobs
- Who
- root, reseller (ACL: create-user-session); customer
- API tokens
- admin token area: accounts; account token area: cron
- Feature
cron- Operation
postAccountsIdCronJobs · ky call postAccountsIdCronJobs
Parameters
Request body
| Field | Type |
|---|
command | string |
comment | string |
day_of_month | string |
day_of_week | string |
enabled | boolean |
hour | string |
minute | string |
month | string |
Responses
- 200 OK
- 400 Bad Request: rejected, validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: limit, not-ready
- 500 Internal Server Error: internal
#Delete a cron job
DELETE/api/v1/accounts/{id}/cron/jobs/{cid}
- Who
- root, reseller (ACL: create-user-session); customer
- API tokens
- admin token area: accounts; account token area: cron
- Feature
cron- Operation
cronDelete · ky call cronDelete
Parameters
Responses
- 200 OK
- 400 Bad Request: rejected
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: not-ready
- 500 Internal Server Error: internal
#Update a cron job
PUT/api/v1/accounts/{id}/cron/jobs/{cid}
- Who
- root, reseller (ACL: create-user-session); customer
- API tokens
- admin token area: accounts; account token area: cron
- Feature
cron- Operation
putAccountsIdCronJobsCid · ky call putAccountsIdCronJobsCid
Parameters
Request body
| Field | Type |
|---|
command | string |
comment | string |
day_of_month | string |
day_of_week | string |
enabled | boolean |
hour | string |
minute | string |
month | string |
Responses
- 200 OK
- 400 Bad Request: rejected, validation
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 409 Conflict: limit, not-ready
- 500 Internal Server Error: internal