Skip to content

Latest commit

 

History

History
218 lines (146 loc) · 5.86 KB

File metadata and controls

218 lines (146 loc) · 5.86 KB

ibutsu_client.HealthApi

All URIs are relative to /api

Method HTTP request Description
get_database_health GET /health/database Get a health report for the database
get_health GET /health Get a general health report
get_health_info GET /health/info Get information about the server

get_database_health

Health get_database_health()

Get a health report for the database

Example

  • Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.health import Health
from ibutsu_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = ibutsu_client.Configuration(
    host = "/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): jwt
configuration = ibutsu_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with ibutsu_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ibutsu_client.HealthApi(api_client)

    try:
        # Get a health report for the database
        api_response = api_instance.get_database_health()
        print("The response of HealthApi->get_database_health:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling HealthApi->get_database_health: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

Health

Authorization

jwt

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 A health report -
500 A health report with an error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_health

Health get_health()

Get a general health report

Example

import ibutsu_client
from ibutsu_client.models.health import Health
from ibutsu_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = ibutsu_client.Configuration(
    host = "/api"
)


# Enter a context with an instance of the API client
with ibutsu_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ibutsu_client.HealthApi(api_client)

    try:
        # Get a general health report
        api_response = api_instance.get_health()
        print("The response of HealthApi->get_health:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling HealthApi->get_health: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

Health

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 A health report -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_health_info

HealthInfo get_health_info()

Get information about the server

Example

  • Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.health_info import HealthInfo
from ibutsu_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = ibutsu_client.Configuration(
    host = "/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): jwt
configuration = ibutsu_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with ibutsu_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ibutsu_client.HealthApi(api_client)

    try:
        # Get information about the server
        api_response = api_instance.get_health_info()
        print("The response of HealthApi->get_health_info:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling HealthApi->get_health_info: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

HealthInfo

Authorization

jwt

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Some information about the server -

[Back to top] [Back to API list] [Back to Model list] [Back to README]