ixp
latest
false
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

Communications Mining 用户指南

上次更新日期 2026年3月18日

使用 API

备注:

我们努力使 API 可预测,并且易于使用和集成。如果您有任何可以帮助我们改进的反馈,或者遇到任何问题或意外行为,请联系支持团队。我们会尽快回复您。

API 端点

所有 API 请求都将作为 JSON 对象通过 HTTPS 发送到租户端点的 Communications Mining™。

备注:

您可以在中查看所有可用端点。此外,您可以查看API 教程

通过 UiPath™ 加入的租户:

https://cloud.uipath.com/<my_uipath_organisation>/<my_uipath_tenant>/reinfer_/api/...
https://cloud.uipath.com/<my_uipath_organisation>/<my_uipath_tenant>/reinfer_/api/...

通过 Communications Mining 载入的租户:

https://<mydomain>.reinfer.io/api/...
https://<mydomain>.reinfer.io/api/...
重要提示:

在 Communications Mining™ 中,可以通过设置单独的租户或将开发和生产数据及工作流放置在同一租户的单独项目中来将开发和生产数据及工作流区分开。在每种情况下,数据访问权限都是单独授予的,以便开发者可以拥有开发数据的管理员访问权限,同时对生产进行更严格的控制。如果使用单独的租户,则开发和生产数据的 API 端点不同;如果在同一租户中使用单独的项目,则单个租户的端点将用于两者。

身份验证

All API requests require authentication to identify the user making the request. Two authentication methods are supported: developer API tokens and External Applications (OAuth Client Credentials).

要获取开发者访问令牌,请按照以下步骤操作:

  1. 从 Automation Cloud 访问 IXP。

  2. 转到“管理”页面。

  3. 选择“我的帐户”

  4. “API 令牌”下,选择“重新生成”按钮,这将生成访问令牌。

    此图显示了“管理”页面上“API 令牌”部分下的“重新生成”按钮。

备注:

您一次只能激活一个 API 令牌。 生成新令牌将使前一个令牌失效。

您需要在进行的每个 API 调用中包含以下 HTTP 标头,其中$REINFER_TOKEN是您的 Communications Mining™ API 令牌。

Authorization: Bearer $REINFER_TOKEN
Authorization: Bearer $REINFER_TOKEN

示例中的 bash 示例假定您已将令牌保存在环境变量中。示例中的 Python 和节点示例假定令牌已通过您选择的配置解决方案存储在局部变量REINFER_TOKEN中。

重击

curl -X GET 'https://<my_api_endpoint>/api/...' \
    -H "Authorization: Bearer $REINFER_TOKEN"
curl -X GET 'https://<my_api_endpoint>/api/...' \
    -H "Authorization: Bearer $REINFER_TOKEN"

节点

const request = require("request");

request.get(
  {
    url: "https://<my_api_endpoint>/api/...",
    headers: {
      Authorization: "Bearer " + process.env.REINFER_TOKEN,
    },
  },
  function (error, response, json) {
    // digest response
    console.log(JSON.stringify(json, null, 2));
  }
);
const request = require("request");

request.get(
  {
    url: "https://<my_api_endpoint>/api/...",
    headers: {
      Authorization: "Bearer " + process.env.REINFER_TOKEN,
    },
  },
  function (error, response, json) {
    // digest response
    console.log(JSON.stringify(json, null, 2));
  }
);

Python

import json
import os

import requests

response = requests.get(
    "https://<my_api_endpoint>/api/...",
    headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
)

print(json.dumps(response.json(), indent=2, sort_keys=True))
import json
import os

import requests

response = requests.get(
    "https://<my_api_endpoint>/api/...",
    headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
)

print(json.dumps(response.json(), indent=2, sort_keys=True))

响应

{
  "status": "ok"
}
{
  "status": "ok"
}

Authentication with external applications

For automated or server-to-server integrations where a developer API token is not appropriate, you can authenticate using an External Application with the Client Credentials flow.

Step 1: Create an external application

An administrator must create a Confidential application and configure the required scopes based on which APIs you need to access.

Required scopes:

  • PM.User
  • PM.User.Read
  • Ixp.ApiAccess
重要提示:

Save the App ID and App Secret immediately after creation, as you cannot retrieve the secret later.

