UiPath Documentation
activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

工作流活动

上次更新日期 2026年4月16日

Orchestrator HTTP 请求

对 Orchestrator API 执行 HTTP 请求,方法是在执行此应用程序编程接口的 Robot 下进行身份验证。您可以使用 GETPOSTPUTPATCHDELETE 动词来提取或操作数据,并通过 JSON 发送特定信息。

请注意,对于每个请求,您可能需要对Orchestrator Robot 角色 的不同权限,具体取决于您正在执行的请求,并且机器人必须连接到 Orchestrator。例如,要对组织单位运行PUT请求,您需要“查看”“创建”“编辑”权限。该方法在执行它的 Robot 下运行。

定义

命名空间: UiPath.Activities.System.API

程序集: UiPath.System.Activities.Api(在 UiPath.System.Activities.Api.dll 中)

重载

OrchestratorHTTPRequest(OrchestratorHttpMethods, String)使用所需的请求和端点对 Orchestrator API 执行 HTTP 请求。
OrchestratorHTTPRequest(OrchestratorHttpMethods, String, Dictionary<String, String>, String)使用所需的请求、端点和响应标头对 Orchestrator API 执行 HTTP 请求。
OrchestratorHTTPRequest(OrchestratorHttpMethods, String, String, String)使用所需的请求、端点和 JSON 有效负载对 Orchestrator API 执行 HTTP 请求。
OrchestratorHTTPRequest(OrchestratorHttpMethods, String, String Dictionary<String, String>, String, String)使用所需请求、端点、JSON 有效负载和响应标头对 Orchestrator API 执行 HTTP 请求。
OrchestratorHTTPRequest(OrchestratorHttpMethods, String, String, String Dictionary<String, String>, String, Int32)使用所需请求、端点、JSON 有效负载和响应标头以及其他配置,对 Orchestrator API 执行 HTTP 请求。

OrchestratorHTTPRequest(OrchestratorHttpMethods, String)

使用所需的请求和端点对 Orchestrator API 执行 HTTP 请求。

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

method OrchestratorAPIHttpMethods :调用 Orchestrator API 时要使用的请求方法。支持以下 HTTP 动词: GETPOSTPUTPATCHDELETE

relativeEndpoint String : 用于发出请求的端点,与基本 Orchestrator URL 相对。

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

使用所需的请求、端点和 JSON 有效负载对 Orchestrator API 执行 HTTP 请求。

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

method OrchestratorAPIHttpMethods :调用 Orchestrator API 时要使用的请求方法。支持以下 HTTP 动词: GETPOSTPUTPATCHDELETE

relativeEndpoint String : 用于发出请求的端点,与基本 Orchestrator URL 相对。

responseHeaders字典< String , String > :对请求返回的标头的引用。

result String :HTTP 请求返回的 JSON。

OrchestratorHTTPRequest(OrchestratorHttpMethods, String, String, String)

使用所需请求、端点、JSON 有效负载和响应标头以及其他配置,对 Orchestrator API 执行 HTTP 请求。

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

method OrchestratorAPIHttpMethods :调用 Orchestrator API 时要使用的请求方法。支持以下 HTTP 动词: GETPOSTPUTPATCHDELETE

relativeEndpoint String : 用于发出请求的端点,与基本 Orchestrator URL 相对。

jSONPayload String :要以 JSON 格式发送到指定 Orchestrator 端点的信息。JSON 不得缩进。

folderPath String :要使用的 Orchestrator 文件夹的路径。

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

使用所需请求、端点、JSON 有效负载和响应标头对 Orchestrator API 执行 HTTP 请求。

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

method OrchestratorAPIHttpMethods :调用 Orchestrator API 时要使用的请求方法。支持以下 HTTP 动词: GETPOSTPUTPATCHDELETE

relativeEndpoint String : 用于发出请求的端点,与基本 Orchestrator URL 相对。

jSONPayload String :要以 JSON 格式发送到指定 Orchestrator 端点的信息。JSON 不得缩进。

responseHeaders字典< String , String > :对请求返回的标头的引用。

result String :HTTP 请求返回的 JSON。

folderPath String :要使用的 Orchestrator 文件夹的路径。

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

使用所需请求、端点、JSON 有效负载和响应标头以及其他配置,对 Orchestrator API 执行 HTTP 请求。

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

method OrchestratorAPIHttpMethods :调用 Orchestrator API 时要使用的请求方法。支持以下 HTTP 动词: GETPOSTPUTPATCHDELETE

relativeEndpoint String : 用于发出请求的端点,与基本 Orchestrator URL 相对。

jSONPayload String :要以 JSON 格式发送到指定 Orchestrator 端点的信息。JSON 不得缩进。

folderPath String :要使用的 Orchestrator 文件夹的路径。

responseHeaders字典< String , String > :对请求返回的标头的引用。

result String :HTTP 请求返回的 JSON。

timeoutMS Int32 :指定等待时间(以毫秒为单位),如果超出该时间后活动并未运行,系统便会抛出错误。默认值为 30000 毫秒(30 秒)。

返回值

请求返回的状态代码。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新