[Runtime Context] Use Cases for Runtime Context API

[Runtime Context] Use Cases for Runtime Context API

  
Forge Component
(2)
Published on 2017-12-09 by Carlos Alfaro
2 votes
Published on 2017-12-09 by Carlos Alfaro

Hi Carlos,

Can you describe the use cases for this API? What do you use it for? 

If there’s a long and commonly used list of use Cases, maybe this is something we should consider adding as an idea to be a Platform built-in API

Solution

Hi Gonçalo,

Thank you for question and interest on this Runtime Context API.

My objective initially was to create a server-side version of the already existing client-side outsystems.api.requestInfo API, which I needed to do automatic Auditing and Logging of the current running context. This information is largely returned by the GetAppInfo and GetRequestTracer actions.

The GetRESTExposeContext and GetRESTConsumeContext actions were created from the same need, specially because in the OnAuthentication, OnRequest, OnResponse, OnBeforeRequest or OnAfterRequest handler actions, there is no way to identify the current Consumed or Exposed ServiceName and ActionName.

Besides Auditing and Logging, there are other use-cases, like the creating a per-exposed-service Authentication and Authorization layer (using the OnAuthentication handler), or a centralized IT managed consumed service credentials list (using the OnBeforeRequest handler).


Hope this answers your question. Feel free to ask me for more information.

CA

Solution