155
Views
2
Comments
Show customized REST API responses
Question

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?

2017-04-20 10-11-42
Mitch JT

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+

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.