format

Selects the data format of the response. There is no content negotiation: the Accept header does not select the format.

Applies to: all services

Value: JSON (default), XML, CSV, HTML, CSV_NO_HEADER or CBOR. The value is not case sensitive.

FormatContent typeDescription
JSONapplication/jsonThe default. Recommended for programmatic access.
XMLtext/xml
CSVtext/csvFor flat data. Includes a header row. Not available for stream and archive.
CSV_NO_HEADERtext/csvAs CSV, without the header row.
CBORapplication/cborBinary encoding of JSON.
HTMLtext/htmlFor viewing in a browser. Shows the data, the fields and the request form. Not intended for applications.

A format that is not supported by a service is refused with the error INVALID_PARAMETER_VALUE, which lists the valid values.

Responses are compressed with gzip when the client indicates that it accepts it. Responses are not cached.

Dates

dateFormat selects the notation of dates and times.

CSV

The first row contains the field names, unless the format is CSV_NO_HEADER. Rows are separated by CRLF. A field that holds several values is written as one cell with the values separated by commas.

With envelope=true an additional last column after holds the after value for the next request, and nextUrl adds the column next.

Escaping conforms to RFC 4180. A value that contains a comma, a double quote or a line break is enclosed in double quotes, and double quotes in the value are doubled. For example:

ValueCSV
value onevalue one
value "two""value ""two"""
value one, two, three"value one, two, three"

Errors

Errors for which the format can not be determined fall back to JSON as a default. Errors after streaming starts can leave a truncated response. See Error codes.