> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/g/gainsight-px.md).

# Gainsight PX

Gainsight PX is a product analytics and in-app engagement platform. OctoXLabs reads the users tracked in PX and adds them to the user inventory.

## Use cases

* List all users tracked in Gainsight PX.

```
Adapters = gainsight-px
```

* Find PX users that are not in Active Directory.

```
Adapters = gainsight-px AND NOT Adapters = active-directory
```

## Before you begin

### Network

| Source              | Destination                                    | Port | Protocol |
| ------------------- | ---------------------------------------------- | ---- | -------- |
| OctoXLabs connector | Gainsight PX API (default `api.aptrinsic.com`) | 443  | HTTPS    |

### Required permissions

| Scope or role | Permission                              | Needed for |
| ------------- | --------------------------------------- | ---------- |
| API key       | Read (allows GET calls to read PX data) | Users      |

## Create credentials in Gainsight PX

{% stepper %}
{% step %}

### Open the API keys page

Go to **Administration** > **REST API**.
{% endstep %}

{% step %}

### Create a key

1. Click **New API Key**.
2. Enter a **Name** and a **Description**.
3. Under **Permissions**, select **Read**.
4. Click **Generate** and copy the key.
   {% endstep %}
   {% endstepper %}

## Connection parameters

| Parameter | Required | Type             | Default             | Description                        |
| --------- | -------- | ---------------- | ------------------- | ---------------------------------- |
| Domain    | No       | Text             | `api.aptrinsic.com` | API host.                          |
| Api token | Yes      | Text (sensitive) | None                | The API key.                       |
| Timeout   | No       | Integer          | 30                  | Seconds to wait for API responses. |

## Troubleshooting

| Error message                                                  | Cause                                    | Fix                                        |
| -------------------------------------------------------------- | ---------------------------------------- | ------------------------------------------ |
| `Failed to fetch users: <status>`                              | The user list returned a non-200 status. | Check the API key and its Read permission. |
| `Invalid JSON response while fetching users (status=<status>)` | The response was not JSON.               | Check the domain value.                    |
| `Request failed after 5 retries for url <url>`                 | The API kept answering HTTP 429.         | Wait and retry.                            |

## Change history

{% hint style="info" %}
Available starting from version 5.6.11.
{% endhint %}
