[Runtime Context] Use Cases for Runtime Context API

Forge Component
Published on 17 Jun by Carlos Alfaro
2 votes
Published on 17 Jun 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


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.