Connection APIs

POST - Create connections

Allows you to create a connection.

URL
../apis/v1/rest/projects/{projectName}/configurations/connections
Parameters
  • {projectName} - Name of the project.
Request headers
Content-Type: application/json
X-INSTANCE-API-KEY: <generated API key>
Request body
{
            "name": "SMTP_1",
            "description": ""
            "deployAnywhere": false,
            "data": {
                "cn_host": "smtp.pepipost.com",
                "cn_port": "25",
                "cn_userName": "sabcpepipost",
                "cn_password": "",
                "cn_tls": "none",
                "cn_truststore": null,
                "cx_from": "sabc@pepisandbox.com",
                "cx_to": null,
                "cx_cc": null,
                "cn_connectionTimeout": "30000",
                "cn_readTimeout": "30000",
                "cn_writeTimeout": "30000",
                "name": "stage00"
            },
            "sourceMetadata": {
                "connectorID": "<connector_id>",
                "providerName": "WmSMTPProvider",
                "version": "1",
                "connectionType": "<connection_type>"
            }
        }
Response

If the request is successful, the HTTP 201 Created status response code is displayed.

PUT - Update connections

Allows you to update a connection.

URL
../apis/v1/rest/projects/{projectName}/configurations/connections/{connectionName}
Parameters
  • {projectName} - Name of the project.
  • {connectionName} - Name of the connection.
Request headers
Content-Type: application/json
X-INSTANCE-API-KEY: <generated API key>
Request body
{
            "name": "SMTP_1",
            "description": ""
            "deployAnywhere": false,
            "data": {
                "cn_host": "smtp.pepipost.com",
                "cn_port": "25",
                "cn_userName": "sabcpepipost",
                "cn_password": "",
                "cn_tls": "none",
                "cn_truststore": null,
                "cx_from": "sabc@pepisandbox.com",
                "cx_to": null,
                "cx_cc": null,
                "cn_connectionTimeout": "30000",
                "cn_readTimeout": "30000",
                "cn_writeTimeout": "30000",
                "name": "stage00"
            },
            "sourceMetadata": {
                "connectorID": "<connector_id>",
                "providerName": "WmSMTPProvider",
                "version": "1",
                "connectionType": "<connection_type>"
            }
        }
Response

If the request is successful, the HTTP 200 OK status response code is displayed.

DELETE - Delete connections

Allows you to delete a connection.

URL
../apis/v1/rest/projects/{projectName}/configurations/connections/{connectionName}?connectionType=&connectorID=&providerName=&force=false
Parameters
  • {projectName} - Name of the project.
  • {connectionName} - Name of the connection.
  • connectorID - Unique identification of the connector.
  • providerName - Name of the connection provider.
  • Optional: force - Specify true if you want to delete the connection even if it is in use. The default value is false.
Request headers
Content-Type: application/json
X-INSTANCE-API-KEY: <generated API key>
Request body
None
Response
  • If the request is successful, the HTTP 200 OK status response code is displayed.
  • If force is set to false and the connection is in use, the API will throw error with the usage details of the connection.

    {
      "error": {
        "description": "Delete the connection from the associated Workflow(s), Trigger(s) and Flowservice(s).",
        "details": {
          "dependents": {
            "workflows": [<list_of_workflows>],
            "triggers": [<list_of_triggers>],
            "flowservices": [<list_of_flowservices>]
          }
        },
        "errorSource": {
          "errorCode": "API_000",
          "requestID": "5e3efb64cac25aa788d2884346d37319"
        }
      }
    }

GET - Get connections

Allows you to retrieve the details of a connection.

URL
../apis/v1/rest/projects/{projectName}/configurations/connections/{connectionName}?connectionType=&connectorID=&providerName=
Parameters
  • {projectName} - Name of the project.
  • {connectionName} - Name of the connection.
  • connectorID - Unique identification of the connector.
  • providerName - Name of the connection provider.
Request headers
Content-Type: application/json
X-INSTANCE-API-KEY: <generated API key>
Request body
None
Response
{
            "name": "SMTP_1",
            "description": "",
            "state": "disabled",
            "deployAnywhere": false,
            "data": {
                "cn_host": "smtp.pepipost.com",
                "cn_port": "25",
                "cn_userName": "abcpepipost",
                "cn_password": "",
                "cn_tls": "none",
                "cn_truststore": null,
                "cx_from": "abc@pepisandbox.com",
                "cx_to": null,
                "cx_cc": null,
                "cn_connectionTimeout": "30000",
                "cn_readTimeout": "30000",
                "cn_writeTimeout": "30000",
                "name": "stage00"
            },
            "sourceMetadata": {
                "connectorID": "<connector_id>",
                "providerName": "WmSMTPProvider",
                "version": "1",
                "connectionType": "<connection_type>"
            }
        }

GET - List connections

Allows you to retrieve the details of all connections.

URL
../apis/v1/rest/projects/{projectName}/configurations/connections
Parameters
  • {projectName} - Name of the project.
Request headers
Content-Type: application/json
X-INSTANCE-API-KEY: <generated API key>
Request body
None
Response
[
  {
    "name": "FTPS_2",
    "description": "",
    "state": "disabled",
    "deployAnywhere": false,
    "data": {
      "cn_host": "demo.wftpserver.com",
      "cn_port": "21",
      "cn_user": "demo",
      "cn_password": "",
      "cn_timeout": "3601",
      "cn_advancedFTPOptions": "false",
      "ssl_secureData": null,
      "ssl_keystoreAlias": null,
      "ssl_keyalias": null,
      "ssl_truststoreAlias": null,
      "name": "stage00"
    },
    "sourceMetadata": {
      "connectorID": "<connector_id>",
      "providerName": "WmFTPProvider",
      "version": "1",
      "connectionType": "<connection_type>"
    }
  },
  {
    "name": "SMTP_1",
    "description": "",
    "state": "disabled",
    "deployAnywhere": false,
    "data": {
      "cn_host": "smtp.pepipost.com",
      "cn_port": "25",
      "cn_userName": "sonipepipost",
      "cn_password": "",
      "cn_tls": "none",
      "cn_truststore": null,
      "cx_from": "abc@pepisandbox.com",
      "cx_to": null,
      "cx_cc": null,
      "cn_connectionTimeout": "30000",
      "cn_readTimeout": "30000",
      "cn_writeTimeout": "30000",
      "name": "stage00"
    },
    "sourceMetadata": {
      "connectorID": "<connector_id>",
      "providerName": "WmSMTPProvider",
      "version": "1",
      "connectionType": "<connection_type>"
    }
  }
]