Go to main content

Oracle® ZFS Storage Appliance RESTful API Guide, Release OS8.8.0

Exit Print View

Updated: November 2018
 
 

Change Service State

This command changes the state of a given service. The following URI parameters are used:

service

Name of the service

state

New service state: enable or disable

Example Request:

PUT /api/service/v1/services/replication/enable HTTP/1.1
Host: zfs-storage.example.com
Accept: application/json

Successful response returns HTTP status 202 (Accepted). The service can also be enabled or disabled by sending a JSON request to the service.

Example request using JSON:

PUT /api/service/v1/services/replication HTTP/1.1
Host: zfs-storage.example.com
Accept: application/json
Content-Type: application/json
Content-Length: 22

{"<status>": "enable"}

To disable the service send the following JSON:

{"<status>": "disable"}