Api
API Overview
General
SQL Server A3ERP instance data access
Fields
Display of returned fields in views
Returns the fields displayed by the view in the query.
Example:
View with the fields to be returned
Bearer + JWT_token
Returns the fields of the selected view
Returns the fields of the selected view
Security
Fixed API KEY obtained by validation on customer, supplier, carrier, representative, person or API_login masters.
Logs
The API has a log file in the folder indicated in the configuration in which the incidents and results of the API calls are recorded.
Pagination
In all queries the query option is given to obtain only the number of records in the query and to be able to paginate the results. For this we must use the parameters of the query header.
To get the number of records in a query we must create the Count parameter in the header and assign it the value T. (Record count cannot be used with the order parameter of queries).
Example:
An api endpoint
Bearer + JWT_token
T
Returns an Array Objects with parameter records
Returns an Array Objects with parameter records
To paginate a query we have to indicate in the header parameters (sorting is needed for pagination to work)
Example:
An api endpoint
Number of records per page
Page number to display
Bearer + JWT_token
Returns the paged call
Returns the paged call
Sin contenido
Sorting and Filtering
In many queries you can sort by a parameter or filter by parameters, both can be used at the same time.
The sort order can be changed using SQL syntax.
Example:
Parameter to be sorted
Bearer + JWT_token
Returns the endpoint sorted by that parameter
Returns the endpoint sorted by that parameter
Sin contenido
The filter has the same where SQL syntax so you can add several different filters in the same request.
Example:
https://server:5555/api/maestro/almacenes/filtro/encargado="7260 GYD"
SQL syntax filtering
Bearer + JWT_token
Returns the endpoint filtered by that parameter
Returns the endpoint filtered by that parameter
Sin contenido
It can be used together by putting the filter first.
Ejemplo:
https://server:5555/api/maestro/almacenes/filtro/encargado="7260 GYD"/order/desc
SQL syntax filtering
Parameter to sort SQL
Bearer + JWT_token
Returns the filtered and sorted endpoint
Returns the filtered and sorted endpoint
Sin contenido
Última actualización
¿Te fue útil?