Get Job
curl --request GET \
--url https://cronho.st/api/v1/jobs/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://cronho.st/api/v1/jobs/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://cronho.st/api/v1/jobs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cronho.st/api/v1/jobs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cronho.st/api/v1/jobs/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cronho.st/api/v1/jobs/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cronho.st/api/v1/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "job_456",
"scheduleId": "schedule_123",
"status": "SUCCESS",
"scheduledRunAtUtc": "2024-01-14T14:00:00.000Z",
"attemptNumber": 1,
"httpMethod": "GET",
"endpoint": "https://api.example.com/health",
"body": null,
"headers": "{\"User-Agent\": \"Cronhost-Monitor\"}",
"statusCode": 200,
"response": "{\"status\": \"ok\", \"uptime\": 99.9}",
"startedAtUtc": "2024-01-14T14:00:01.000Z",
"completedAtUtc": "2024-01-14T14:00:02.500Z",
"errorMessage": null,
"createdAt": "2024-01-14T14:00:00.000Z",
"updatedAt": "2024-01-14T14:00:02.500Z"
},
"success": true
}Job Endpoints
Get Job
Retrieve detailed information about a specific job execution.
GET
/
jobs
/
{id}
Get Job
curl --request GET \
--url https://cronho.st/api/v1/jobs/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://cronho.st/api/v1/jobs/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://cronho.st/api/v1/jobs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cronho.st/api/v1/jobs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cronho.st/api/v1/jobs/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cronho.st/api/v1/jobs/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cronho.st/api/v1/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "job_456",
"scheduleId": "schedule_123",
"status": "SUCCESS",
"scheduledRunAtUtc": "2024-01-14T14:00:00.000Z",
"attemptNumber": 1,
"httpMethod": "GET",
"endpoint": "https://api.example.com/health",
"body": null,
"headers": "{\"User-Agent\": \"Cronhost-Monitor\"}",
"statusCode": 200,
"response": "{\"status\": \"ok\", \"uptime\": 99.9}",
"startedAtUtc": "2024-01-14T14:00:01.000Z",
"completedAtUtc": "2024-01-14T14:00:02.500Z",
"errorMessage": null,
"createdAt": "2024-01-14T14:00:00.000Z",
"updatedAt": "2024-01-14T14:00:02.500Z"
},
"success": true
}Authorizations
API key for authentication. Get your API key from the Cronhost dashboard.
Path Parameters
Unique job identifier
Example:
"job_456"
⌘I