UiPath Documentation
data-service
2022.4
false
Data Service Automation Suite 用户指南
  • 入门指南
    • 简介
    • 用户界面
    • Data Service 配置清单
    • 安装 Automation Suite
  • 设置和配置
  • 使用 Data Service
  • 参考
    • Data Service Studio 活动
    • API 访问权限
  • 示例和教程
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

API 访问权限

概述

使用 Data Service OpenAPI,您可以从所选外部应用程序管理 UiPath Data Service 资源,并且可以通过 Oauth 2.0 授权框架在不共享任何凭据的情况下授权外部应用程序。

Learn how to register the external application in UiPath Automation Suite.

API 权限

要使用 Data Service OpenAPI,您必须向外部应用程序授予 API 权限。这些 API 权限称为作用域,Data Service 有以下三种类型的作用域:

  • DataService.Schema.Read - 此用户作用域允许您的外部应用程序读取租户的 Data Service 架构,此作用域取决于用户的权限。
  • DataService.Data.Read<strong>
  • DataService.Data.Write - 此用户作用域允许您的外部应用程序通过删除、更新或新建数据来编辑租户的 Data Service 数据,此作用域取决于用户的权限。

Learn more about the user roles and permissions in Data Service.

下载 OpenAPI 规范

设置了外部应用程序和用户权限后,您就可以下载租户 Data Service 数据的 OpenAPI 规范。为此,请导航至租户的“Data Service”选项卡右上角的菜单 >“API 访问”>“下载 OpenAPI 文件 (JSON)”。

This will get you the OpenAPI 3.0 specifications of your tenant's Data Service entities, in JSON format. Clicking **Copy OpenAPI link** copies the API endpoint that generates the tenant's Data Service OpenAPI specification.

授权 API 调用

通过为外部应用程序创建访问令牌,授权外部应用程序使用 Data Service OpenAPI。使用在注册外部应用程序时生成的应用程序 ID 和应用程序密钥。授权方法取决于应用程序的类型(机密或非机密)。

详细了解外部应用程序的授权方法

API 端点

OAuth2.0 authorization framework helps you generate a access token that allows your external application to make REST API calls to Data Service endpoints, for a limited time (one hour). To continue calling the APIs you need to generate a new access token or request a refresh token.

Data Service API 端点具有以下语法:

  • HTTP 方法 + BaseURL + 资源类别 + Data Service 实体 + 操作 + 路径变量和查询参数

    重要提示:

    In the Automation Suite-deployed Data Service, each active connection can have only one active file upload API call.

    为防止遇到此 API 限制,请确保在请求中传递Connection: close标头。

    Data Service 实体示例

    为了描述每个 API 请求正文/响应正文,我们使用在 Data Service 中创建的“奥运会”实体字段。当我们记录通用端点(例如Get Entity Records)时,端点将包含实体的确切名称(例如Get Olympics Records)。响应正文和请求正文包含实体的所有字段,以复制实体的结构。

    此外,让我们深入了解每个端点,并发现如何充分利用相应端点。

  • 概述
  • API 权限
  • 下载 OpenAPI 规范
  • 授权 API 调用
  • API 端点

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新