REST
How to Use the REST API Connector in DBSync Cloud Workflow
Overview
The REST API Connector in DBSync Cloud Workflow allows users to connect to external APIs and perform various operations such as GET, POST, PUT, PATCH, and DELETE. This connector enables seamless integration with web services, allowing users to send and receive data programmatically.
Steps to Use the REST API Connector
Create REST API Connection
General Settings:
Name (required): Enter a unique name for the connection for easy reference in actions.
Mode (required): Choose between:
Cloud: For connecting to publicly accessible applications (e.g., Salesforce).
On-premise: For connecting to applications behind a firewall. This requires an agent to be installed on a computer with network access to the on-premise application.
Base URL (required): Enter the common part of the API’s URL used across all HTTP endpoints.
Configure HTTP Headers (Optional)
If needed, include custom HTTP headers with your API requests:
Key: Enter the header name (e.g., Authorization).
Value: Enter the corresponding header value.
Configure Authentication
Auth Type (required): Choose the authentication method: Basic
Username (required): Enter the basic authentication username.
Password (required): Enter the password for this account.
OAuth 1.0 or OAuth 2.0: Follow the necessary steps for these authentication methods if applicable.
Test the Connection
Click the Test Connection button to verify that the connection is set up correctly and free of errors.
Configure API Request
HTTP Method: Select the desired HTTP method from the dropdown (GET, POST, PUT, PATCH, DELETE).
Relative URL: Enter the relative URL for the API endpoint. You can use variables by clicking the Fx icon.
Send the Request
Click the Send button to process the API request. The output will be displayed below.
Configure Request Body (if applicable)
Request Body Tab: Define the body of the request for POST, PUT, PATCH, or DELETE methods:
None: No data sent in the request body (typically for GET requests).
Raw: Enter the data in JSON or XML format.
View Output
Response Tab: After sending the request, view the server's response:
Status Code: Indicates the result of the request (e.g., 200 OK, 404 Not Found).
Response Body: The content returned by the server, viewable in different formats (Pretty or Raw).
Headers: Metadata associated with the response.
Review Request Details
Request Tab: Review the details of the request you sent to the server, including parameters and headers.
Example Workflow
Login to DBSync Cloud Workflow.
Create a new project and add a task for REST API operations.
Add the REST API Connector and configure it with the desired connection and HTTP method.
Set up parameters, headers, and the request body as needed.
Send the request and review the response to ensure the operation was successful.
Pro Tip
PRO TIP
Use environment variables for sensitive information such as API keys and tokens. This enhances security by keeping credentials out of the codebase and makes it easier to update credentials across multiple workflows.
Last updated