Go to main content

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

Exit Print View

Updated: November 2018
 
 

Modify Service Configuration

Configuration properties on a specified service can be modified by sending a PUT request with the new property values defined in the header. Some services may have sub-resources, and they can also be modified by following the href defined in the sub-resource.

Example Request:

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

{"port": 218}

Successful response returns HTTP status of 202 (Accepted):

HTTP/1.1 202 Accepted
Content-Length: 162
Content-Type: application/json; charset=utf-8
X-Zfssa-Service-Api: 1.0

{
    "service": {
        "<status>": "disabled",
        "href": "/api/service/v1/services/sftp",
        "keys": [],
        "listen_port": 218,
        "logging_verbosity": "INFO",
        "root_login": false
    }
}