document-understanding
2.2510
true
Document Understanding API 指南
- 入门指南
- 使用 Document Understanding™ API 的示例
- 许可
- 故障排除
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。
授权使用外部应用程序并检索可用资源
在 Automation Suite 中使用外部应用程序授权 Document Understanding 项目,并检索可用资源,包括项目 ID 和预定义的 Swagger 项目。
-
创建一个新的 Document UnderstandingTM 项目并检索
projectId(可在项目 URL 中找到)。本示例中,我们使用了 Swagger 中可用的预定义项目*,其标识为
projectID:00000000-0000-0000-0000-000000000000。备注:预定义项目在 Document Understanding 用户界面中不可见。 它提供对可用公共 ML 模型的编程访问权限。
-
创建一个外部应用程序,其中 Document Understanding 用作资源,包括所有可用的应用程序作用域。
-
发起对身份服务的 curl 调用,以获取令牌。
curl --data \
-urlencode "scope=Du.Digitization" --data \
-urlencode "client_id={app_id}" --data \
-urlencode "client_secret={app_secret}" --data \
-urlencode "grant_type=client_credentials" https://cloud.uipath.com/identity_/connect/token
curl --data \
-urlencode "scope=Du.Digitization" --data \
-urlencode "client_id={app_id}" --data \
-urlencode "client_secret={app_secret}" --data \
-urlencode "grant_type=client_credentials" https://cloud.uipath.com/identity_/connect/token
备注:
授权令牌具有有效期。请参阅以下响应中关于有效期的信息,并确保在过期前续订。
{
"access_token": "eyJh**CRaKrg",
"expires_in": 3600,
"token_type": "Bearer",
"scope": "Du.Digitization.Api"
}
{
"access_token": "eyJh**CRaKrg",
"expires_in": 3600,
"token_type": "Bearer",
"scope": "Du.Digitization.Api"
}