This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Health Check

Indicates that the service is running and all components are functioning correctly.

    Method

    GET

    URL

    http://{Host Address}/health

    Returns service health status including individual component-level checks.

    Query Parameters

    None

    Sample Request

    curl -X GET "http://<Host_address>/health"
         
    import requests
        
        url = "http://<Host_address>/health"
        response = requests.get(url, verify=False)
        
        print("Status code:", response.status_code)
        try:
            print("Response JSON:", response.json())
        except ValueError:
            print("Response Text:", response.text)
        
    URL: GET `http: //<Host_address>/health`

    Sample Response

    {
        "isHealthy": true,
        "checks": [
            {
                "isHealthy": true,
                "output": {
                    "isHealthy": true,
                    "checks": [
                        {
                            "passed": true,
                            "output": "Pattern Classifier found",
                            "componentType": "engine",
                            "componentName": "Pattern Classifier"
                        },
                        {
                            "passed": true,
                            "output": "Pattern Classifier engine initialized",
                            "componentType": "engine",
                            "componentName": "Pattern Classifier"
                        },
                        {
                            "passed": true,
                            "output": "Dummy classification is responsive",
                            "componentType": "engine",
                            "componentName": "Pattern Classifier"
                        }
                    ]
                },
                "componentType": "classification-provider",
                "componentName": "Pattern"
            },
            {
                "isHealthy": true,
                "output": {
                    "isHealthy": true,
                    "checks": [
                        {
                            "passed": true,
                            "output": "PII Classifier model initialized",
                            "componentType": "model",
                            "componentName": "PII Classifier"
                        },
                        {
                            "passed": true,
                            "output": "Dummy classification is responsive",
                            "componentType": "engine",
                            "componentName": "Context Classifier"
                        }
                    ]
                },
                "componentType": "classification-provider",
                "componentName": "Context"
            }
        ]
    }

    Response Fields Description

    NameTypeDescription
    isHealthybooleantrue if all components are functioning properly.
    checksarrayList of component health checks.
    checks[].isHealthybooleantrue if this component is healthy.
    checks[].componentTypestringType of the component (e.g., classification-provider).
    checks[].componentNamestringName of the component (e.g., Pattern).
    checks[].outputobjectDetailed output for this component’s checks.
    checks[].output.isHealthybooleantrue if all of this component’s internal checks passed.
    checks[].output.checksarrayList of individual sub-checks for this component.
    checks[].output.checks[].passedbooleantrue if this sub-check passed.
    checks[].output.checks[].outputstringDescription of the sub-check result.
    checks[].output.checks[].componentTypestringType of the element checked.
    checks[].output.checks[].componentNamestringName of the element checked.

    Response Codes

    CodeDescription
    200Service is running normally.
    503Service is unhealthy. Its components may be initializing or may need a restart.