Setting Up a WordPress REST Connection Manager
The REST Connection Manager is an SSIS connection manager that can be used to establish connections and facilitate data integration with REST based APIs and services such as WordPress, among many more.
Integration for WordPress is enabled by the following two components:
To add a new connection, right-click the Connection Manager area in your Visual Studio project, and choose "New Connection..." from the context menu. You will be prompted the "Add SSIS Connection Manager" window. Select the "REST (KingswaySoft)" item to add a new REST Connection Manager.
The REST Connection Manager contains 2 pages of configuration.
- General
- Advanced Settings
General Page
The General page allows you to specify connection properties and login credentials for WordPress REST service:
- Service Name
-
The REST service that will be connected to.
- General Settings
-
- Base URL
-
The URL of the WordPress server that will be connected to.
- Authentication
-
- Authentication Mode
-
The Authentication Mode option allows you to specify how to authenticate with the WordPress server. Available options are:
- Basic
- Application Password
- JWT
- OAuth 1
- WooCommerce - Basic
- WooCommerce - OAuth
- Username
-
The username to use when authenticating to WordPress. This option is available when the Authentication Mode option is set to Basic, Application Password or JWT.
- Password
-
The password to use when authenticating to WordPress. This option is available when the Authentication Mode option is set to Basic or JWT.
- Application Password
-
The application password to use when authenticating to WordPress. This option is available when the Authentication Mode option is set to Application Password.
- Generate New OAuth Tokens...
-
The Generate New OAuth Tokens... button launches the Generate New OAuth Tokens dialog. This dialog will take you through the OAuth process to generate tokens. This button is available when the Authentication Mode option is set to OAuth 1.
- Consumer Key
-
This property is read-only when the Authentication Mode is set to OAuth 1, and can only be set via the Generate New OAuth Tokens dialog. When the Authentication Mode is set to WooCommerce - Basic or WooCommerce - OAuth, this property is configurable and represents the consumer key generated by WooCommerce.
- Consumer Secret
-
This property is read-only when the Authentication Mode is set to OAuth 1, and can only be set via the Generate New OAuth Tokens dialog. When the Authentication Mode is set to WooCommerce - Basic or WooCommerce - OAuth, this property is configurable and represents the consumer secret generated by WooCommerce.
- Send in Query String
-
This option is available for WooCommerce - Basic Authentication mode. When enabled, the below username and password can be sent in the query string.
- Username
-
Username for WooCommerce - Basic Authentication to be sent in the query string.
- Password
-
Password for WooCommerce - Basic Authentication to be sent in the query string.
- OAuth Token
-
This property is read-only when the Authentication Mode is set to OAuth 1 and is generated via the Generate New OAuth Tokens dialog. Click the Show button to view the token.
- OAuth Token Secret
-
This property is read-only when the Authentication Mode is set to OAuth 1 and is generated via the Generate New OAuth Tokens dialog. Click the Show button to view the token secret.
- Test Connection
-
After all the connection information has been provided, click the "Test Connection" button to test if the user credentials entered can connect to the selected REST service.
Advanced Settings Page
- Proxy Server Settings
-
- Proxy Mode
-
The Proxy Mode option allows you to specify how you want to configure the proxy server setting. There are three options available.
- No Proxy
- Auto-detect (Using system-configured proxy)
- Manual
- Proxy Server
-
Using the Proxy Server option allows you to specify the name of the proxy server for the connection.
- Port
-
The Port option allows you to specify the port number of the proxy server for the connection.
- Username (Proxy Server Authentication)
-
The Username option (under Proxy Server Authentication) allows you to specify the proxy user account.
- Password (Proxy Server Authentication)
-
The Password option (under Proxy Server Authentication) allows you to specify the proxy user's password.
Note: The Proxy Password is not included in the connection manager's ConnectionString property by default. This is by design for security reasons. However, you can include it in your ConnectionString if you want to parameterize your connection manager. The format would be ProxyPassword=myProxyPassword; (make sure you have a semicolon as the last character). It can be anywhere in the ConnectionString.
- Miscellaneous Settings
-
- Timeout
-
The number of seconds requests should wait before timing out.
- Retry on Intermittent Errors
-
The retry on intermittent errors option determines if requests will be retried when there is an error. If this option is checked requests will be retried up to 3 times.
- Ignore Certificate Errors
-
This option can be used to ignore those SSL certificate errors when connecting to Wordpress servers.
Warning: Enabling the "Ignore Certificate Errors" option is generally NOT recommended, particularly for production instances. Unless there is a strong reason to believe the connection is secure - such as the network communication is only happening in an internal infrastructure, this option should be unchecked for best security.
Generate New OAuth Tokens
The Generate New OAuth Tokens dialog is used when the Authentication Mode is set to OAuth 1. Launch it by clicking the Generate New OAuth Tokens... button.
- Consumer Key
-
You must enter a Consumer Key to generate OAuth tokens. You will need to create an application in WordPress. After creating the application you will find the consumer key (client key) here.
- Consumer Secret
-
You must enter a Consumer Secret to generate OAuth tokens. You will need to create an application in WordPress. After creating the application you will find the consumer secret (client secret) here.
- Get Temp Tokens
-
Once a Consumer Key and Consumer Secret have been provided, click the Get Temp Tokens button. This will populate the Temp OAuth Token and Temp OAuth Token Secret properties.
- Temp OAuth Token
-
This property is read-only and can only be configured after providing a Consumer Key and Consumer Secret and then clicking the Get Temp Tokens button. You can click the Show button to view the Temp OAuth Token.
- Temp OAuth Token Secret
-
This property is read-only and can only be configured after providing a Consumer Key and Consumer Secret and then clicking the Get Temp Tokens button. You can click the Show button to view the Temp OAuth Token Secret.
- Authorize In App...
-
Once the Temp OAuth Token and Temp OAuth Token Secret have been generated, click the Authorize In App... button to complete the rest of the OAuth authentication process inside of the toolkit. All you need to do is log in to the service endpoint and authorize the application to generate your tokens.
- Authorize In Browser...
-
Once the Temp OAuth Token and Temp OAuth Token Secret have been generated, click the Authorize In Browser... button to complete the rest of the OAuth authentication process inside your default browser. After you click this button simply follow the steps in the dialog to generate your tokens.