Common APIs
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
| Code | Description |
|---|---|
| 200 | Version 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
| Code | Description |
|---|---|
| 204 | Service is fully initialized and can handle requests. |
| 503 | Service 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
| Code | Description |
|---|---|
| 204 | Service 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
| Code | Description |
|---|---|
| 200 | Service is running normally. |
| 503 | Service 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
| Name | Type | Required | Description |
|---|---|---|---|
| level | string | Yes | The 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
| Code | Description |
|---|---|
| 200 | Log level updated successfully. |
| 500 | An 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`| Code | Description |
|---|---|
| 200 | Entities retrieved successfully. |
| 502 | Bad Gateway. The service has no entity list it can serve. |
| 598 | Internal 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
| Code | Description |
|---|---|
| 200 | The OpenAPI specification is returned in YAML format. |
Feedback
Was this page helpful?