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.
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.
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.
Related Articles
Create APIs methods
Summary In the article Create and manage APIs versions The first necessary steps to create APIs were shown. Methods define the action to be taken on a particular esource. As a first step you should select the option of Add Methodin the API. Add ...
Apply data formats in data view
Summary Data formats make it possible to modify the values of data view columns and configure when the content is JSON type. To apply a format you must select the option Configure data type and column format and you could select: The column on which ...
Try a method
Summary The developer portal allows you to test reading methods (GETs) on the same portal. Test method Enter an API in the APIs Catalog on the portal's homepage. Then select a method and click on the buttonTest method. Select the implementation which ...
Method define custom error responses
Summary In the same way you can define formats and templates for successful application responses to a method, you can also define error templates for each format you've added and for each type of known error. Set up custom error templates Creating ...
Method defining routes to methods: good practices
Summary Definition of routes orpathsmust be consistent with the resources or entities to which the method refers. Certain good practices for considering in defining routes. A review Before proceeding, let's look at what parts of an endpoint or url. ...