For the complete instructions, check Managing External Applications.

Step 2: Assign application permissions

After creating the external application, you must assign it the appropriate permissions before it can access resources.

  1. Navigate to the Manage Access page in IXP in your UiPath environment.
  2. Search for your application by the name you gave it when you created it.
  3. Assign the necessary roles to the application. The application will appear in the list just like regular users.
  4. Save the role assignments.

For the complete permission assignment details, check Managing User and Group Roles.

Step 3: Authenticate using the client credentials flow

Use the Client Credentials grant type to obtain an access token.

Required parameters:

  • grant_type=client_credentials
  • client_id={app_id} - from Step 1
  • client_secret={app_secret} - from Step 1
  • scope - the scopes you configured in Step 1 (space-separated)

For the complete authentication details, check External Applications (OAuth).

Step 4: Use the access token

Once you have an access token, include it in the Authorization header for all API requests.

Authorization: Bearer {access_token}
Authorization: Bearer {access_token}

Example request:

curl -X GET "https://cloud.uipath.com/{organizationName}/{tenantName}/reinfer_/api/v1/datasets" \
  -H "Authorization: Bearer {access_token}" \
  -H "Accept: application/json"
curl -X GET "https://cloud.uipath.com/{organizationName}/{tenantName}/reinfer_/api/v1/datasets" \
  -H "Authorization: Bearer {access_token}" \
  -H "Accept: application/json"
备注:

Replace {organizationName}, {tenantName}, and {access_token} with your actual values.

权限

中的每个 API 端点都列出了其所需的权限。要查看您拥有的权限,请转到“管理”页面上的“管理访问权限”选项卡。该选项卡显示您有权访问的项目以及您在每个项目中拥有的权限。

错误

我们使用传统 HTTP 响应代码来指示 API 请求成功或失败。通常, 2xx范围中的代码表示成功, 4xx范围中的代码表示由于提供的请求而导致的错误,而5xx范围中的代码表示 Communications Mining 存在问题。

该错误的请求还将返回status值为error (而不是ok的正文,以及描述错误的错误消息。

重击

curl -X GET 'https://<my_api_endpoint>/api/v1/nonexistent_page' \
    -H "Authorization: Bearer $REINFER_TOKEN"
curl -X GET 'https://<my_api_endpoint>/api/v1/nonexistent_page' \
    -H "Authorization: Bearer $REINFER_TOKEN"

节点

const request = require("request");

request.get(
  {
    url: "https://<my_api_endpoint>/api/v1/nonexistent_page",
    headers: {
      Authorization: "Bearer " + process.env.REINFER_TOKEN,
    },
  },
  function (error, response, json) {
    // digest response
    console.log(JSON.stringify(json, null, 2));
  }
);
const request = require("request");

request.get(
  {
    url: "https://<my_api_endpoint>/api/v1/nonexistent_page",
    headers: {
      Authorization: "Bearer " + process.env.REINFER_TOKEN,
    },
  },
  function (error, response, json) {
    // digest response
    console.log(JSON.stringify(json, null, 2));
  }
);

Python

import json
import os

import requests

response = requests.get(
    "https://<my_api_endpoint>/api/v1/nonexistent_page",
    headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
)

print(json.dumps(response.json(), indent=2, sort_keys=True))
import json
import os

import requests

response = requests.get(
    "https://<my_api_endpoint>/api/v1/nonexistent_page",
    headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
)

print(json.dumps(response.json(), indent=2, sort_keys=True))

响应

{
  "message": "404 Not Found",
  "status": "error"
}
{
  "message": "404 Not Found",
  "status": "error"
}
备注:

由于网络问题,请求到达 Communications Mining 之前可能会失败。在这种情况下,您收到的响应将与前述的 Communications Mining 错误响应不同。

Performance timing

我们使用Server-Timing HTTP 标头将请求发送到 API 所需的时间传达给 API。我们提供了一个指标total ,您可以使用该指标来衡量我们平台在没有网络请求延迟的情况下处理您的请求所花费的时间。

响应中显示的标头示例:

Server-Timing: total;dur=37.7
Server-Timing: total;dur=37.7

Server-Timing值始终以毫秒为单位,因此在本例中,具有此标头值的 API 请求在我们的平台上需要 37.7 毫秒才能得到处理。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新