Health & Monitoring
Comprehensive Health Check
Perform detailed health checks of all critical system components
GET
/
health
Typescript (SDK)
import { Screenshothis } from "@screenshothis/sdk";
const screenshothis = new Screenshothis();
async function run() {
const result = await screenshothis.health.get();
console.log(result);
}
run();declare(strict_types=1);
require 'vendor/autoload.php';
use Screenshothis\Screenshothis;
$sdk = Screenshothis\Screenshothis::builder()->build();
$response = $sdk->health(
);
if ($response->healthCheck !== null) {
// handle response
}curl --request GET \
--url https://api.screenshothis.com/healthimport requests
url = "https://api.screenshothis.com/health"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.screenshothis.com/health', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.screenshothis.com/health"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.screenshothis.com/health")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.screenshothis.com/health")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "healthy",
"timestamp": "2024-01-01T00:00:00.000Z",
"uptime": 3600,
"checks": [
{
"name": "database",
"status": "pass",
"duration": 12
},
{
"name": "storage",
"status": "pass",
"duration": 25
},
{
"name": "queue",
"status": "pass",
"duration": 8,
"details": {
"waiting": 2,
"active": 1,
"completed": 1543,
"failed": 0,
"workerRunning": true
}
},
{
"name": "s3",
"status": "pass",
"duration": 156
}
],
"version": "1.0.0"
}{
"status": "healthy",
"timestamp": "2024-01-01T00:00:00.000Z",
"uptime": 3600,
"checks": [
{
"name": "database",
"status": "pass",
"duration": 12
},
{
"name": "storage",
"status": "pass",
"duration": 25
},
{
"name": "queue",
"status": "pass",
"duration": 8,
"details": {
"waiting": 2,
"active": 1,
"completed": 1543,
"failed": 0,
"workerRunning": true
}
},
{
"name": "s3",
"status": "pass",
"duration": 156
}
],
"version": "1.0.0"
}Response
Health check passed
Performs a comprehensive health check of all critical system components including database connectivity, storage availability, job queue status, and S3 functionality. Returns detailed status information for monitoring and alerting systems.
⌘I
Typescript (SDK)
import { Screenshothis } from "@screenshothis/sdk";
const screenshothis = new Screenshothis();
async function run() {
const result = await screenshothis.health.get();
console.log(result);
}
run();declare(strict_types=1);
require 'vendor/autoload.php';
use Screenshothis\Screenshothis;
$sdk = Screenshothis\Screenshothis::builder()->build();
$response = $sdk->health(
);
if ($response->healthCheck !== null) {
// handle response
}curl --request GET \
--url https://api.screenshothis.com/healthimport requests
url = "https://api.screenshothis.com/health"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.screenshothis.com/health', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.screenshothis.com/health"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.screenshothis.com/health")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.screenshothis.com/health")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "healthy",
"timestamp": "2024-01-01T00:00:00.000Z",
"uptime": 3600,
"checks": [
{
"name": "database",
"status": "pass",
"duration": 12
},
{
"name": "storage",
"status": "pass",
"duration": 25
},
{
"name": "queue",
"status": "pass",
"duration": 8,
"details": {
"waiting": 2,
"active": 1,
"completed": 1543,
"failed": 0,
"workerRunning": true
}
},
{
"name": "s3",
"status": "pass",
"duration": 156
}
],
"version": "1.0.0"
}{
"status": "healthy",
"timestamp": "2024-01-01T00:00:00.000Z",
"uptime": 3600,
"checks": [
{
"name": "database",
"status": "pass",
"duration": 12
},
{
"name": "storage",
"status": "pass",
"duration": 25
},
{
"name": "queue",
"status": "pass",
"duration": 8,
"details": {
"waiting": 2,
"active": 1,
"completed": 1543,
"failed": 0,
"workerRunning": true
}
},
{
"name": "s3",
"status": "pass",
"duration": 156
}
],
"version": "1.0.0"
}