Connect to SOAP APIs
You can connect to any SOAP API using the REST API integration and make it available as a resource. Once complete, you can write queries to interact with the API.
Requirements
All users for Retool organizations on Free or Team plans have global Edit permissions and can add, edit, and remove resources. If your organization manages user permissions for resources, you must be a member of a group with Edit all permissions.
To create your SOAP API resource, you need:
- The base URL for the API.
- Additional configuration to perform SOAP requests.
If your SOAP API is behind a firewall, you must also allow access from Retool's IP addresses. Add these IP addresses to your firewall's allowlist before you create the resource.
1. Create a new resource
Sign in to your Retool organization and navigate to the Resources tab. Click Create new, then select Resource.
Retool can connect to almost any API or database, and has built-in integrations for popular data sources. Select the REST API integration.
2. Configure the resource
Provide the necessary details to configure the resource so Retool can connect to your SOAP API. Not all settings are required.
General
These settings configure the name and location of the resource within Retool.
Name
The name to use for the resource (e.g., SOAP API).
Folder
The folder in which to save the resource.
Description
A brief description of the resource (e.g., Customer data).
Credentials
These settings configure how Retool connects to your SOAP API.
Base URL
The base URL for the SOAP API. This must be an absolute URL.
URL parameters
Key-value pairs to include as URL parameters with SOAP API requests.
Headers
Key-value pairs to include as headers with SOAP API requests. You must include the following key-value pair when setting up a SOAP API resource:
Key | Value |
---|---|
Content-Type | text/xml |
If you use a SOAP 1.1 service, include SOAPAction
and an appropriate value.
You may need to include additional headers: refer to your SOAP API specification for details. The name of the SOAP method is usually provided in the SOAP body but may need to be provided in the header instead.
Body
Key-value pairs to include in the body of SOAP API requests.
Cookies
Cookies to include with SOAP API requests.
Authentication
The method of authentication to use with SOAP API requests. If authentication errors occur, verify your authentication details are correct. Refer to the API authentication documentation for more details.
Forward all cookies
Whether to forward all cookies. This is useful if you have dynamic cookie names.
3. Save the resource
Click Create resource to complete the setup. You can then click either Create an app to immediately start building a Retool app or Back to resources to return to the list of resources.
Wrap up
Your SOAP API resource is now ready to use. You write queries to make API requests by specifying the request method and endpoint, additional parameters to include, and the request body. You must ensure the following applies to all SOAP requests:
- Use the POST request method.
- Use the Raw body type.
- If you use WSDL, provide the path to the WSDL in the endpoint URL.
To verify you can successfully interact with your SOAP API, write a test query to retrieve some data.