> ## Documentation Index
> Fetch the complete documentation index at: https://docs.screenshothis.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Comprehensive Health Check

> Perform detailed health checks of all critical system components



## OpenAPI

````yaml get /health
openapi: 3.1.0
info:
  version: 1.0.0
  title: Screenshothis API
  description: API designed to take screenshots of websites
servers:
  - url: https://api.screenshothis.com
    description: Production Server
security: []
paths:
  /health:
    get:
      summary: Comprehensive health check
      description: >-
        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.
      operationId: health
      responses:
        '200':
          description: Health check passed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheck'
        '503':
          description: Health check failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheck'
      x-codeSamples:
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Screenshothis } from "@screenshothis/sdk";

            const screenshothis = new Screenshothis();

            async function run() {
              const result = await screenshothis.health.get();

              console.log(result);
            }

            run();
        - lang: php
          label: PHP (SDK)
          source: |-
            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
            }
components:
  schemas:
    HealthCheck:
      type: object
      properties:
        status:
          type: string
          enum:
            - healthy
            - degraded
            - unhealthy
          description: Overall health status of the system
        timestamp:
          type: string
          description: Timestamp of the health check
        uptime:
          type: number
          description: Uptime of the service in seconds
        checks:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: Name of the health check
              status:
                type: string
                enum:
                  - pass
                  - fail
                description: Status of the health check
              duration:
                type: number
                description: Duration of the health check in milliseconds
              details:
                type: object
                additionalProperties:
                  nullable: true
                description: Detailed information about the health check
              error:
                type: string
                description: Error message if the health check failed
            required:
              - name
              - status
          description: Array of health check results
        version:
          type: string
          description: Application version or commit hash
          example: 1.0.0
      required:
        - status
        - timestamp
        - uptime
        - checks
      description: >-
        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.
      examples:
        - 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: degraded
          timestamp: '2024-01-01T00:00:00.000Z'
          uptime: 3600
          checks:
            - name: database
              status: pass
              duration: 15
            - name: storage
              status: fail
              duration: 5000
              error: Connection timeout
            - name: queue
              status: pass
              duration: 12
            - name: s3
              status: pass
              duration: 200
          version: 1.0.0
        - status: unhealthy
          timestamp: '2024-01-01T00:00:00.000Z'
          uptime: 3600
          checks:
            - name: database
              status: fail
              duration: 5000
              error: Connection refused
            - name: storage
              status: fail
              duration: 5000
              error: Storage unavailable
            - name: queue
              status: fail
              duration: 100
              error: Queue worker not responding
            - name: s3
              status: fail
              duration: 3000
              error: S3 access denied
          version: 1.0.0

````