Method define response formats for methods

Method define response formats for methods

Summary

Output formats allow you to define one or more response formats in your API methods.

Output formats can be multiple in JSON format, although it can also expose the data in CSV and XML.



Configure formats


When creating a method you should define one or more response formats. The response formats make it possible to define the output of the request, i.e. the response that the method would deliver to a request.

Once the data view is selected, you should define the output formats and their templates.

Output or output templates allow you to define the output response for the selected format.

To define a new output select the desired format andNew template. You could also select an existing template and copy it to reuse it in its new method.

Output templates are defined by jinja templates.


In the same window, when creating or editing template, you could access references that would allow you to invoke the results of your data view.


To learn more about templates read the articleHow to work with templates to define the output of methods