Connection Management API

Version 23.4.8843


Connection Management API


The Connection Management API supports the following actions:

The following sections describe each of these actions.

List All Connections

The following command returns a list of all connections within the CData Sync application:

GET http://MyDomain.com:8019/api.rsc/connections(Name)

Query Parameter

Name Description
Name Specifies the name of the connection to retrieve.

Create a Connection

The following command creates a new connection in the Sync application:

POST http://MyDomain.com:8019/api.rsc/connections

Body Parameters

Name Description
Name (required) Specifies the name of the connection to create.
ProviderName Specifies the name of the connector to which to connect (for example, the CData Salesforce connector).
ConnectionString Specifies the connection string for the data connection.

Example

{ 
  "Name": "MyNewConnection", 
  "ProviderName": "CData Salesforce",
  "ConnectionString": "user=MyUser;Password=MyPassword;SecurityToken=MyToken"
}

Modify a Connection

The following command modifies an existing connection:

PUT http://MyDomain.com:8019/api.rsc/connections(Name)

Note: You cannot modify a connection that is in use in a running job.

Query Parameter

Name Description
Name (required) Specifies the name of the connection to modify.

Body Parameters

Name Description
ConnectionString Specifies the connection string for the data connection.

Example

{ 
  "ConnectionString": "user=MyUser;Password=MyPassword;SecurityToken=MyNewToken"
}

Delete a Connection

The following command removes a connection from the Sync application:

DELETE http://MyDomain.com:8019/api.rsc/connections(Name)

Note: You cannot delete a connection that is in use in a running job.

Query Parameter

Name Description
Name Specifies the name of the connection to delete.

Test a Connection

The following command tests a previously created connection.

POST http://MyDomain.com:8019/api.rsc/testConnection

Note: The response is either a success message or an error message.

Body Parameters

Name Description
ConnectionName Specifies the name of the connection to test.

Example

{ 
  "ConnectionName": "MyConnection"
}

List Tables

The following command retrieves a list of available tables for a connection:

POST http://MyDomain.com:8019/api.rsc/getConnectionTables

Body Parameters

Name Description
ConnectionName Specifies the name of the connection from which to retrieve tables.
TableOrView Specifies the types (tables or views) that should be listed. Values for this parameter are TABLES, VIEWS, or ALL.
Schema Restricts tables to a specific schema.
IncludeSchema Specifies whether to include the schema with the table name (in the form [Schema].[Table])
IncludeCatalog Specifies whether to include a catalog with the table name (in the form [Catalog].[Schema].[Table])

Example

{ 
  "ConnectionName": "MyConnection",
  "TableOrView": "ALL",
  "IncludeSchema": "True"
}

List Columns

The following command retrieves a list of available columns for a table:

POST http://MyDomain.com:8019/api.rsc/getConnectionTableColumns

Body Parameters

Name Description
ConnectionName Specifies the name of the connection from which to retrieve tables.
Table Specifies the name of the table from which to retrieve columns.

Example

{ 
  "ConnectionName": "MyConnection",
  "Table": "Accounts"
}