# OrchestratorHTTPRequest

> Performs HTTP requests to the Orchestrator API by authenticating under the Robot it is executed on. You can use the `GET`, `POST`, `PUT`, `PATCH` and `DELETE` verbs to extract data or manipulate it, and send specific information through JSON.

Performs HTTP requests to the Orchestrator API by authenticating under the Robot it is executed on. You can use the `GET`, `POST`, `PUT`, `PATCH` and `DELETE` verbs to extract data or manipulate it, and send specific information through JSON.

Note that for each request you might need different rights on the [Orchestrator Robot role](https://docs.uipath.com/orchestrator/docs/about-roles), depending on what requests you are doing, and the Robot has to be connected to Orchestrator. For example, to run `PUT` requests on organization units, you need **View**, **Create**, and **Edit** permissions. The method runs under the Robot which executes it.

## Definition

**Namespace:** UiPath.Activities.System.API

**Assembly:** UiPath.System.Activities.Api (in UiPath.System.Activities.Api.dll)

## Overloads

|  |  |
| --- | --- |
| `OrchestratorHTTPRequest(OrchestratorHttpMethods, String)` | Performs HTTP requests to the Orchestrator API, using the desired request and the endpoint. |
| `OrchestratorHTTPRequest(OrchestratorHttpMethods, String, Dictionary<String, String>, String)` | Performs HTTP requests to the Orchestrator API, using the desired request, the endpoint, and the response headers. |
| `OrchestratorHTTPRequest(OrchestratorHttpMethods, String, String, String)` | Performs HTTP requests to the Orchestrator API, using the desired request, the endpoint, and the JSON payload. |
| `OrchestratorHTTPRequest(OrchestratorHttpMethods, String, String Dictionary<String, String>, String, String)` | Performs HTTP requests to the Orchestrator API, using the desired request, the endpoint, the JSON payload, and the response headers. |
| `OrchestratorHTTPRequest(OrchestratorHttpMethods, String, String, String Dictionary<String, String>, String, Int32)` | Performs HTTP requests to the Orchestrator API, using the desired request, the endpoint, the JSON payload, and the response headers, along with other configurations. |

## `OrchestratorHTTPRequest(OrchestratorHttpMethods, String)`

Performs HTTP requests to the Orchestrator API, using the desired request and the endpoint.

```
int OrchestratorHTTPRequest(
    OrchestratorAPIHttpMethods method,
    string relativeEndpoint
)
```

`method` `OrchestratorAPIHttpMethods` : The request method to be used when calling the Orchestrator API. The following HTTP verbs are supported: `GET`, `POST`, `PUT`, `PATCH` and `DELETE`.

`relativeEndpoint` [String](https://learn.microsoft.com/dotnet/api/system.string) : The endpoint at which to make requests, relative to your base Orchestrator URL.

## `OrchestratorHTTPRequest(OrchestratorHttpMethods, String, Dictionary<String, String>, String)`

Performs HTTP requests to the Orchestrator API, using the desired request, the endpoint, and the JSON payload.

```
int OrchestratorHTTPRequest(
    OrchestratorAPIHttpMethods method,
    string relativeEndpoint,
    out Dictionary<string, string> responseHeaders,
    out string result
)
```

`method` `OrchestratorAPIHttpMethods` : The request method to be used when calling the Orchestrator API. The following HTTP verbs are supported: `GET`, `POST`, `PUT`, `PATCH` and `DELETE`.

`relativeEndpoint` [String](https://learn.microsoft.com/dotnet/api/system.string) : The endpoint at which to make requests, relative to your base Orchestrator URL.

`responseHeaders` [Dictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2)&lt;[String](https://learn.microsoft.com/dotnet/api/system.string), [String](https://learn.microsoft.com/dotnet/api/system.string)&gt; : Reference to the headers returned by the request.

`result` [String](https://learn.microsoft.com/dotnet/api/system.string) : The JSON returned by the HTTP request.

## `OrchestratorHTTPRequest(OrchestratorHttpMethods, String, String, String)`

Performs HTTP requests to the Orchestrator API, using the desired request, the endpoint, the JSON payload, and the response headers, along with other configurations.

```
int OrchestratorHTTPRequest(
    OrchestratorAPIHttpMethods method,
    string relativeEndpoint,
    string jSONPayload,
    string folderPath
)
```

`method` `OrchestratorAPIHttpMethods` : The request method to be used when calling the Orchestrator API. The following HTTP verbs are supported: `GET`, `POST`, `PUT`, `PATCH` and `DELETE`.

`relativeEndpoint` [String](https://learn.microsoft.com/dotnet/api/system.string) : The endpoint at which to make requests, relative to your base Orchestrator URL.

`jSONPayload` [String](https://learn.microsoft.com/dotnet/api/system.string) : The information you want to send to the indicated Orchestrator endpoint, in a JSON format. The JSON must not be indented.

`folderPath` [String](https://learn.microsoft.com/dotnet/api/system.string) : The path to the Orchestrator folder to use.

## `OrchestratorHTTPRequest(OrchestratorHttpMethods, String, String Dictionary<String, String>, String, String)`

Performs HTTP requests to the Orchestrator API, using the desired request, the endpoint, the JSON payload, and the response headers.

```
int OrchestratorHTTPRequest(
    OrchestratorAPIHttpMethods method,
    string relativeEndpoint,
    string jSONPayload,
    out Dictionary<string, string> responseHeaders,
    out string result,
    string folderPath
)
```

`method` `OrchestratorAPIHttpMethods` : The request method to be used when calling the Orchestrator API. The following HTTP verbs are supported: `GET`, `POST`, `PUT`, `PATCH` and `DELETE`.

`relativeEndpoint` [String](https://learn.microsoft.com/dotnet/api/system.string) : The endpoint at which to make requests, relative to your base Orchestrator URL.

`jSONPayload` [String](https://learn.microsoft.com/dotnet/api/system.string) : The information you want to send to the indicated Orchestrator endpoint, in a JSON format. The JSON must not be indented.

`responseHeaders` [Dictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2)&lt;[String](https://learn.microsoft.com/dotnet/api/system.string), [String](https://learn.microsoft.com/dotnet/api/system.string)&gt; : Reference to the headers returned by the request.

`result` [String](https://learn.microsoft.com/dotnet/api/system.string) : The JSON returned by the HTTP request.

`folderPath` [String](https://learn.microsoft.com/dotnet/api/system.string) : The path to the Orchestrator folder to use.

## `OrchestratorHTTPRequest(OrchestratorHttpMethods, String, String, String Dictionary<String, String>, String, Int32)`

Performs HTTP requests to the Orchestrator API, using the desired request, the endpoint, the JSON payload, and the response headers, along with other configurations.

```
int OrchestratorHTTPRequest(
    OrchestratorAPIHttpMethods method,
    string relativeEndpoint,
    string jSONPayload,
    string folderPath,
    out Dictionary<string, string> responseHeaders,
    out string result,
    int timeoutMS
)
```

`method` `OrchestratorAPIHttpMethods` : The request method to be used when calling the Orchestrator API. The following HTTP verbs are supported: `GET`, `POST`, `PUT`, `PATCH` and `DELETE`.

`relativeEndpoint` [String](https://learn.microsoft.com/dotnet/api/system.string) : The endpoint at which to make requests, relative to your base Orchestrator URL.

`jSONPayload` [String](https://learn.microsoft.com/dotnet/api/system.string) : The information you want to send to the indicated Orchestrator endpoint, in a JSON format. The JSON must not be indented.

`folderPath` [String](https://learn.microsoft.com/dotnet/api/system.string) : The path to the Orchestrator folder to use.

`responseHeaders` [Dictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2)&lt;[String](https://learn.microsoft.com/dotnet/api/system.string), [String](https://learn.microsoft.com/dotnet/api/system.string)&gt; : Reference to the headers returned by the request.

`result` [String](https://learn.microsoft.com/dotnet/api/system.string) : The JSON returned by the HTTP request.

`timeoutMS` [Int32](https://learn.microsoft.com/dotnet/api/system.int32) : Specifies the amount of time (in milliseconds) to wait for the activity to run before an error is thrown. The default value is 30000 milliseconds (30 seconds).

## Return value

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The status code returned by the request.
