I am exposing an REST API where I customized both the responses and error messages.
Normally I am returning a HTTP 202 "Accepted" for a successful response. This is done by using the SetStatusCode from the HTTPRequestHandler extension. This is advised in the documentation: Change the HTTP Status Code of a REST API - OutSystems 10 Documentation.
However, my API documentation shows HTTP 202 "OK" as response.
Is there a way to customize this response? And maybe show also non-success responses?
Hello @Jan Wagenaar ,
Please check the following links and see if it helps:
1) https://success.outsystems.com/documentation/11/extensibility_and_integration/rest/expose_rest_apis/customize_rest_api_responses/2) https://www.outsystems.com/blog/posts/implementing-http-status-code-exposing-rest/?_gl=1*b3bvfc*_ga*MTk2Njc4MDEzNC4xNjgwNTE0NTcw*_ga_ZD4DTMHWR2*MTY4MzIwOTEzMC4zMC4xLjE2ODMyMTA5MTYuMzEuMC4w
Hi Jan,The documentation of exposed REST APIs is very basic, and frankly lacking. Additional HTTP status codes you define will not show up in the documentation. Neither will a change of a header like content-type.I would like to see the documentation improve to include the full api definition implemented in the logic, and provide documentation aligned to OpenAPI 3+