Query OCP application status

2025-03-28 08:05:55  Updated

Description

You can call this operation to query the status of the OCP application. It checks the status of each module of the OCP application and returns the health status of all modules.

Call description

Prerequisite

You have passed the authentication for the OCP application service.

Request path

GET /api/status

Request parameters

Parameter Type Required Example Description
includeUnavailableComponent Boolean No true Specifies whether to query the names of unavailable modules. * The default value is false. In this case, only the health status of the application is returned. * If the parameter is set to true, the names of unhealthy modules are returned along with the application health status.

Response parameters

Simple text is returned.

The available status keyword of the API. The default value is okay.

The unavailable status keyword of the API. The default value is bad. Note

You can set the text returned in the OCP system parameters. The parameter ocp.health-check.status.available-keyword specifies the available status keyword of the API. The parameter ocp.health-check.status.unavailable-keyword specifies the unavailable status of the API.

Examples

Sample request

  • Query the health status of the application and names of unavailable modules if any.
GET /api/status?includeUnavailableComponent=true

Sample response

  • When the application is healthy:
okay
  • When the application is unhealthy:
bad
  • When the application is unhealthy, query the names of the unhealthy modules:
bad monitordb

Contact Us