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

Return to the regular view of this page.

Common APIs

Standard operational endpoints available on the service.

    These endpoints provide operational capabilities such as retrieving the API specification, managing log levels, checking version information, and monitoring service health.

    Version API

    View runtime version information.

    GET http://<Host Address>/version

    Sample Request

    curl -X GET "http://<Host_address>/version"
         
    import requests
        
        url = "http://<Host_address>/version"
        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>/version`

    Response Codes

    CodeDescription
    200Version information retrieved successfully.

    Readiness Probe

    This is used by Kubernetes as a readiness probe.

    GET http://<Host Address>/ready

    Sample Request

    curl -X GET "http://<Host_address>/ready"
         
    import requests
        
        url = "http://<Host_address>/ready"
        response = requests.get(url, verify=False)
        
        print("Status code:", response.status_code)
        

    The file /docs/discover/restapi/commonapis/output/postman.json was not found.

    Response Codes

    CodeDescription
    204Service is fully initialized and can handle requests.
    503Service is not yet ready to serve requests.

    Liveness Probe

    Used by Kubernetes as a liveness probe.

    GET http://<Host Address>/live

    Used by Kubernetes as a liveness probe.

    Sample Request

    curl -X GET "http://<Host_address>/live"
         
    import requests
        
        url = "http://<Host_address>/live"
        response = requests.get(url, verify=False)
        
        print("Status code:", response.status_code)
        
    URL: GET `http: //<Host_address>/live`

    Response Codes

    CodeDescription
    204Service can handle requests.

    Health Check

    Returns service health status including individual component-level checks.

    GET http://<Host Address>/health

    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`

    Response Codes

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

    Retrieve Logs

    GET http://<Host Address>/log

    Returns the current runtime logging level.

    Sample Request

    curl -X GET "http://<Host_address>/log"
         
    import requests
        
        url = "http://<Host_address>/log"
        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>/log`

    Update the Logging Level

    Updates the runtime logging level.

    POST http://<Host Address>/log

    Request Body

    NameTypeRequiredDescription
    levelstringYesThe log level to set. Possible values: debug, info, warn.

    Sample Request

    curl -X POST "http://<Host_address>/log" \
           -H "Content-Type: application/json" \
           -d '{"level": "debug"}'
         
    import requests
        
        url = "http://<Host_address>/log"
        payload = {"level": "debug"}
        headers = {"Content-Type": "application/json"}
        response = requests.post(url, json=payload, headers=headers, verify=False)
        
        print("Status code:", response.status_code)
        try:
            print("Response JSON:", response.json())
        except ValueError:
            print("Response Text:", response.text)
        
    URL: POST `http: //<Host_address>/log`
       Body (JSON): {
           "level": "debug"
       }

    Response Codes

    CodeDescription
    200Log level updated successfully.
    500An error occurred (e.g., invalid log level specified).

    Note: The service currently returns 500 for invalid log level values. The OpenAPI spec defines 400 for this case — this is a known discrepancy to be addressed in a future release.

    Supported Entities

    List the entities supported by Classify.

    GET http://<Host Address>/pty/data-discovery/v2/entities

    Query Parameters

    None

    Sample Request

    curl -X GET "http://<Host_address>/entities"
         
    import requests
        
        url = "http://<Host_address>/entities"
        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>/entities`
    CodeDescription
    200Entities retrieved successfully.
    502Bad Gateway. The service has no entity list it can serve.
    598Internal Server Error. Check server logs.

    API Specification

    Returns the OpenAPI specification for the Classify API.

    GET http://<Host Address>/doc

    Sample Request

    curl -X GET "http://<Host_address>/doc"
         
    import requests
        
        url = "http://<Host_address>/doc"
        response = requests.get(url, verify=False)
        
        print("Status code:", response.status_code)
        print("Response YAML:", response.text)
        
    URL: GET `http: //<Host_address>/doc`

    Response Codes

    CodeDescription
    200The OpenAPI specification is returned in YAML format.