# Pandium API

## Introduction

Welcome to the Pandium API! Our API enables your team flexibility in managing your integrations hosted on Pandium. The Pandium API uses standard [REST](https://en.wikipedia.org/wiki/REST) conventions and standard HTTP methods and response codes for a simple and intuitive workflow.

With the Pandium API, native Pandium resources (integrations, tenants, and runs) are accessible via a generated API key, and allow for triggering runs externally - no login to the Pandium Integration Hub needed. As we expand the Pandium API, check back for additional functionality, or stay up to date on our [product updates](/content/product-updates/index.html) page.

#### Base URL

Below you'll find the base URLs used when working with the Pandium API:

For using the Pandium API with a Production Pandium account: <http://api.pandium.io/>

For using the Pandium API with a Sandbox Pandium account: <http://api.sandbox.pandium.com/>

## Authentication

To generate an API Key, navigate to the 'Settings' resource in the Pandium Integration Hub, then head over to the "API Access" tab. Here, you can give your key a name and generate it.

API Keys are ***only viewable at creation***, so store and keep your key(s) secure.

<figure><img src="/files/FTvw7XWZo2S4keWoWXAd" alt=""><figcaption><p>API Access tab in the Integration Hub</p></figcaption></figure>

To use the generated key, attach it to your request under an `x-api-key` header, like so:

```
curl --location --request POST 'x`tenants/<tenant_id>/run?mode=init' \
--header 'X-API-KEY: <pandium api key>'
```

## Integrations

In Pandium, the integration object can be thought of as the primary record for any application on the platform. This record holds the necessary components to run syncs between systems, and the content that a given application utilizes for marketplace views.

Integration IDs can be found in the Integration Hub on the Integration Detail page.

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/integrations" method="get" expanded="true" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/integrations/{integration_id}" method="get" expanded="true" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/integrations/{integration_id}/releases" method="get" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/integrations/{integration_id}/releases/{release_id}" method="get" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/integrations/{integration_id}/releases/default" method="get" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/integrations/{integration_id}/releases/latest" method="get" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/integrations/{integration_id}/sync" method="post" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

## Tenants

In Pandium, a tenant is a single instance of an integration, associated with a single set of user credentials for each connected system.

Whenever a user installs an integration, a tenant is created within Pandium and is automatically given a tenant ID, which is viewable in the Integration Hub directly on the Tenant Detail page.

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/tenants" method="get" expanded="true" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/tenants/{tenant_id}/sync" method="post" expanded="true" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/tenants/{tenant_id}" method="patch" expanded="true" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/tenants/{tenant_id}" method="delete" expanded="true" fullWidth="false" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/tenants/{tenant_id}/release" method="get" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/tenants" method="post" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

## Proxy Endpoints

An endpoint that allows a user to make a call to an external API (REST, SOAP, or XML) on behalf of a tenant.

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/tenants/{tenant_id}/connectors/{connector_name}/call" method="post" expanded="true" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/tenants/{tenant_id}/connectors/{connector_name}/soap" method="post" expanded="true" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/tenants/{tenant_id}/connectors/{connector_name}/xml" method="post" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}

## Runs

A run is a specific record of a sync: a single execution of integration code using the credentials provided by a tenant of that integration, at a specific point in time. The runs endpoints are by nature read-only.

More run information can be seen by viewing the logging information from within the Integration Hub.

{% openapi src="<https://api.sandbox.pandium.com/v2/openapi.json>" path="/v2/runs/triggers/{trigger_id}/status" method="get" expanded="true" %}
<https://api.sandbox.pandium.com/v2/openapi.json>
{% endopenapi %}
