---
title: Adding an input script
description: To add an input script to the Akana API gateway:
component: pingintelligence
version: 5.2
page_id: pingintelligence:pingintelligence_integrations:pingintelligence_akana_input_script
canonical_url: https://docs.pingidentity.com/pingintelligence/5.2/pingintelligence_integrations/pingintelligence_akana_input_script.html
revdate: April 3, 2024
section_ids:
  about-this-task: About this task
  steps: Steps
  example: Example:
---

# Adding an input script

## About this task

To add an input script to the Akana API gateway:

## Steps

1. Sign on to **Akana Policy Manager**, navigate to **Tenant**, and click **Scripts**.

2. Click **Add Script**.

3. Enter **Script Name** and **Script Description**, and click**Next**.

   ![A screenshot of the Specify Script Details page in Akana Policy Manager.](../_images/rjc1579953577408.png)

4. Select **JavaScript** for **Language** from the list.

5. Copy the contents of the `config.js` script provided by PingIntelligence and paste them into the **Source**.

   ![A screenshot of the Script Editor page in Akana Policy Manager.](../_images/wmo1579953724862.png)

6. Paste the values of **Service\_QName**, **Interface\_Name**, and **Operation\_Name** that were copied in [Capturing ASE details](pingintelligence_akana_capture.html).

   This needs to be done for both primary and secondary ASE nodes. The following table lists the variables in `config.js` that need to be populated.

   | Variable                              | Description                                                    |
   | ------------------------------------- | -------------------------------------------------------------- |
   | *ase\_token*                          | Variable for the ASE sideband authentication token.            |
   | *primary\_ase\_service*               | Service QName for primary ASE.                                 |
   | *primary\_ase\_interface*             | Interface Name for primary ASE.                                |
   | *primary\_ase\_request\_operation*    | Operation Name for posting Request Metadata in primary ASE.    |
   | *primary\_ase\_response\_operation*   | Operation Name for posting Response Metadata in primary ASE.   |
   | *secondry\_ase\_service*              | Service QName for secondary ASE.                               |
   | *secondary\_ase\_interface*           | Interface Name for secondary ASE.                              |
   | *secondary\_ase\_request\_operation*  | Operation Name for posting Request Metadata in secondary ASE.  |
   | *secondary\_ase\_response\_operation* | Operation Name for posting Response Metadata in secondary ASE. |

   ### Example:

   Below is a sample substitution snippet:

   ```
   var ase_token = "ASE-Token-123";
   /Primary ASE Configuration/
   var primary_ase_service = "{pi-as-ase-primary_0.0.0}svc_314492f1-ecdc-4184-93a0-57ee2258154b.smshargi.sandbox";
   var primary_ase_interface = "{pi-as-ase-primary_0.0.0}pi-as-ase-primary_PortType_0";
   var primary_ase_request_operation = "postRequestMetadata";
   var primary_ase_response_operation = "postResponseMetadata";
   /**/
   /Secondary ASE Configuration/
   var secondry_ase_service = "{pi-as-ase-primary_0.0.0}svc_314492f1-ecdc-4184-93a0-57ee2258154b.smshargi.sandbox";
   var secondary_ase_interface = "{pi-as-ase-primary_0.0.0}pi-as-ase-primary_PortType_0";
   var secondary_ase_request_operation = "postRequestMetadata";
   var secondary_ase_response_operation = "postResponseMetadata";
   ```

7. Click **Finish**, and then click **Close**.
