Skip to content

πŸ”ƒ API

This section provides a comprehensive overview of the routes, types, and error codes for the features in the system, ensuring developers understand how to interact with the API and handle potent.

 type CredentialInfo = {
    appName: string;
    fields: CredentialInfoField[];
    desc: string;
};

type CredentialInfoField = {
    name: string;
    /**
     * The type of the field. Can be one of the following:
     *
     * 1. HTML input types: text, password, number etc.
     * (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input)
     * (except 'checkbox' and 'boolean')
     * 2. 'select' for a selectbox (options must be specified).
     * 3. 'textarea' for fields that can have multiple lines of text.
     *
     * If not specified, defaults to 'text'
     */
    type?: string;
    desc?: string;
    label?: string;
    isOptional?: boolean;
    /**
     * If type is 'select', this is the list of options
     */
    options?: { value: string; label: string }[];
    /**
     * If field should be shown only when a certain condition is met, specify it here.
     */
    showWhen?: {
    	key: string;
    	value: string | number | boolean;
    };
    /**
     * If field is not dependent on another field and will be displayed after a certain event occurs
     */
    show?: boolean;
};

If the request is successful, it returns a 200 status code or other HTTP status codes starting with 2. In case of an error, in addition to standard HTTP status codes, custom error codes will be returned.

Code

Name

Description

1

INVALID PARAMETER

The request parameters were not sent as expected.

201

AUTOMATION NOT DEPLOYED

The published version of the automation to be executed was not found.

204

AUTOMATION NOT FOUND

No automation found for the submitted data.

209

CONNECTION NOT FOUND

No connection record found for the user.

210

INVALID NODE TYPE

The automation cannot be manually executed.

211

TRIGGER NOT FOUND

A request for manual execution of the automation was made, but no manual trigger was found in the automation.

216

MISSING PROJECT INTEGRATION

Integration records of some applications used in automation have not been added.

217

IPAAS END USER NOT CONNECTED

No connection found for the user for some components used in the automation.

218

TRIGGER REGISTRATION FAILED

An error occurred while re-registering to the trigger.

222

CONNECTION ALREADY EXISTS

The user already has a connection for this application.

600

INTEGRATION NOT FOUND

No application record found in the project's settings page.

900

INVALID TOKEN

The token used in the request is invalid or not related to the project.

901

PROJECT NOT FOUND

No project record found.

1000

IPAAS USER NOT FOUND

No record found for the user.

Get Connection Information for Non-OAuth Applications

Section titled Get Connection Information for Non-OAuth Applications
GET api/v1/ipaas/projects/:projectId/apps/:appKey/credential-info

Path Parameters

Name

Type

Description

projectId*

String

appKey*

String

200: OK
CredentialInfo
GET api/v1/ipaas/projects/:projectId/users/:userId/connections/status

Path Parameters

Name

Type

Description

projectId*

String

userId*

String

Query Parameters

Name

Type

Description

appKeys*

String

If there is more than 1 value, separate them with commas.

200: OK
Record<string, 'connected' | 'not-connected' | 'invalid'>

/**
 * Example;
 * { "google-calendar": "connected", "cubicl": "not-connected" }
 */

Get User’s Application Connection

Section titled Get User’s Application Connection
GET api/v1/ipaas/users/:userId/connections/:appKey

Path Parameters

Name

Value

Description

userId*

String

appKey*

String

Response

200: OK
ConnectionDetails
POST api/v1/ipaas/users/:userId/connections/import

Path Parameters

Name

Type

Description

userId*

String

Body

Name

Type

Description

appKey*

String

scopes*

String[]

Can be empty array

accessToken*

String

refreshToken

String

If your token cannot be renewed, do not send it

expiresAt

Number (miliseconds)

If your token is perpetual, do not send it.

oauth1Token

String

Should be sent if the application uses the OAuth1 structure.

accessTokenSecret

String

Should be sent if the application uses the OAuth1 structure.

200: OK
// No content
POST api/v1/ipaas/projects/:projectId/users/:userId/connections/:appKey

Path Parameters

Name

Type

Description

projectId*

String

userId*

String

appKey*

String

Body

Name

Type

Description

connectionFields

Record<string, any>

It should be sent if the app type is not "oauth".

200: OK
string | null
// If it is an OAuth application, a connection link is returned.
// For other applications, no response is returned.
POST api/v1/ipaas/automations/:automationId/run

Path Parameters

Name

Type

Description

automationId*

String

Body

Name

Type

Description

userId*

String

data*

Record<string, any>

development

String

"true" or empty

200: OK
{
    status: 'completed' | 'paused' | 'error' | 'canceled';
    message?: string;
    result?: any
}

Register to Automation Trigger

Section titled Register to Automation Trigger
POST api/v1/ipaas/automations/:automationId/register

Path Parameters

Name

Type

Description

automationId*

String

Body

Name

Type

Description

userId*

String

triggerInputs*

Record<string, any>

200: OK
// Trigger Id
String

Unregister from Automation Trigger

Section titled Unregister from Automation Trigger
POST api/v1/ipaas/automations/:automationId/unregister

Path Parameters

Name

Type

Description

automationId*

String

Body

Name

Type

Description

userId*

String

triggerId*

String

200: OK
// No content
DELETE api/v1/ipaas/users/:userId/connections/:appKey

Path Parameters

Name

Type

Description

userId*

String

appKey*

String

200: OK
// No content