They define the operating parameters and are name/value pairs that appear in both request and response messages. The name of the header is separated from the value by a single colon.
The following table contains the supported HTTP methods for the media types.
Method | Media types |
---|---|
HEAD | Supports all media types for this method |
OPTIONS | Supports all media types for this method |
GET | Supports all media types for this method |
POST | application/vnd.configuration.resource+xml application/vnd.operations.resource+xml application/vnd.configuration.resource+jsonapplication/vnd.yang.operation+json |
PUT | application/vnd.configuration.resource+xml
application/vnd.configuration.resource+json |
PATCH | application/vnd.configuration.resource+xml
application/vnd.configuration.resource+json |
DELETE | application/vnd.configuration.resource+xml
application/vnd.configuration.resource+json |
For more information about the media types, refer to the Media types section.
Note
All Extreme REST API requests that return data support the XML and JASON format.Custom request header: The following headers are supported to facilitate the retrieval, datastore information, and API versioning.
Header name | Description | Header value; Methods; Media types |
---|---|---|
Resource-Depth | Used in the client request to inform the server to retrieve the nested child resources in the same response as inline data. | Header value: <1 - 64> Methods: GET Media types: All Default value: 3 |
curl -k -X GET -H 'Accept: application/vnd.operational-state.resource+xml' -H 'Resource-Depth: 1' -u "admin:password" http://10.20.100.32:80/rest/operational-state/mem-state
Response Body
<data xmlns="http://brocade.com/ns/rest" xmlns:y="http://brocade.com/ns/rest" y:self="/rest/operational-state"> <mem-state xmlns="urn:brocade.com:mgmt:brocade-RAS-operational" y:self="/rest/operational-state/mem-state"> <summary y:self="/rest/operational-state/mem-state/summary"> <memory-used-percentage>14.58</memory-used-percentage> <memory-total>32306696</memory-total> <memory-total-used>4709260</memory-total-used> <memory-total-free>27597436</memory-total-free> <memory-low-free>26803128</memory-low-free> <memory-high-free>0</memory-high-free> <memory-cached>794012</memory-cached> </summary> <mem-list y:self="/rest/operational-state/mem-state/mem-list"> <memory-used-percentage>14.58</memory-used-percentage> <memory-total>32306696</memory-total> <memory-total-used>4710040</memory-total-used> <memory-total-free>27596656</memory-total-free> <memory-low-free>26802564</memory-low-free> <memory-high-free>0</memory-high-free> <memory-cached>794012</memory-cached> <memory-per-process y:self="/rest/operational-state/mem-state/mem-list/memory-per-process/5923"> <memory-process-id>5923</memory-process-id> </memory-per-process> <memory-per-process y:self="/rest/operational-state/mem-state/mem-list/memory-per-process/3872"> <memory-process-id>3872</memory-process-id> </memory-per-process>
Note
The<memory-per-process>
section only shows the <memory-process-id>
for each proccess. However, by using the
Resource-Depth header and specifying a deeper depth, it is possible to get all the
information for the proccesses in a single call.curl -k -X GET -H 'Accept: application/vnd.operational-state.resource+xml' -H 'Resource-Depth: 2' -u "admin:password" http://10.20.100.32:80/rest/operational-state/mem-state
Response Body
<data xmlns="http://brocade.com/ns/rest" xmlns:y="http://brocade.com/ns/rest" y:self="/rest/operational-state"> <mem-state xmlns="urn:brocade.com:mgmt:brocade-RAS-operational" y:self="/rest/operational-state/mem-state"> <summary y:self="/rest/operational-state/mem-state/summary"> <memory-used-percentage>14.58</memory-used-percentage> <memory-total>32306696</memory-total> <memory-total-used>4710940</memory-total-used> <memory-total-free>27595756</memory-total-free> <memory-low-free>26801120</memory-low-free> <memory-high-free>0</memory-high-free> <memory-cached>794388</memory-cached> </summary> <mem-list y:self="/rest/operational-state/mem-state/mem-list"> <memory-used-percentage>14.59</memory-used-percentage> <memory-total>32306696</memory-total> <memory-total-used>4712088</memory-total-used> <memory-total-free>27594608</memory-total-free> <memory-low-free>26800176</memory-low-free> <memory-high-free>0</memory-high-free> <memory-cached>794400</memory-cached> <memory-per-process y:self="/rest/operational-state/mem-state/mem-list/memory-per-process/5923"> <memory-process-id>5923</memory-process-id> <memory-process-name>hslagtd</memory-process-name> <memory-utilized>4.30</memory-utilized> <memory-utilized-vsize>5856768</memory-utilized-vsize> <memory-utilized-rss>1393072</memory-utilized-rss> <memory-utilized-pss>1388459</memory-utilized-pss> </memory-per-process> <memory-per-process y:self="/rest/operational-state/mem-state/mem-list/memory-per-process/3872"> <memory-process-id>3872</memory-process-id> <memory-process-name>Dcmd</memory-process-name> <memory-utilized>1.40</memory-utilized> <memory-utilized-vsize>5139944</memory-utilized-vsize> <memory-utilized-rss>480824</memory-utilized-rss> <memory-utilized-pss>432956</memory-utilized-pss> </memory-per-process>
Note
The response data has all the information present in the CLI commandshow proccess memory
for
each process.Standard response header: The following are the supported standard response headers:
Note
All Extreme REST API requests that return data support the XML and JSON format.The with-default header takes value all . This is used to get the running configuration of the configured along with default values of unconfigured resource. The following is an example of the with-default header.
Request Body
curl -v -X GET -u admin:password https://host/rest/config/running/router/mpls -H "Resource-Depth: 10" -k -H "With-Default: all"
Response body
<mpls xmlns="urn:extreme.com:mgmt:extreme-mpls" xmlns:y="http://extreme.com/ns/rest" y:self="/rest/config/running/router/mpls"> <lsp-xc-traps y:self="/rest/config/running/router/mpls/lsp-xc-traps"> <enable default="true" ></enable> </lsp-xc-traps> <lsp y:self="/rest/config/running/router/mpls/lsp/lsp1"> <lsp-name>lsp1</lsp-name> </lsp> </mpls>