The concept of an HTTP (Web) service is an open standard (JSON, XML, SOAP, HTTP, etc.) based web application that communicates with other web applications for the purpose of exchanging data.
In practice, using a protocol such as HTTP to transfer data in machine-readable file formats such as XML and JSON is a standardized way of providing interoperability between disparate applications.
In Synatic, the Destination HTTP Service Step provides this function and generally allows the flow to send or write data to a web-based API.
Using an HTTP Service Step
The HTTP Service step is located in the Destination drawer in the Steps palette. To use the HTTP Service step:
Select and drag the HTTP Service step to the desired location in the flow.
Give the step a name and a short meaningful description.
Note: To add the Destination HTTP Service step:
Insert the HTTP Service step directly after a few processing steps in the flow, for example, JSON, and then followed by a Mapper and an XML writer step.
The request is then submitted to the Destination HTTP Service.
Configuring the HTTP Service step
The configuration for this step involves several options and settings.
URL
Enter the URL of the HTTP Service.
HTTP Method
The common HTTP method to use is POST.
Learn more about HTTP Methods.
Authentication Method
Click the + icon to select and configure the HTTP Authentication type:
Auth Type - None - No authentication is required and therefore is not applied.
Auth Type - Basic - Requires a standard username and password. In basic HTTP authentication, a request contains a header field in the form of
Authorization: Basic <credentials>
Auth Type - Header
Options
Headers
Click the + icon to add any Headers you want to submit to the HTTP Service.
Enter the headers you want to submit.
Retry - This option lets you instruct the flow to retry sending the request to the service in case of any failure.
Enabled - Select the checkbox to activate the retry criteria options.
- Times - Enter the number of retry attempts to execute.
- Delay - Enter the delay between retry attempts in seconds.
Advanced Mode Options
Click on the Advanced Mode text button to display the following advanced options:
Disable Streaming - Select the checkbox to disable HTTP streaming and buffer results to send requests as one POST.
Concurrent Calls - Enter the number of requests to submit before waiting for the response.
Follow Redirects - Select the checkbox to instruct the HTTP Service step to obey and follow any redirect it might encounter.
Relax SSL - Select the checkbox to instruct the HTTP Service step to accept self-signed certificates that are otherwise rejected.
Examples
When selecting an Auth Type of oAuth2 in a typical web request to an API, the following type of configuration may apply:
Configure the following fields with the correct values to process successful web requests:
Note: The options marked with an * are required fields.
OAuth Provider URL* - The oAuth2 provider URL to call for authentication.
OAuth Token URL* - The oAuth2 provider URL to generate tokens from.
Client ID* - The client id issued by the provider.
Client Secret* - The client secret issued by the provider.
Response Type* - Select the Response type the request will respond with as either a Code or a Token.
Grant Type* - Select the oAuth2 Grant type to use: Authorization Code.
Use Refresh as Token - Select this option if your provider does not support refresh tokens but uses long-lived tokens.
One use Refresh Token - Select this option if your provider does not support using a refresh token more than once.
No Query String - Select this option if you don't want to send parameters in the query string.
Scopes - A Scope is a mechanism in OAuth 2.0 that limits an application's access to a user's account. An application can request one or more scopes, and the access token issued to the application will be limited to the scopes granted.
Additional QS Values - You can also add additional Query Strings (QS) to the HTTP Service request by adding parameters here.
Note: These parameters will not be submitted If you select the No Query String checkbox.
When selecting an Auth Type of Basic in a typical HTTP Service request to an API, the following type of configuration may apply:
auth=HTTPBasicAuth('user', 'pass'))
Enter your credentials as a standard username and password.
Limitations and known issues
None.
See Also
Read about other Destination Steps.
Useful Tutorials
Revisit the Getting Started page for a refresher.
Read more about Steps here.