REST request structure

You can use different methods when you send requests to the REST management interface.

The general structure of all REST management interface requests is the same. You give the method (GET, PUT, POST, DELETE, OPTIONS) followed by the URI (starting with https://address:5554/mgmt/…). The remaining structure of the request depends on the resource and URI of the request. For example:
GET 'https://example.com:5554/mgmt/config/default/User/Bob'
See REST management resources summary for valid URIs and applicable methods. You can also see which methods are supported for which URIs, by sending a request to that URI using the OPTIONS method. For example:
OPTIONS 'https://example.com:5554/mgmt/config/default/User/Bob'
When you make requests on config objects, you can optionally specify view, depth, and state query parameters. For example:
GET 'https://example.com:5554/mgmt/config/default/User/Bob?view=recursive&depth=2'

See REST management resources summary and Query parameters for details on the parameters and where you can use them.

Authentication header

An HTTP basic authentication header must be present in every request that is sent to the REST management interface.

Request payloads

When you use a PUT or POST method with a URI, you include a payload that contains what is to be put or posted.

The payload is in JSON and conforms to a specific schema. The payload schema is derived from the existing appliance SOMA schema, which is documented in store:///xml-mgmt.xsd.

For example, if you were wanted to modify the default gateway IP address in the eth0 Ethernet interface configuration, you would first retrieve the current value, for example:

GET https://myhost.com:5554/mgmt/config/default/EthernetInterface/eth0/DefaultGateway
{
        "_links" : {
          "self" : {
             "href" : "/mgmt/config/default/EthernetInterface/eth0/DefaultGateway"
          }, 
          "doc" : {
             "href" : "/mgmt/docs/config/EthernetInterface/DefaultGateway"
          }
        }, 
        "DefaultGateway" : "192.0.2.0"
}

You can then use a PUT request to modify the property:

PUT https://myhost.com:5554/mgmt/config/default/EthernetInterface/eth0/DefaultGateway

With the following payload:

{
        "DefaultGateway" : "192.0.2.56"
}

The appliance responds to the PUT request:

{
        "_links" : {
          "self" : {"href" : "/mgmt/config/default/EthernetInterface/eth0/DefaultGateway"
          }, 
          "doc" : {"href" : "/mgmt/docs/config/EthernetInterface/DefaultGateway"
          }
        }, 
        "DefaultGateway" :  "property has been updated."
}