Go to main content
Oracle® ZFS Storage Appliance RESTful API Guide, Release OS8.7.0

Exit Print View

Updated: July 2017
 
 

Change Service State

This command changes the state of a given service.

  • service - The name of the service

  • state - New service state ('enable', 'disable')

Example Request Using URI Parameters:

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"}