Version 2.1 Content Type
In API V2, the response format can be influenced by the format query parameter (see output-format).
However the actual Content-Type header in the response will still be one of:
text/plain;charset=UTF-8
text/html;charset=UTF-8
text/xml;charset=UTF-8
This has been problematic for some integration partners. In V2.1, you can use the Accept header to define the response format, and the API will return a matching Content-Type in the response.
The supported values are:
Accept Header | Notes |
---|---|
application/json | Returns a JSON array |
application/stream+json | May return a single JSON object (streamed) |
application/xml | |
text/xml | |
application/xhtml+xml | Requires display parameter |
text/csv | Requires display parameter |
🔗 See: display parameter usage