MaxScale Object Resource

Interact with generic MaxScale objects. This endpoint provides a unified interface for retrieving and managing configuration objects across the instance.

The objects resource collection contains all of the objects that are in MaxScale: listeners, services, filters, servers and monitors. This is a "view" on top of the other resource collection endpoints.

Resource Operations

The :name in all of the URIs must be the name of an object in MaxScale.

Get an object

GET /v1/objects/:name

Get a single object.

Response

Status: 200 OK

{
    "data": {
        "attributes": {
            "connections": 0,
            "listeners": [
                {
                    "attributes": {
                        "module": "MariaDBProtocol",
                        "parameters": {
                            "MariaDBProtocol": {
                                "allow_replication": true,
                                "compression": "zlib,zstd",
                                "compression_threshold": 50
                            },
                            "address": "::",
                            "authenticator": null,
                            "authenticator_options": null,
                            "connection_init_sql_file": null,
                            "connection_metadata": [
                                "character_set_client=auto",
                                "character_set_connection=auto",
                                "character_set_results=auto",
                                "max_allowed_packet=auto",
                                "system_time_zone=auto",
                                "time_zone=auto",
                                "tx_isolation=auto",
                                "maxscale=auto"
                            ],
                            "port": 4008,
                            "protocol": "MariaDBProtocol",
                            "proxy_protocol_networks": null,
                            "redirect_url": null,
                            "service": "Read-Connection-Router",
                            "socket": null,
                            "sql_mode": "default",
                            "ssl": false,
                            "ssl_ca": null,
                            "ssl_cert": null,
                            "ssl_cert_verify_depth": 9,
                            "ssl_cipher": null,
                            "ssl_crl": null,
                            "ssl_key": null,
                            "ssl_passphrase": "",
                            "ssl_verify_peer_certificate": false,
                            "ssl_verify_peer_host": false,
                            "ssl_version": "MAX",
                            "type": "listener",
                            "user_mapping_file": null
                        },
                        "source": {
                            "file": "/etc/maxscale.cnf",
                            "type": "static"
                        },
                        "state": "Running"
                    },
                    "id": "Read-Connection-Listener",
                    "relationships": {
                        "services": {
                            "data": [
                                {
                                    "id": "Read-Connection-Router",
                                    "type": "services"
                                }
                            ],
                            "links": {
                                "related": "http://localhost:8989/v1/services/",
                                "self": "http://localhost:8989/v1/listeners/Read-Connection-Listener/relationships/services/"
                            }
                        }
                    },
                    "type": "listeners"
                }
            ],
            "module": "readconnroute",
            "parameters": {
                "auth_all_servers": false,
                "connection_keepalive": "300000ms",
                "disable_sescmd_history": false,
                "enable_root_user": false,
                "force_connection_keepalive": false,
                "idle_session_pool_time": "-1ms",
                "localhost_match_wildcard_host": true,
                "log_auth_warnings": true,
                "log_debug": false,
                "log_info": false,
                "log_notice": false,
                "log_warning": false,
                "master_accept_reads": true,
                "max_connections": 0,
                "max_replication_lag": "0ms",
                "max_sescmd_history": 50,
                "multiplex_timeout": "60000ms",
                "net_write_timeout": "0ms",
                "password": "*****",
                "prune_sescmd_history": true,
                "rank": "primary",
                "retain_last_statements": -1,
                "role": null,
                "router": "readconnroute",
                "router_options": "master",
                "strip_db_esc": true,
                "type": "service",
                "user": "maxuser",
                "user_accounts_file": null,
                "user_accounts_file_usage": "add_when_load_ok",
                "version_string": null,
                "wait_timeout": "28800000ms"
            },
            "router": "readconnroute",
            "source": {
                "file": "/etc/maxscale.cnf",
                "type": "static"
            },
            "started": "Fri, 25 Jul 2025 15:43:46 GMT",
            "state": "Started",
            "statistics": {
                "active_operations": 0,
                "avg_sescmd_history_length": 0.0,
                "avg_session_active_pct": 0.0,
                "avg_session_lifetime": 0.0,
                "avg_session_queries": 0.0,
                "connections": 0,
                "failed_auths": 0,
                "max_connections": 0,
                "max_sescmd_history_length": 0,
                "max_session_active_pct": 0.0,
                "max_session_lifetime": 0.0,
                "max_session_queries": 0,
                "routed_packets": 0,
                "routed_reads": 0,
                "routed_writes": 0,
                "total_connections": 0
            },
            "total_connections": 0,
            "users": [
                {
                    "default_role": "",
                    "global_priv": false,
                    "host": "127.0.0.1",
                    "plugins": [
                        {
                            "auth_string": "976B96FB3F7898CCFFCABC014300C311FB7607FD",
                            "plugin": "mysql_native_password"
                        }
                    ],
                    "proxy_priv": false,
                    "ssl": false,
                    "super_priv": false,
                    "user": "healthcheck"
                },
                {
                    "default_role": "",
                    "global_priv": false,
                    "host": "::1",
                    "plugins": [
                        {
                            "auth_string": "976B96FB3F7898CCFFCABC014300C311FB7607FD",
                            "plugin": "mysql_native_password"
                        }
                    ],
                    "proxy_priv": false,
                    "ssl": false,
                    "super_priv": false,
                    "user": "healthcheck"
                },
                {
                    "default_role": "",
                    "global_priv": false,
                    "host": "localhost",
                    "plugins": [
                        {
                            "auth_string": "976B96FB3F7898CCFFCABC014300C311FB7607FD",
                            "plugin": "mysql_native_password"
                        }
                    ],
                    "proxy_priv": false,
                    "ssl": false,
                    "super_priv": false,
                    "user": "healthcheck"
                },
                {
                    "default_role": "",
                    "global_priv": false,
                    "host": "localhost",
                    "plugins": [
                        {
                            "auth_string": "",
                            "plugin": "mysql_native_password"
                        }
                    ],
                    "proxy_priv": false,
                    "ssl": false,
                    "super_priv": false,
                    "user": "mariadb.sys"
                },
                {
                    "default_role": "",
                    "global_priv": true,
                    "host": "127.0.0.1",
                    "plugins": [
                        {
                            "auth_string": "5EDBD32E469DAE0CE10E6999C3899DEFCB9F12E0",
                            "plugin": "mysql_native_password"
                        }
                    ],
                    "proxy_priv": false,
                    "ssl": false,
                    "super_priv": true,
                    "user": "maxuser"
                },
                {
                    "default_role": "",
                    "global_priv": true,
                    "host": "%",
                    "plugins": [
                        {
                            "auth_string": "5EDBD32E469DAE0CE10E6999C3899DEFCB9F12E0",
                            "plugin": "mysql_native_password"
                        }
                    ],
                    "proxy_priv": false,
                    "ssl": false,
                    "super_priv": true,
                    "user": "maxuser"
                },
                {
                    "default_role": "",
                    "global_priv": true,
                    "host": "localhost",
                    "plugins": [
                        {
                            "auth_string": "",
                            "plugin": "mysql_native_password"
                        }
                    ],
                    "proxy_priv": false,
                    "ssl": false,
                    "super_priv": true,
                    "user": "root"
                },
                {
                    "default_role": "",
                    "global_priv": true,
                    "host": "%",
                    "plugins": [
                        {
                            "auth_string": "",
                            "plugin": "mysql_native_password"
                        }
                    ],
                    "proxy_priv": false,
                    "ssl": false,
                    "super_priv": true,
                    "user": "root"
                }
            ],
            "users_last_update": "Fri, 25 Jul 2025 15:43:49 GMT"
        },
        "id": "Read-Connection-Router",
        "links": {
            "self": "http://localhost:8989/v1/services/Read-Connection-Router/"
        },
        "relationships": {
            "filters": {
                "data": [
                    {
                        "id": "QLA",
                        "type": "filters"
                    },
                    {
                        "id": "Hint",
                        "type": "filters"
                    }
                ],
                "links": {
                    "related": "http://localhost:8989/v1/filters/",
                    "self": "http://localhost:8989/v1/services/Read-Connection-Router/relationships/filters/"
                }
            },
            "listeners": {
                "data": [
                    {
                        "id": "Read-Connection-Listener",
                        "type": "listeners"
                    }
                ],
                "links": {
                    "related": "http://localhost:8989/v1/listeners/",
                    "self": "http://localhost:8989/v1/services/Read-Connection-Router/relationships/listeners/"
                }
            },
            "servers": {
                "data": [
                    {
                        "id": "server1",
                        "type": "servers"
                    },
                    {
                        "id": "server2",
                        "type": "servers"
                    }
                ],
                "links": {
                    "related": "http://localhost:8989/v1/servers/",
                    "self": "http://localhost:8989/v1/services/Read-Connection-Router/relationships/servers/"
                }
            }
        },
        "type": "services"
    },
    "links": {
        "self": "http://localhost:8989/v1/services/Read-Connection-Router/"
    }
}

Get all objects

Get all services.

Response

Status: 200 OK

This page is licensed: CC BY-SA / Gnu FDL

Last updated

Was this helpful?