OutSystems allows you to expose methods using a REST API. Those methods can be organized under multiple REST APIs.
REST API Method Flow
When a request to your REST API Method is received, OutSystems executes the following flow:
- Security Validations: After receiving the REST API Method request, OutSystems executes the security validations according to the settings in REST API properties HTTP Security and Internal Access Only.
- OnRequest(): OnRequest callback allows you to run logic over the requests after receiving them.
- OnAuthentication(): OnAuthentication callback allows you to add basic authentication or custom authentication to requests.
- Parameters Deserialization and Validation: Deserialization of the input parameters and validation of the data types, mandatory values, etc.
- Execute Method: Executes the action that implements the REST API Method.
- Parameters Serialization: Serialization of the output parameters to return in the response.
- OnResponse(): OnResponse callback allows you to run logic over the responses before sending them. It is always executed, even in an error situation.