Get Cron Job Execution Logs
Get cron job execution logs.
Method
GET
Endpoint
https://api.easycron.com/v1/cron-jobs/{cron_job_id}/logs
Another possible URL:
https://api.easycron.com/v1/cron-jobs/{cron_job_id}/logs?pretty
NOTE: By appending
pretty
in the request URL query string, you can get a pretty printed JSON (indented with spaces).
Example API call
curl \--include \--request GET \--header 'Content-Type: application/json' \--header 'X-API-Key: <API-KEY>' \"https://api.easycron.com/v1/cron-jobs/{cron_job_id}/logs?pretty"
Example Success Response
Together with the HTTP code 200
, the following content will be responded:
{ "logs": [ { "cron_job_id": 3981721, "scheduled_time": "2024-07-31 16:32:00", "fired_time": "2024-07-31 16:32:02", "done_time": "2024-07-31 16:32:02", "http_code": 200, "error": "", "total_time": 0.074291, "bot_ip": "192.99.21.124", "http_response_id": "66aa6702256d14f090ca3abf" }, { "cron_job_id": 3981721, "scheduled_time": "2024-07-31 16:31:00", "fired_time": "2024-07-31 16:31:01", "done_time": "2024-07-31 16:31:01", "http_code": 200, "error": "", "total_time": 0.121151, "bot_ip": "167.114.64.88", "http_response_id": "66aa66c56e89c02d955428c6" }, ... ], "meta": { "page": 1, "page_size": 10, "result_count": 10, "total_count": 500 }}
Example Failure Response
Together with the HTTP code of the error, the following error message will be responded:
{"message":"ERROR_MESSAGE"}