REST request structure
You can use different methods when you send requests to the REST management interface.
GET 'https://example.com:5554/mgmt/config/default/User/Bob'
OPTIONS 'https://example.com:5554/mgmt/config/default/User/Bob'
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."
}