What are the types of method requests
Summary
APIs methods require the definition of a type of application.
We suggest that you respect REST/json standards when creating their methods, based on the following definitions.
Types of request or application
The methods most used in APIs applications are as follows:
Type of application
| Description
|
GET
|
The GET method is used to consult or obtain source data.
|
POST
|
The POST method is normally used to send a resource or entity to the origin, i.e. to create a new record.
Despite this, there may be methods that do not make changes in origin but are used to obtain data.
|
PUT
|
The PUT method is used to change the entirety of an entity at origin.
|
PATCH
|
The PATCH method is used to apply partial modifications to an entity at source.
|
DELETE
|
The DELETE method is used to delete or delete an entity or resource at source.
|
That is the definition of the standard, your API may not meet these specifications depending on your requirements.
It recalls that the selection of the type of application in the API method is independent of the request to be sent to the source. The request sent to the source is defined by creating the Data Source.
That is, you can set up a POST request at your source to obtain data, while you can expose that data in a GET method. This allows you to standardize application types based on the standard without making changes to your data source.
GET requests can be previewed and tested on the developer portal. The rest of the application types are not previewed on the portal to avoid unwanted executions.
Related Articles
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 ...
Configure context variables at method parameters
Summary Context variables allow you to associate values assigned to the account, users and applications to APIs parameters values. By setting up the API method you can relate its parameters to context variables. When a request is made to the method, ...
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. ...
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 ...
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 ...