Resource context

Resource context

The context of the resources of the APIs is represented by the parameter "ctx" that serves as input for the resources. As shown in the image below:

Within this context, it is possible to find information such as a query string, HTTP method, headers, body and URL parameters sent. Also like the tenant id used, the order id and the routing used. This information follows the following structure:

{
    "url": "v1/example",
    "queryString": {
        "apiKey": "example"
    },
    "method": "POST",
    "headers": {
        "x-tenant": "", // tenant id
        "x-project": "", // project id
        "x-request-id": "", // request id
    },
    "body": {
        "some": "data"
    },
    "params": {
        "id": ""
    }
}