Rate this page:

HTTP-request

Use this block to create an http-request to an external service. Depending on the selected method, you can either receive data from the service or send it to the service. You can select one of the following methods:

  • GET — Sends data from the resource. Requests to this method can only retrieve data.

  • POST — Sends data to the resource

  • HEAD — Sends a response from the resource

  • DELETE — Allows to delete the specified resource

  • PUT — Allows to replace the resource view with data from the request

  • PATCH — Applies partial modifications to a resource

To create an http-request, do the following:

  1. Connect the block by using the Success port.
  2. Double-click the HTTP-request block.
HTTP request
  1. In the General settings section:
  • Select a method you need from the Method drop-down list.

  • Enter the URL of the service in the URL:port field.

  • Enable the Play audio on dialing switch to activate audio playback. Select an audio file from the Audio library drop-down list. Click Upload to upload an audio file from your computer.

  1. In the Request headers section, specify the response headers necessary to request the service:
  • Click Add header.

  • Select the required header from the Header drop-down list.

  • Enter a variable in the Value field.

  1. In the Query parameters section, configure the query parameters:
  • Enter the necessary parameter in the Parameter field.

  • Enter a variable in the Value field.

  1. In the Response data mapping section, configure response parameters. Click Add response and select one of the following settings:
  • Using HTTP response data — Response based on an HTTP-request. Click Get data to configure response data based on scenario data.

  • Using JSON data example — Response based on JSON. Enter data in the JSON data field and click Parse data.

  • Specify data path manually — Enter or select a variable from the Variable drop-down list, enter a path in the Path field. If there is no data for the specified variable, set a value in the If path doesn’t exist field.

Response data mapping
  1. Click Save or Save as template if needed.

Using HTTP response data

  1. In the Response data mapping section, click Add response and select Using HTTP response data from the drop-down list.
  2. In the Preview request window, click Get data.
Note

If you entered variables in the HTTP-request block, the system requests to enter variable data to send a request.

  1. In the Server response window, select check boxes next to the necessary fields.

The system writes data from these fields to the variables.

  1. Click Get variables.

Using JSON data

Copy URL

Use any API platform to get a required server response and write it to a JSON file.

  1. In the Response data mapping section, click Add response and select Using JSON data example from the drop-down list.
  2. Enter the previously generated server response and click Parse data.
  3. In the Server response window, select check boxes next to the necessary fields.

The system writes data from these fields to the variables.

Specifying the data path

  1. In the Response data mapping section, click Add response and select Specify data path manually from the drop-down list.
  2. Select the name of a variable from the drop-down list. If the name of the variable is not found, enter the required name and press Enter.
  3. Enter the variable path and default variable value.
Important

Split each object value with a forward slash.

  1. Click Save.
Note

Different services and servers use their own methods, and it is better to create requests in accordance with them.