MariaDB REST Daemons
List the MariaDB REST Daemon instances that serve the REST services, list the REST services an instance serves, and remove instances from the REST metadata.
The MariaDB REST Daemon serves the REST endpoints of the MariaDB REST Service (MRS) from the REST metadata. Each instance registers itself in the REST metadata when it starts, and checks in regularly. An instance that runs in developer mode also serves the REST services that are in development and not yet published.
The installation and bootstrap of the MariaDB REST Daemon are documented with its release.
DROP REST DAEMON
The DROP REST DAEMON statement removes a MariaDB REST Daemon instance from the REST metadata, together with its status reports and log entries, for example an instance that no longer runs. The id is the UUID SHOW REST DAEMONS lists, given as a string. An instance that is still running registers itself again when it restarts.
Syntax
dropRestDaemonStatement:
DROP REST DAEMON (IF EXISTS)? daemonId
;
daemonId:
textStringLiteral
;
dropRestDaemonStatement ::=
daemonId ::=
Examples
The following example removes the MariaDB REST Daemon instance with the id 0199a1b2-6c3e-7d41-9a0f-2b8c4d5e6f70.
DROP REST DAEMON '0199a1b2-6c3e-7d41-9a0f-2b8c4d5e6f70';
SHOW REST DAEMONS
The SHOW REST DAEMONS statement lists the MariaDB REST Daemon instances that serve the REST services.
Syntax
showRestDaemonsStatement:
SHOW REST DAEMONS formatClause?
;
showRestDaemonsStatement ::=
The result has one row per instance, with the columns id, name, address, product_name, version, last_check_in, active, and developer. An instance is active when it has checked in within the last 10 seconds. developer is the developer for whom an instance serves REST services in development.
With FORMAT=JSON, the result is a single JSON array of the instances, which also holds their attributes and options documents. For formatClause, see SHOW CREATE ... FORMAT=JSON.
Examples
The following example lists the MariaDB REST Daemon instances.
SHOW REST DAEMONS;
SHOW REST SERVICES FOR DAEMON
The FOR DAEMON clause of the SHOW REST SERVICES statement lists only the REST services the given MariaDB REST Daemon instance serves. The id is the UUID SHOW REST DAEMONS lists, given as a string.
Syntax
SHOW REST SERVICES FOR DAEMON daemonId
The full rule is showRestServicesStatement, described under SHOW REST SERVICES.
Examples
The following example lists the REST services the MariaDB REST Daemon instance with the id 0199a1b2-6c3e-7d41-9a0f-2b8c4d5e6f70 serves.
SHOW REST SERVICES FOR DAEMON '0199a1b2-6c3e-7d41-9a0f-2b8c4d5e6f70';