Accept http request header, Content-type http request header, Versioning (backward compatibility) – Brocade Network Advisor REST API Guide (Supporting Network Advisor 12.3.0) User Manual
Page 40

26
Brocade Network Advisor REST API Guide
53-1003160-01
Versioning (backward compatibility)
3
Accept HTTP request header
In the case of GET requests, your client must specify the format of the data of the responses. You
do this by providing the HTTP header information. The content type for the response data is
specified through the HTTP request header named “Accept”.
The value for the content type has the following format:
MEDIA type/MIME subtype;Version Identifier
For example:
application/vnd.brocade.networkadvisor+xml;version=v1
application/vnd.brocade.networkadvisor+json;version=v1
In this release, the version is
v1
. For information about the version identifier, refer to
When forming an HTTP GET request, you must specify the request header. The following header
values are supported:
If you do not provide a request header when calling URIs, the response data is returned in XML
format.
Content-type HTTP request header
In the case of POST requests, in addition to specifying the response data format, as described in
you must also specify the format of the data you are sending
through the input request payload. You do this by providing the HTTP Content-type header.
Versioning (backward compatibility)
The Network Advisor REST API provides backward compatibility. However, not all API changes allow
for backward compatibility.
TABLE 8
GET request header values (Accept header)
Request header name
Request header value
Response data format
Accept
application/vnd.brocade.networkadvisor+xml;version=v1
XML
Accept
application/vnd.brocade.networkadvisor+json;version=v1
JSON
TABLE 9
POST request header values (Content-type header)
Request header name
Request header value
Request data format
Content-type
application/vnd.brocade.networkadvisor+xml;version=v1
XML
Content-type
application/vnd.brocade.networkadvisor+json;version=v1
JSON