Call a web service

Use the Call a web service action A tool for building the processes, logic, and direction within workflows. to make HTTP requests and API calls. You can output the response content, response headers, and response status code as variables. The response content is returned in JSON format.

For example, let's say you have a change management workflow for business processes, and those business processes also have corresponding workflows. When a business process (and therefore a workflow for that business process) requires a change, someone fills a Nintex form to request the change which kicks off the change management workflow.

When a change to the business process is approved in the change management workflow, the Call a web service action makes a HTTP post request to the Nintex platform API, which deactivates the workflow for the business process which requires the change. The workflow designer can then make the required changes to the workflow without any new instances of the workflow running. See Step-by-step example: Make an HTTP Post request to Nintex Automation Cloud to deactivate a workflow

Another example to use the Call a web service action is to retrieve current weather information of a specific city by making an API call to a third-party API platform such as OpenWeatherMap. See Step-by-step example: Make an API call to the OpenWeatherMap API to retrieve weather information.

Before you begin:

Jump to:

Configure the Call a web service action

  1. Add the action to the workflow and open the action configuration panel. For more information, see Add an action to the workflow.

  2. In URL, type your request URL or select a variable that holds your request URL.
  3. Select a Request type.
  4. In Request headers, type your request headers or insert a variable that stores the headers of your HTTP request.
  5. In Request content, type your request content or insert a variable that stores the content of your HTTP request.
  6. Select or create variables for Response content, Response headers, and Response status code. You can use these variables later in your workflow.
  7. Note: You can use the Response content variable in a Query JSON action to extract information from the response content. See Query JSON for more information.

Call a web service action fields and selections

Field

Description

Variable

URL

Uniform Resource Locator (URL) used to call a web service. Accepts any combination of typed text and inserted variables.

Text, Decimal, Integer, Boolean, DateTime
Request type

The method of HTTP request to be performed on an identified resource.

  • HTTP Get: requests to retrieve data.
  • HTTP Put: requests to store an entity under the supplied URI (Unified Resource Identifier).
  • HTTP Post: requests that the server accept your data.
  • HTTP Patch: requests to apply partial modifications to a resource.
  • HTTP Delete: requests to delete a specified resource.

Learn more about HTTP request methods.

n/a
Request headers HTTP header to be used in the request. The HTTP header does not relate to the content of the message and only provides additional information about the request or itself to the server. Accepts any combination of typed text and inserted variables. Text, Decimal, Integer, Boolean, DateTime, Collection
Request content The message content of your HTTP request. Accepts any combination of typed text and inserted variables. Text, Decimal, Integer, Boolean, DateTime, Collection

Response content

Content of the server's response. Accepts an inserted variable.

Text, Decimal, Integer, Boolean, DateTime

Response headers

Headers of the server's response. Accepts an inserted variable.

Text

Response status code

Code that indicates the result of the HTTP request. It is issued by the server in response to a client's (i.e. your) request. Accepts an inserted variable.

Learn more about the different types of status codes.

Text, Integer