• 02 Feb 2024
  • 3 Minutes to read
  • PDF


  • PDF

Article summary

The Akana API Gateway serves as the entry point for external and internal API traffic. It acts as a mediator between clients (such as applications or devices) and the APIs hosted on the backend. The gateway is responsible for enforcing security policies, managing traffic, and ensuring that API requests and responses adhere to specified protocols. The gateway helps manage the flow of API traffic, implementing policies for rate limiting, throttling, and caching.

Traceable integrates with Akana API Gateway by providing a policy that captures requests and responses. Following is a high-level diagram showing the traffic flow through Traceable’s policy in Akana.

The following is an explanation of the traffic flow:


  • The client sends a request to Akana. This request passes through the Traceable’s Akana policy.

  • The policy captures the request and sends it to the Traceable Platform agent.

  • The request is forwarded to the application.


  • The application sends a response.

  • The policy captures the response and sends it to the Traceable Platform agent.

  • The response is sent to the client.

The request and response are sent to Traceable Platform from the Traceable Platform agent.

Before you begin

Make a note of the following points before proceeding with the configuration:

  • Make sure that the Traceable Platform agent is already installed. For more information on installation, see Platform agent.

  • Make a note of the Platform agent’s IP address. This would be required during the configuration.

  • Download Traceable’s Akana policy from Traceable’s download site.

  • Make sure you have an account in Akana.


Configuring Traceable policy for Akana consists of a few steps, as mentioned below:

  1. Add Traceable Platform agent endpoint in Akana.

  2. Fetch the variable values.

  3. Add the configuration.

  4. Add the Traceable policy.

  5. Add the policy to the API.

Add Traceable Platform agent endpoint

Complete the following steps to create an API, add a Traceable agent endpoint, and create resources.

  1. Login to your Akana account and navigate to APIsAdd API to create a new API. Provide the following details:

    1. Enter a name for the API.

    2. In the Endpoint field, enter the IP address or hostname of the Traceable Platform agent with port number 5442. You had installed the Traceable Platform agent as part of the prerequisite.

    3. Set the Pattern as a Proxy.

    4. Set the Visibility as private.

  2. Click on Save to save the API. The API page is displayed.

  3. Add the following two resources to the API that you added in the previous steps. Click on Add Resource.

    1. POST /ext_cap/request

    2. POST /ext_cap/response

  4. Delete the default GET resource and click on Save.

  5. Unzip the policy folder that you downloaded earlier. Two files are downloaded:

    • config.js - This file is used to configure the policy.

    • traceable_policy.js - This file is used to capture the request and response data.

Gather variable information

To proceed further with the configuration, you need to collect the value of the following four variables:

  • var tpa_req_cap_operation

  • var tpa_res_cap_operation

  • var tpa_service

  • var_tpa_interface

The value of the first two variables, tpa_req_cap_operation, and tpa_res_cap_operation, can be found by navigating to My APIsImplementationsProcesses, as shown in the two screenshots.

Click on Implementations and then on Processes to display the Processes page. You can fetch the value of the variables by hovering the cursor over the process name, as shown below.

You can fetch the value of tpa_service and tpa_interface from the Policy Manager.

Add the configuration

To add the configuration, complete the following steps:

  1. Navigate to MoreOrganizationsAll Organization.

  2. Click on Tenant.

  3. Click on the ScriptsAdd button on the tenant page.

  4. Click on the Edit button on the Script page.

  5. In the source section, add the code from config.js file that you had downloaded earlier. Make sure to update the variables' values you fetched in the previous section.

Add the policy

Add the policy to Akana after you have completed the configuration in the previous section. To add the policy, navigate to Tenant as you did in the previous section and click on Policies Add. Provide the following to create the policy and click on Save:

  • Name - Provide a name for the policy.

  • Policy category - Choose Operational Policy from the drop-down list.

  • Policy sub-type - Choose Private Operational Script Policy from the drop-down list.

  • Policy description - Give a description of the policy.

Edit the policy once you have saved the policy.

On the Script Policy page, complete the following and click on Finish:

  • In the Imports section, import the configuration that you created in the previous section.

  • In the Source section, copy and paste the code from the traceable_policy.js file that you downloaded earlier.

Finally, Activate the policy as shown below.

Add Policy to API

For Traceable policy to start collecting data, it needs to be attached to an API. Navigate to the API to which you wish to attach the policy and complete the following steps:

  1. Navigate to ImplementationsPolicies.

  2. Under Policies, click Edit and attach the policy you created in the previous section.

  3. Click on Attach and Save.

To verify a successful configuration, send data to Akana and view it in the Traceable Platform.

Was this article helpful?

What's Next