Skip to content

Latest commit

 

History

History
93 lines (84 loc) · 3.72 KB

File metadata and controls

93 lines (84 loc) · 3.72 KB

Internal API

Overview

The Gravitee API Management (APIM) Management API component includes its own internal API for monitoring and retrieving technical information about the component.

Configuration

Enable the API as a service in the gravitee.yml file and update any other required configuration:

services:
  core:
    http:
      enabled: true
      port: 18083
      host: localhost
      authentication:
        type: basic
        users:
          admin: adminadmin

The above values are defined as follows:

  • enabled: Whether the service is enabled (default true).
  • port: The port the service listens on (default 18083). Ensure you use a port not already in use by another APIM component.
  • host: The host (default localhost).
  • authentication.type: Authentication type for requests (default basic). Use the value none if no authentication is required.
  • authentication.users: A list of user: password combinations. Only required if authentication type is basic.

Endpoints

OperationDescriptionExample
GET /_nodeGets generic node information.
HTTP/1.1 200 OK
Content-Type: application/json
{
    "id": "a70b9fd9-9deb-4ccd-8b9f-d99deb6ccd32",
    "metadata": {},
    "name": "Gravitee.io - Management API",
    "version": {
        "BUILD_ID": "309",
        "BUILD_NUMBER": "309",
        "MAJOR_VERSION": "1.20.14",
        "REVISION": "132e719ef314b40f352e6399034d68a9a95e95ef"
    }
}
GET /_node/health?probes=#probe1,#probe2

Gets the health status of the component.

Probes can be filtered using the optional probes query parameter, which can handle a list of probes separated by commas (,). If no query param is provided, the health of all probes is returned. If the return status is 200, everything is ok; if it is 500, there is at least one error.

This endpoint can be used by a load balancer, e.g., to determine if a component instance is not in the pool.

The following probes are not displayed by default and you must explicitly use the query param to retrieve them:

- cpu

- memory

- api-sync

These probes are considered healthy if they are under a configurable threshold (default is 80%). To configure the default, add it to your gravitee.yml:

[source, yml] ---- services: health: threshold: cpu: 80 memory: 80 ----

GET /_node/health?probes=management-api,management-repository

HTTP/1.1 200 OK
Content-Type: application/json
{
"management-api": {
"healthy": true
},
"management-repository": {
"healthy": true
},
"api-sync": {
"healthy": true
},
"api-sync": {
"healthy": true
}
}
GET /_node/configurationGets the node configuration from the gravitee.yml file and/or environment variables.
HTTP/1.1 200 OK
Content-Type: application/json
{
"analytics.elasticsearch.endpoints[0]": "http://${ds.elastic.host}:${ds.elastic.port}",
"analytics.type": "elasticsearch",
"ds.elastic.host": "localhost",
"ds.elastic.port": 9200,
...
}
GET /_node/monitorGets monitoring information from the JVM and the server.
HTTP/1.1 200 OK
Content-Type: application/json
{
"jvm": {
"gc": {
"collectors": [
{
"collectionCount": 7,
"collectionTime": 98,
"name": "young"
},
{
"collectionCount": 3,
"collectionTime": 189,
"name": "old"
}
]
},
"mem": {
...
}