With an API Token, you can work with your cronjobs, groups, and account settings programmatically without logging in.
The API token is a 32-character string that is uniquely generated for all FastCron users. You can visit Profile > API token to copy your API key, and regenerate the API token just in case.
All API requests must be sent via HTTP to a URL with the format
https://www.fastcron.com/api/v1/[target].[action]
Support targets are cron
, group
, account
, and server
.
Target's actions can be found under each target's section.
For example, to list your cronjobs, send your HTTP request to
https://www.fastcron.com/api/v1/cron.list
Each API request requires a token
variable that can be sent via
either POST, GET, or URL params as described in the Request formats section below.
You can pass parameters via either POST or GET parameters.
All data including the token
must be sent to
https://www.fastcron.com/api/v1/[target].[action]
The POST body must be either query string or JSON format:
token=******&id=1&name=weekly
{"token":"******","id":1,"name":"weekly"}
https://www.fastcron.com/api/v1/[target].[action]?token=[token]&name=value
Example requests:
https://www.fastcron.com/api/v1/cron.list?token=******
https://www.fastcron.com/api/v1/cron.edit?token=******&id=1&name=weekly
The response is in JSON format, includes these members
status | Either success or error . |
---|---|
code | The error code, 0 means ok/success. |
data | Result data, available in success result only |
message | The error message, available in error result only |
https://www.fastcron.com/api/v1/cron.list?token=******
{"data":[{"id":123456,...}],"status":"success","code":0}
{"message":"Invalid API token, user not found.","status":"error","code":11}
The rate limit for API requests is 1 request per second. If you exceed that limit, you'll get HTTP error code 503 Service Temporarily Unavailable.