Base services REST API

Use this REST API to query the running status of operating system services on the Platform System Manager or to restart the services.

You can use the REST API to query the status of or restart the following operating system services on the Platform System Manager:
sshd
Provides SSH support for the system.
rsyslog
Provides system logging support for the system.
rsyslog2
Provides system logging support for the hardware components in the system.
dnsmasq
Provides DNS caching for the system.
ntpd
Provides NTP support for the system.

Specify a name when querying a service

The following example shows how to provide a query parameter "name" when querying a service:
https://<IP>/admin/resources/baseservices?name=dnsmasq

{
"service name":"dnsmasq",
"status":"running"
}

Restart a service

The following example shows how to restart a service with an extra "action=restart" query parameter:
https://<IP>/admin/resources/baseservices?name=dnsmasq&action=restart

{
"service name":"dnsmasq",
"status":"running"
}

Flush dnsmasq cache

The following example shows how to flush the dnsmasq cache with an extra "action=flush" query parameter. This REST API is supported in V2.1.0.1 or later.
https://<IP>/admin/resources/baseservices?name=dnsmasq&action=flush
{
"service name":"dnsmasq",
"status":"running"
}