MySQL Router 8.0  /  MySQL Router REST API  /  MySQL Router REST API Reference

6.2 MySQL Router REST API Reference

health

GET /health

Check if service is ready to serve client connections. It includes known backends and the cluster's health status.

Available Responses

200

Description: Service is healthy

Response Content-Type: application/json

Response Schema

state

string

Current state of the metadata cache

reason

string

Explaination for current state

500

Description: Service is not healthy

Response Content-Type: application/json

Response Schema

state

string

Current state of the metadata cache

reason

string

Explaination for current state

metadata

GET /metadata/{replicasetName}/cache

Returns status of InnoDB Cluster metadata cache

Available Responses

200

Description: Status of InnoDB Cluster metadata cache

Response Content-Type: application/json

Response Schema

last_refreshed

string

Last time metadata has been attempted to be refreshed

refresh_failed

integer

Number of times attempt to refresh metadata failed

refresh_succeeded

integer

Number of times attempt to refresh metadata succeeded

Path Parameters

replicasetName (required)

string

Name of a replicaset

GET /metadata/{replicasetName}/nodes

Returns nodes configuration and status of InnoDB Cluster nodes

Available Responses

200

Description: Status and Configuration of InnoDB Cluster metadata nodes

Response Content-Type: application/json

Response Schema

replicasets

object

Path Parameters

replicasetName (required)

string

Name of a replicaset

router

GET /router/status

Get status of router

Available Responses

200

Description: Status of Router

Response Content-Type: application/json

Response Schema

running_since

string

Time at which application was started

version

string

Version of the application

routing

GET /routing

Returns names of routes

Available Responses

200

Description: Names of routes

Response Content-Type: application/json

GET /routing/{routeName}/config

Get configuration of route

Available Responses

200

Description: Configuration of route

Response Content-Type: application/json

Response Schema

bind_address

string

Address the socket is bound to

client_connect_timeout

number

Connect timeout for clients in seconds

destination_connect_timeout

number

Connect timeout to destinations in seconds

max_active_connections

integer

Max allowed parallel connections

protocol

string

Protocol

404

Description: Route not found

Path Parameters

routeName (required)

string

Name of a route

GET /routing/{routeName}/status

Get status of a route

Available Responses

200

Description: Status of a route

Response Content-Type: application/json

Response Schema

active_connections

integer

Currently active connections

total_connections

integer

Finished connections since start

404

Description: Route not found

Path Parameters

routeName (required)

string

Name of a route

GET /routing/{routeName}/blockedhosts

Get blocked hosts of a route

Available Responses

200

Description: Blocked hosts of a route

Response Content-Type: application/json

404

Description: Route not found

Path Parameters

routeName (required)

string

Name of a route