Methods define the action to be taken on a particular resource. As a first step you should select the option of Add Method in the API:
Output templates
Health or output templates make it possible to define the response format of the method. It can also add multiple output formats, to fit different standards and/or facilitate reading responses by consumer systems, applications or users.
To find more information on how to set up the output of methods, we recommend reading:
- How to work with templates to define the output of methods
- Scientific define output formats for methods
Error templates
When the request for the method is unsuccessful, apply the error templates. These templates make it possible to define custom errors in each of the methods.
Output preview
The preview would allow you to know what the method's response would be, based on the selected data view, format and template.
Data dictionary
The data dictionary makes it possible to provide more information about the attributes of the method. For each of the columns in the view it is possible to define a Name, Description and Data Type.
The types of data available are string, integer, number and boolean.
When you define numerical data types (integer and number) Extended API options would enable grouping and aggregation operations (sum, average, count) and dynamic filters. By adding a dictionary these options would be displayed in the window Test method of the Developer Portal.
Limits
Limits can be set globally in the API and overwritten in methods for more precise and differentiated control.
You can set the auth_key shipment as a matter or header.
If you select as the header, the shipment of the auth key should send it in the header with the name "Authorization" and its value.
Visibility