studio-web
latest
false
UiPath logo, featuring letters U and I in white

Studio Web User Guide

Last updated Aug 7, 2025

HTTP

The HTTP activity enables you to perform JSON-based API requests within your workflow. It provides full control over request configuration, allowing dynamic definition of methods, URLs, headers, and body content. After execution, the response data becomes available for reference in subsequent workflow steps, making it a critical component for interacting with external APIs.

Known limitations

  • Does not support connections configured through Integration Service. To utilize existing authentication or connections from a connector, use the Connector activity and select the HTTP Request activity from within that connector.
  • Supports only JSON-based requests and responses. Make sure your requests include headers, such as Content-Type: application/json and Accept: application/json.

Using the HTTP activity

To add a HTTP activity to your workflow:
  1. On your API workflow designer canvas, select the plus (+) icon. The Add activity menu appears.
  2. Select HTTP.
  3. In the Properties panel, configure the following fields:
    • Method—Specifies the HTTP method for the request, such as GET, POST, PATCH, DELETE, or PUT.
    • Request URL—Defines the API endpoint for the request. You can dynamically build URLs using the Expression editor. For example, appending an ID retrieved from a previous workflow step.
    • Headers—Defines the request headers as key-value pairs. Headers use a JSON object format and can be generated dynamically with the Expression editor. For example:
      {
        "Content-Type": "application/json",
        "Accept": "application/json",
        "Authorization": "Bearer jfio**********"
      }{
        "Content-Type": "application/json",
        "Accept": "application/json",
        "Authorization": "Bearer jfio**********"
      }
    • Request body—Available for all HTTP methods except GET and HEAD. Supports JSON-based payloads, allowing you to reference data from previous step outputs using the Expression editor.
  4. Test the workflow to execute the activity and generate output fields for later use.

HTTP activity example

This following example makes a POST request to HTTPBin, which returns the request data for validation. The request includes dynamic path variables, headers, and a structured request body.

Open the Test configuration window, then paste and save the following JSON syntax:

{
  "id": 12345,
  "name": "John Doe",
  "isActive": true,
  "balance": 2500.75,
  "createdAt": "2025-03-25T12:00:00Z",
  "tags": [
    "premium",
    "verified",
    "active"
  ],
  "address": {
    "street": "123 Main St",
    "city": "New York",
    "state": "NY",
    "zipCode": "10001",
    "coordinates": {
      "latitude": 40.7128,
      "longitude": -74.006
    }
  },
  "transactions": [
    {
      "transactionId": "txn_001",
      "amount": 150.5,
      "currency": "USD",
      "timestamp": "2025-03-24T10:30:00Z",
    },
    {
      "transactionId": "txn_002",
      "amount": -75.25,
      "currency": "USD",
      "timestamp": "2025-03-23T08:15:00Z"
    }
  ]
}{
  "id": 12345,
  "name": "John Doe",
  "isActive": true,
  "balance": 2500.75,
  "createdAt": "2025-03-25T12:00:00Z",
  "tags": [
    "premium",
    "verified",
    "active"
  ],
  "address": {
    "street": "123 Main St",
    "city": "New York",
    "state": "NY",
    "zipCode": "10001",
    "coordinates": {
      "latitude": 40.7128,
      "longitude": -74.006
    }
  },
  "transactions": [
    {
      "transactionId": "txn_001",
      "amount": 150.5,
      "currency": "USD",
      "timestamp": "2025-03-24T10:30:00Z",
    },
    {
      "transactionId": "txn_002",
      "amount": -75.25,
      "currency": "USD",
      "timestamp": "2025-03-23T08:15:00Z"
    }
  ]
}
  1. On your API workflow designer canvas, add a Script activity, to output a Bearer token value:
    1. Open the Expression editor and return a JSON with a property named bearer_token:
      return {
          "bearer_token": "123321123321"
      }return {
          "bearer_token": "123321123321"
      }
    2. Save.
  2. Add a HTTP activity to the designer canvas.
  3. Configure the HTTP activity as follows:
    • Method—POST
    • Request URL—Use the Expression editor to build the URL string with an id path variable:
      "https://www.httpbin.org/anything/" + ($workflow.input.id | tostring)"https://www.httpbin.org/anything/" + ($workflow.input.id | tostring)
    • Headers—Add headers by specifying a simple key-value JSON. You are also simulating the process for adding a bearer token as an Authorization header:
      {
          "Accept": "application/json",
          "Content-Type": "application/json",
          "Authorization": ("Bearer " + $context.outputs.Javascript_3.bearer_token)
      }{
          "Accept": "application/json",
          "Content-Type": "application/json",
          "Authorization": ("Bearer " + $context.outputs.Javascript_3.bearer_token)
      }
    • Request body—Use the Expression editor to dynamically build the request body by referencing your run configuration JSON. The goal is to pass an array of transactions wrapped within an object as the request payload:
      {
          "transactions": $workflow.input.transactions
      }{
          "transactions": $workflow.input.transactions
      }

    Notice that the Expression output panel shows what the final JSON should look like based on the Activity test input data:

    Test input and output panels
  4. Test the workflow to execute the activity.
  5. Check the Output panel to review the HTTP response.
    Debug panel with response
  • HTTP
  • Known limitations
  • Using the HTTP activity
  • HTTP activity example

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo
Trust and Security
© 2005-2025 UiPath. All rights reserved.