You are here

REST API Output Formats

Subscribe to Syndicate
The default output format for the REST API is in a human readable and navigable html format. That is not always the easiest for a web developer to deal with in a program, so the API offers a number of output formats that can be viewed using https://127.0.0.1/api/v1/extensions which produces a list like the one to the right.

Some example output formats are below and they may be supplemented as need be:

  • csv - comma delimited values
  • html - output from the database viewable in html format (the default)
  • json - data is delivered in json format, probably the best for programming
  • xls/xlsx - data is sent in excel spreadsheet format, probably best for subsequent analysis by end users
  • xml - also a programmer based format

 

Using one of the other output formats

It is very easy to use one of the other output formats. For example, to request that the output be in json format, simply add .json to the url.

After logging in to the REST API, try the following examples to get the sample page above in different formats:

This applies to all URL's in the REST API - using carts for example: