# 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](https://www.pandium.com/product-updates) 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: <https://api.pandium.io/>

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

## Authentication

To generate an API Key, navigate to the 'Settings' sidebar 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="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2F39t0JDbPSLsweQ5sYHGc%2FScreenshot%202025-08-28%20at%202.32.01%E2%80%AFPM.png?alt=media&#x26;token=72cec8a8-34de-4adb-a2bd-677eaf0b301d" alt="API Access tab in the Integration Hub"><figcaption><p>Developer Resources 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 '/v2/tenants/<tenant_id>/run?mode=init' \
--header 'X-API-KEY: <pandium api key>'
```

## Builds

In Pandium, the build object can be used to create a release.

## Create Build V2

> Create a build for an integration.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/sourcecontrol/build":{"post":{"tags":["builds"],"summary":"Create Build V2","description":"Create a build for an integration.","operationId":"create_build_v2_v2_sourcecontrol_build_post","parameters":[{"name":"mode","in":"query","required":true,"schema":{"$ref":"#/components/schemas/V2RunMode","description":"must be one of 'init' or 'normal'"},"description":"must be one of 'init' or 'normal'"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBuild","description":"build payload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unprocessable Content"}}}}},"components":{"schemas":{"V2RunMode":{"type":"string","enum":["init","normal"],"title":"V2RunMode"},"CreateBuild":{"properties":{"build_tag":{"type":"string","title":"Build Tag","description":"The tag to associate with the build"},"integration_id":{"type":"integer","title":"Integration Id","description":"The ID of the integration to build against"}},"type":"object","required":["build_tag","integration_id"],"title":"CreateBuild"},"ErrorMessage":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ErrorMessage"}}}}
```

## 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.

## Get Many Integrations

> Get all your integrations on Pandium.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/integrations":{"get":{"summary":"Get Many Integrations","description":"Get all your integrations on Pandium.","operationId":"get_many_integrations_v2_integrations_get","parameters":[{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"format is {field}__ASC or {field}__DESC","title":"Sort By"},"description":"format is {field}__ASC or {field}__DESC"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"default is 100, max is 500","default":100,"title":"Limit"},"description":"default is 100, max is 500"},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"paging support: this is the number of records to skip. Normally you want page_number*limit. default is 0","default":0,"title":"Skip"},"description":"paging support: this is the number of records to skip. Normally you want page_number*limit. default is 0"},{"name":"archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"set this to true to fetch archived integrations","default":false,"title":"Archived"},"description":"set this to true to fetch archived integrations"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/external_api_v1__v2schemas__Integration"},"title":"Response Get Many Integrations V2 Integrations Get"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"external_api_v1__v2schemas__Integration":{"properties":{"id":{"type":"integer","title":"Id"},"created_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Date"},"modified_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified Date"},"name":{"type":"string","title":"Name"},"long_name":{"type":"string","title":"Long Name"},"connectors":{"anyOf":[{"items":{"$ref":"#/components/schemas/Connector"},"type":"array"},{"type":"null"}],"title":"Connectors"},"repository_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Path"},"repository_tracking_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Tracking Branch"},"repository_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Url"},"type":{"$ref":"#/components/schemas/IntegrationType"},"categories":{"anyOf":[{"items":{"$ref":"#/components/schemas/Category"},"type":"array"},{"type":"null"}],"title":"Categories","default":[]},"tags":{"anyOf":[{"items":{"$ref":"#/components/schemas/Tag"},"type":"array"},{"type":"null"}],"title":"Tags","default":[]},"flag":{"anyOf":[{"$ref":"#/components/schemas/Flag"},{"type":"null"}]},"default_release_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Release Id"},"default_release_channel":{"anyOf":[{"$ref":"#/components/schemas/IntegrationReleaseChannel"},{"type":"null"}]}},"type":"object","required":["id","name","long_name","type"],"title":"Integration"},"Connector":{"properties":{"name":{"type":"string","title":"Name"},"isGlobal":{"type":"boolean","title":"Isglobal"}},"type":"object","required":["name","isGlobal"],"title":"Connector"},"IntegrationType":{"type":"string","enum":["Internal","External","Pandium"],"title":"IntegrationType"},"Category":{"properties":{"name":{"type":"string","title":"Name"},"id":{"type":"integer","title":"Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"order_index":{"type":"number","title":"Order Index"}},"type":"object","required":["name","id","order_index"],"title":"Category"},"Tag":{"properties":{"name":{"type":"string","title":"Name"},"id":{"type":"integer","title":"Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","id"],"title":"Tag"},"Flag":{"properties":{"name":{"type":"string","title":"Name"},"id":{"type":"integer","title":"Id"},"flag_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flag Color"}},"type":"object","required":["name","id"],"title":"Flag"},"IntegrationReleaseChannel":{"type":"string","enum":["Latest","Default"],"title":"IntegrationReleaseChannel"},"ErrorMessage":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ErrorMessage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get One Integration

> Get a single integration by its ID.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/integrations/{integration_id}":{"get":{"summary":"Get One Integration","description":"Get a single integration by its ID.","operationId":"get_one_integration_v2_integrations__integration_id__get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"integer","description":"Unique identifier for an integration","title":"Integration Id"},"description":"Unique identifier for an integration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external_api_v1__v2schemas__Integration"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"external_api_v1__v2schemas__Integration":{"properties":{"id":{"type":"integer","title":"Id"},"created_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Date"},"modified_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified Date"},"name":{"type":"string","title":"Name"},"long_name":{"type":"string","title":"Long Name"},"connectors":{"anyOf":[{"items":{"$ref":"#/components/schemas/Connector"},"type":"array"},{"type":"null"}],"title":"Connectors"},"repository_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Path"},"repository_tracking_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Tracking Branch"},"repository_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Url"},"type":{"$ref":"#/components/schemas/IntegrationType"},"categories":{"anyOf":[{"items":{"$ref":"#/components/schemas/Category"},"type":"array"},{"type":"null"}],"title":"Categories","default":[]},"tags":{"anyOf":[{"items":{"$ref":"#/components/schemas/Tag"},"type":"array"},{"type":"null"}],"title":"Tags","default":[]},"flag":{"anyOf":[{"$ref":"#/components/schemas/Flag"},{"type":"null"}]},"default_release_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Release Id"},"default_release_channel":{"anyOf":[{"$ref":"#/components/schemas/IntegrationReleaseChannel"},{"type":"null"}]}},"type":"object","required":["id","name","long_name","type"],"title":"Integration"},"Connector":{"properties":{"name":{"type":"string","title":"Name"},"isGlobal":{"type":"boolean","title":"Isglobal"}},"type":"object","required":["name","isGlobal"],"title":"Connector"},"IntegrationType":{"type":"string","enum":["Internal","External","Pandium"],"title":"IntegrationType"},"Category":{"properties":{"name":{"type":"string","title":"Name"},"id":{"type":"integer","title":"Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"order_index":{"type":"number","title":"Order Index"}},"type":"object","required":["name","id","order_index"],"title":"Category"},"Tag":{"properties":{"name":{"type":"string","title":"Name"},"id":{"type":"integer","title":"Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","id"],"title":"Tag"},"Flag":{"properties":{"name":{"type":"string","title":"Name"},"id":{"type":"integer","title":"Id"},"flag_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flag Color"}},"type":"object","required":["name","id"],"title":"Flag"},"IntegrationReleaseChannel":{"type":"string","enum":["Latest","Default"],"title":"IntegrationReleaseChannel"},"ErrorMessage":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ErrorMessage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get Integration Releases

> Get all releases for a specific integration.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/integrations/{integration_id}/releases":{"get":{"summary":"Get Integration Releases","description":"Get all releases for a specific integration.","operationId":"get_integration_releases_v2_integrations__integration_id__releases_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"integer","description":"Unique identifier for an integration","title":"Integration Id"},"description":"Unique identifier for an integration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/external_api_v1__v2schemas__IntegrationRelease"},"title":"Response Get Integration Releases V2 Integrations  Integration Id  Releases Get"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"external_api_v1__v2schemas__IntegrationRelease":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"repository_tracking_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Tracking Branch"},"run_command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Command"},"tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"},"config_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Schema"},"config_version":{"type":"string","title":"Config Version"},"metadata_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata Schema"},"created_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Date"},"modified_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified Date"}},"type":"object","required":["id","name","config_version"],"title":"IntegrationRelease"},"ErrorMessage":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ErrorMessage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get One Integration Release

> Get a single release for a specific integration.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/integrations/{integration_id}/releases/{release_id}":{"get":{"summary":"Get One Integration Release","description":"Get a single release for a specific integration.","operationId":"get_one_integration_release_v2_integrations__integration_id__releases__release_id__get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"integer","description":"Unique identifier for an integration","title":"Integration Id"},"description":"Unique identifier for an integration"},{"name":"release_id","in":"path","required":true,"schema":{"type":"integer","description":"Unique identifier for a release","title":"Release Id"},"description":"Unique identifier for a release"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external_api_v1__v2schemas__IntegrationRelease"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"external_api_v1__v2schemas__IntegrationRelease":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"repository_tracking_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Tracking Branch"},"run_command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Command"},"tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"},"config_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Schema"},"config_version":{"type":"string","title":"Config Version"},"metadata_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata Schema"},"created_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Date"},"modified_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified Date"}},"type":"object","required":["id","name","config_version"],"title":"IntegrationRelease"},"ErrorMessage":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ErrorMessage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get Default Integration Release

> Get the default release for an integration

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/integrations/{integration_id}/releases/default":{"get":{"summary":"Get Default Integration Release","description":"Get the default release for an integration","operationId":"get_default_integration_release_v2_integrations__integration_id__releases_default_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"integer","description":"Unique identifier for an integration","title":"Integration Id"},"description":"Unique identifier for an integration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external_api_v1__v2schemas__IntegrationRelease"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"external_api_v1__v2schemas__IntegrationRelease":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"repository_tracking_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Tracking Branch"},"run_command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Command"},"tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"},"config_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Schema"},"config_version":{"type":"string","title":"Config Version"},"metadata_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata Schema"},"created_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Date"},"modified_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified Date"}},"type":"object","required":["id","name","config_version"],"title":"IntegrationRelease"},"ErrorMessage":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ErrorMessage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get Latest Release

> Get the latest release for an Integration

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/integrations/{integration_id}/releases/latest":{"get":{"summary":"Get Latest Release","description":"Get the latest release for an Integration","operationId":"get_latest_release_v2_integrations__integration_id__releases_latest_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","description":"Unique identifier for an id","title":"Integration Id"},"description":"Unique identifier for an id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external_api_v1__v2schemas__IntegrationRelease"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"external_api_v1__v2schemas__IntegrationRelease":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"repository_tracking_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Tracking Branch"},"run_command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Command"},"tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"},"config_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Schema"},"config_version":{"type":"string","title":"Config Version"},"metadata_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata Schema"},"created_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Date"},"modified_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified Date"}},"type":"object","required":["id","name","config_version"],"title":"IntegrationRelease"},"ErrorMessage":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ErrorMessage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Sync By Integration Id

> Request a sync for an existing tenant based on an integration ID and a user name.\
> For this to work, the user must have installed the integration via the \[Pandium\
> In-App Marketplace]\(<https://docs.pandium.com/quick-start/marketplaces>), which creates a tenant associated with that user's username. To sync a tenant created in the Pandium Integration Hub, use the sync by tenant id endpoint.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/integrations/{integration_id}/sync":{"post":{"summary":"Sync By Integration Id","description":"Request a sync for an existing tenant based on an integration ID and a user name.\nFor this to work, the user must have installed the integration via the [Pandium\nIn-App Marketplace](https://docs.pandium.com/quick-start/marketplaces), which creates a tenant associated with that user's username. To sync a tenant created in the Pandium Integration Hub, use the sync by tenant id endpoint.","operationId":"sync_by_integration_id_v2_integrations__integration_id__sync_post","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"integer","description":"Unique identifier for an integration","title":"Integration Id"},"description":"Unique identifier for an integration"},{"name":"mode","in":"query","required":true,"schema":{"$ref":"#/components/schemas/V2RunMode","description":"must be one of 'init' or 'normal'"},"description":"must be one of 'init' or 'normal'"},{"name":"user_name","in":"query","required":true,"schema":{"type":"string","description":"must correspond to the user id sent from your system to the Pandium In-App Marketplace when the user installed this integration","title":"User Name"},"description":"must correspond to the user id sent from your system to the Pandium In-App Marketplace when the user installed this integration"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"description":"fields determined by the integration","title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trigger"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unprocessable Content"}}}}},"components":{"schemas":{"V2RunMode":{"type":"string","enum":["init","normal"],"title":"V2RunMode"},"Trigger":{"properties":{"trigger_id":{"type":"string","title":"Trigger Id"}},"type":"object","required":["trigger_id"],"title":"Trigger"},"ErrorMessage":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ErrorMessage"}}}}
```

## 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.

## Get Many Tenants

> Get all your tenants on Pandium.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/tenants":{"get":{"summary":"Get Many Tenants","description":"Get all your tenants on Pandium.","operationId":"get_many_tenants_v2_tenants_get","parameters":[{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"format is {field}__ASC or {field}__DESC","title":"Sort By"},"description":"format is {field}__ASC or {field}__DESC"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"default is 100, max is 500","default":100,"title":"Limit"},"description":"default is 100, max is 500"},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"paging support: this is the number of records to skip. Normally you want page_number*limit. default is 0","default":0,"title":"Skip"},"description":"paging support: this is the number of records to skip. Normally you want page_number*limit. default is 0"},{"name":"integration_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"filter tenants by integration","default":0,"title":"Integration Id"},"description":"filter tenants by integration"},{"name":"user_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"must correspond to a user id connected to at least one of the connected systems for a tenant","default":"","title":"User Name"},"description":"must correspond to a user id connected to at least one of the connected systems for a tenant"},{"name":"archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"set this to true to fetch archived integrations","default":false,"title":"Archived"},"description":"set this to true to fetch archived integrations"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/external_api_v1__v2schemas__Tenant"},"title":"Response Get Many Tenants V2 Tenants Get"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"external_api_v1__v2schemas__Tenant":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"},"integration_id":{"type":"integer","title":"Integration Id"},"configs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configs","default":{}},"created_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Date"},"modified_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified Date"},"paused":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Paused","default":true},"user_schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Schedule"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","default":"api"},"integration_release_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Integration Release Id"},"integration_release_channel":{"anyOf":[{"$ref":"#/components/schemas/IntegrationReleaseChannel"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/external_api_v1__v2schemas__TenantStatus-Output"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"Tenant"},"IntegrationReleaseChannel":{"type":"string","enum":["Latest","Default"],"title":"IntegrationReleaseChannel"},"external_api_v1__v2schemas__TenantStatus-Output":{"properties":{"last_run":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Last Run","default":{}},"current_run":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Current Run","default":{}},"last_successful_run":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Last Successful Run","default":{}},"dynamic_configs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dynamic Configs","default":{}},"auth":{"anyOf":[{"$ref":"#/components/schemas/TenantAuthStatus"},{"type":"null"}],"default":{}}},"type":"object","title":"TenantStatus"},"TenantAuthStatus":{"properties":{"connected":{"type":"boolean","title":"Connected","default":false},"connectors":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConnectorStatus"},"type":"array"},{"type":"null"}],"title":"Connectors","default":[]}},"type":"object","title":"TenantAuthStatus"},"ConnectorStatus":{"properties":{"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"last_change":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Change"}},"type":"object","required":["name","status"],"title":"ConnectorStatus"},"ErrorMessage":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ErrorMessage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Sync By Tenant Id

> Request a sync when the tenant id is known.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/tenants/{tenant_id}/sync":{"post":{"tags":["Tenants"],"summary":"Sync By Tenant Id","description":"Request a sync when the tenant id is known.","operationId":"sync_by_tenant_id_v2_tenants__tenant_id__sync_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","description":"Unique identifier for a tenant","title":"Tenant Id"},"description":"Unique identifier for a tenant"},{"name":"mode","in":"query","required":true,"schema":{"$ref":"#/components/schemas/V2RunMode","description":"must be one of 'init' or 'normal'"},"description":"must be one of 'init' or 'normal'"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"description":"fields determined by the integration","title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trigger"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"V2RunMode":{"type":"string","enum":["init","normal"],"title":"V2RunMode"},"Trigger":{"properties":{"trigger_id":{"type":"string","title":"Trigger Id"}},"type":"object","required":["trigger_id"],"title":"Trigger"},"ErrorMessage":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ErrorMessage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

{% 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 %}

## Delete Tenant

> Archive a tenant.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/tenants/{tenant_id}":{"delete":{"summary":"Delete Tenant","description":"Archive a tenant.","operationId":"delete_tenant_v2_tenants__tenant_id__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","description":"Unique identifier for a tenant","title":"Tenant Id"},"description":"Unique identifier for a tenant"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Tenant V2 Tenants  Tenant Id  Delete"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ErrorMessage":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ErrorMessage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

{% 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 %}

## Create One

> Create a new, unconnected tenant. The tenant will be paused.\
> If no schedule or release is provided, integration defaults will apply.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/tenants":{"post":{"summary":"Create One","description":"Create a new, unconnected tenant. The tenant will be paused.\nIf no schedule or release is provided, integration defaults will apply.","operationId":"create_one_v2_tenants_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTenant"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/external_api_v1__v2schemas__Tenant"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CreateTenant":{"properties":{"name":{"type":"string","title":"Name","description":"Lowercase alphanumeric string; '-' is allowed but not at the start or end of the string"},"integration_id":{"type":"integer","title":"Integration Id"},"user_schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Schedule","description":"Must be a valid cron string"},"integration_release_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Integration Release Id","description":"You may pass in an integration release id OR a channel"},"integration_release_channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Release Channel","description":"You may pass in an integration release id OR a channel"},"configs":{"additionalProperties":true,"type":"object","title":"Configs","description":"Will be validated against the tenant's integration release config schema"}},"type":"object","required":["name","integration_id"],"title":"CreateTenant"},"external_api_v1__v2schemas__Tenant":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"},"integration_id":{"type":"integer","title":"Integration Id"},"configs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configs","default":{}},"created_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Date"},"modified_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified Date"},"paused":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Paused","default":true},"user_schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Schedule"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","default":"api"},"integration_release_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Integration Release Id"},"integration_release_channel":{"anyOf":[{"$ref":"#/components/schemas/IntegrationReleaseChannel"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/external_api_v1__v2schemas__TenantStatus-Output"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"Tenant"},"IntegrationReleaseChannel":{"type":"string","enum":["Latest","Default"],"title":"IntegrationReleaseChannel"},"external_api_v1__v2schemas__TenantStatus-Output":{"properties":{"last_run":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Last Run","default":{}},"current_run":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Current Run","default":{}},"last_successful_run":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Last Successful Run","default":{}},"dynamic_configs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dynamic Configs","default":{}},"auth":{"anyOf":[{"$ref":"#/components/schemas/TenantAuthStatus"},{"type":"null"}],"default":{}}},"type":"object","title":"TenantStatus"},"TenantAuthStatus":{"properties":{"connected":{"type":"boolean","title":"Connected","default":false},"connectors":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConnectorStatus"},"type":"array"},{"type":"null"}],"title":"Connectors","default":[]}},"type":"object","title":"TenantAuthStatus"},"ConnectorStatus":{"properties":{"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"last_change":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Change"}},"type":"object","required":["name","status"],"title":"ConnectorStatus"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get Metadata

> Get the metadata for a tenant.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/tenants/{tenant_id}/metadata":{"get":{"summary":"Get Metadata","description":"Get the metadata for a tenant.","operationId":"get_metadata_v2_tenants__tenant_id__metadata_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","description":"Unique identifier for a tenant","title":"Tenant Id"},"description":"Unique identifier for a tenant"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantMetadata"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"TenantMetadata":{"properties":{"tenant_id":{"type":"integer","title":"Tenant Id"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data","default":{}},"created_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Date"},"modified_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified Date"}},"type":"object","required":["tenant_id"],"title":"TenantMetadata"},"ErrorMessage":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ErrorMessage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Patch Metadata

> Update metadata for a tenant. Metadata is validated against the tenant's\
> integration release metadata schema.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/tenants/{tenant_id}/metadata":{"patch":{"summary":"Patch Metadata","description":"Update metadata for a tenant. Metadata is validated against the tenant's\nintegration release metadata schema.","operationId":"patch_metadata_v2_tenants__tenant_id__metadata_patch","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","description":"Unique identifier for a tenant","title":"Tenant Id"},"description":"Unique identifier for a tenant"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantMetadata"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"TenantMetadata":{"properties":{"tenant_id":{"type":"integer","title":"Tenant Id"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data","default":{}},"created_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Date"},"modified_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified Date"}},"type":"object","required":["tenant_id"],"title":"TenantMetadata"},"ErrorMessage":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ErrorMessage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## 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.

## Proxy Connector Call Rest

> Proxy a synchronous connector call.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/tenants/{tenant_id}/connectors/{connector_name}/call":{"post":{"summary":"Proxy Connector Call Rest","description":"Proxy a synchronous connector call.","operationId":"proxy_connector_call_rest_v2_tenants__tenant_id__connectors__connector_name__call_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","description":"Unique identifier for a tenant","title":"Tenant Id"},"description":"Unique identifier for a tenant"},{"name":"connector_name","in":"path","required":true,"schema":{"type":"string","description":"Name of the tenant's authenticated connector","title":"Connector Name"},"description":"Name of the tenant's authenticated connector"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyRestRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyInternalError"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyExternalError"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ProxyRestRequestBody":{"properties":{"headers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Headers","description":"Headers needed for the proxied request"},"method":{"type":"string","title":"Method","description":"HTTP Method"},"query_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Query Params","description":"Query params needed for the proxied request"},"target_url":{"type":"string","title":"Target Url","description":"Endpoint for the proxied request"},"body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Body","description":"Body of the proxied request"}},"type":"object","title":"ProxyRestRequestBody"},"ProxyResponse":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"ProxyResponse"},"ProxyInternalError":{"properties":{"detail":{"type":"string","title":"Detail","description":"Description of the internal (Pandium) error."}},"type":"object","title":"ProxyInternalError"},"ProxyExternalError":{"properties":{"detail":{"type":"string","title":"Detail","description":"String-ified object containing the error response from the external service under the \"data\" key. Status code will reflect the status returned from the external service."}},"type":"object","title":"ProxyExternalError"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Proxy Connector Call Soap

> Proxy a synchronous connector call to a SOAP endpoint.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/tenants/{tenant_id}/connectors/{connector_name}/soap":{"post":{"summary":"Proxy Connector Call Soap","description":"Proxy a synchronous connector call to a SOAP endpoint.","operationId":"proxy_connector_call_soap_v2_tenants__tenant_id__connectors__connector_name__soap_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","description":"Unique identifier for a tenant","title":"Tenant Id"},"description":"Unique identifier for a tenant"},{"name":"connector_name","in":"path","required":true,"schema":{"type":"string","description":"Name of the tenant's authenticated connector","title":"Connector Name"},"description":"Name of the tenant's authenticated connector"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyXmlRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyInternalError"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyExternalError"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ProxyXmlRequestBody":{"properties":{"headers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Headers","description":"Headers needed for the proxied request"},"method":{"type":"string","title":"Method","description":"HTTP Method"},"query_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Query Params","description":"Query params needed for the proxied request"},"target_url":{"type":"string","title":"Target Url","description":"Endpoint for the proxied request"},"data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data","description":"XML data for the proxied request. Authentication will be handled by Pandium and doesn't need to be included in the request."}},"type":"object","title":"ProxyXmlRequestBody"},"ProxyResponse":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"ProxyResponse"},"ProxyInternalError":{"properties":{"detail":{"type":"string","title":"Detail","description":"Description of the internal (Pandium) error."}},"type":"object","title":"ProxyInternalError"},"ProxyExternalError":{"properties":{"detail":{"type":"string","title":"Detail","description":"String-ified object containing the error response from the external service under the \"data\" key. Status code will reflect the status returned from the external service."}},"type":"object","title":"ProxyExternalError"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Proxy Connector Call Xml

> Proxy a synchronous connector call to an XML endpoint.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/tenants/{tenant_id}/connectors/{connector_name}/xml":{"post":{"summary":"Proxy Connector Call Xml","description":"Proxy a synchronous connector call to an XML endpoint.","operationId":"proxy_connector_call_xml_v2_tenants__tenant_id__connectors__connector_name__xml_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","description":"Unique identifier for a tenant","title":"Tenant Id"},"description":"Unique identifier for a tenant"},{"name":"connector_name","in":"path","required":true,"schema":{"type":"string","description":"Name of the tenant's authenticated connector","title":"Connector Name"},"description":"Name of the tenant's authenticated connector"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyXmlRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyInternalError"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyExternalError"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ProxyXmlRequestBody":{"properties":{"headers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Headers","description":"Headers needed for the proxied request"},"method":{"type":"string","title":"Method","description":"HTTP Method"},"query_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Query Params","description":"Query params needed for the proxied request"},"target_url":{"type":"string","title":"Target Url","description":"Endpoint for the proxied request"},"data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data","description":"XML data for the proxied request. Authentication will be handled by Pandium and doesn't need to be included in the request."}},"type":"object","title":"ProxyXmlRequestBody"},"ProxyResponse":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"ProxyResponse"},"ProxyInternalError":{"properties":{"detail":{"type":"string","title":"Detail","description":"Description of the internal (Pandium) error."}},"type":"object","title":"ProxyInternalError"},"ProxyExternalError":{"properties":{"detail":{"type":"string","title":"Detail","description":"String-ified object containing the error response from the external service under the \"data\" key. Status code will reflect the status returned from the external service."}},"type":"object","title":"ProxyExternalError"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## 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.

## Get Run Status From Trigger

> Returns status information for a run associated with the provided trigger id, \_if that run exists\_. Triggers are are debounced, so run status information may not be immediately available. If no status information is yet available, this endpoint will return a 404.

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v2/runs/triggers/{trigger_id}/status":{"get":{"tags":["Runs"],"summary":"Get Run Status From Trigger","description":"Returns status information for a run associated with the provided trigger id, _if that run exists_. Triggers are are debounced, so run status information may not be immediately available. If no status information is yet available, this endpoint will return a 404.","operationId":"get_run_status_from_trigger_v2_runs_triggers__trigger_id__status_get","parameters":[{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","description":"Returned from Pandium after a sync request in the response payload","title":"Trigger Id"},"description":"Returned from Pandium after a sync request in the response payload"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerStatus"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"TriggerStatus":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"TriggerStatus"},"ErrorMessage":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ErrorMessage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pandium.com/reference/pandium-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
