document-understanding
2024.10
true
  • 入门指南
    • 概述
    • 限制和配额
  • 使用 Document Understanding™ API 的示例
  • 许可
  • 故障排除
UiPath logo, featuring letters U and I in white
Document Understanding API 指南
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated 2024年11月11日

使用发现 API

使用发现服务向项目路由发出 GET 请求(不需要 ID),以检索有关新创建项目的信息。 URL 需要 org/tenant 和 /du_/dpi/framework/projects 路径。 收到响应后,随后的所有其他调用都需要一些信息(projectIDclassifierIDextractionID等),这些信息可在发现调用的响应中找到。

获取项目信息

Document Understanding TM中检索所有可用项目。
curl -X 'GET' \
  'https://{fqdn}/uipathstgss/UiPathDefault/du_/api/framework/projects?api-version=1' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIs***Q'curl -X 'GET' \
  'https://{fqdn}/uipathstgss/UiPathDefault/du_/api/framework/projects?api-version=1' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIs***Q'

检索项目信息的响应

提供有关所用预定义项目的详细信息。

{
  "projects": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "Predefined",
      "description": "Predefined models to be used for standard scenarios. For custom extractors, create a Project in the Document Understanding app in Automation Cloud",
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000?api-version=1.0",
      "digitizationStartUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/digitization/start?api-version=1.0",
      "extractorsDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors?api-version=1.0",
      "classifiersDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/classifiers?api-version=1.0",
      "createdOn": "2023-05-01T19:10:04.8751081Z"
    },
    {
      "id": "0884c3e4-5064-ed11-ac20-cc60c8b14803",
      "name": "DU Bootcamp",
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/0884c3e4-5064-ed11-ac20-cc60c8b14803?api-version=1.0",
      "digitizationStartUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/0884c3e4-5064-ed11-ac20-cc60c8b14803/digitization/start?api-version=1.0",
      "extractorsDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/0884c3e4-5064-ed11-ac20-cc60c8b14803/extractors?api-version=1.0",
      "classifiersDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/0884c3e4-5064-ed11-ac20-cc60c8b14803/classifiers?api-version=1.0",
      "createdOn": "2022-11-14T19:16:52.6658079Z"
    },
    {
      "id": "15895968-855e-ed11-ade6-cc60c85b4740",
      "name": "Documentation",
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/15895968-855e-ed11-ade6-cc60c85b4740?api-version=1.0",
      "digitizationStartUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/15895968-855e-ed11-ade6-cc60c85b4740/digitization/start?api-version=1.0",
      "extractorsDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/15895968-855e-ed11-ade6-cc60c85b4740/extractors?api-version=1.0",
      "classifiersDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/15895968-855e-ed11-ade6-cc60c85b4740/classifiers?api-version=1.0",
      "createdOn": "2022-11-07T10:17:40.2729322Z"
    },
    {
      "id": "64b8c43f-2046-ec11-981f-0050f281975f",
      "name": "ACORD",
      "description": "",
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/64b8c43f-2046-ec11-981f-0050f281975f?api-version=1.0",
      "digitizationStartUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/64b8c43f-2046-ec11-981f-0050f281975f/digitization/start?api-version=1.0",
      "extractorsDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/64b8c43f-2046-ec11-981f-0050f281975f/extractors?api-version=1.0",
      "classifiersDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/64b8c43f-2046-ec11-981f-0050f281975f/classifiers?api-version=1.0",
      "createdOn": "2021-11-15T14:28:07.4366667Z"
    },
    
  ]
}{
  "projects": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "Predefined",
      "description": "Predefined models to be used for standard scenarios. For custom extractors, create a Project in the Document Understanding app in Automation Cloud",
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000?api-version=1.0",
      "digitizationStartUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/digitization/start?api-version=1.0",
      "extractorsDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors?api-version=1.0",
      "classifiersDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/classifiers?api-version=1.0",
      "createdOn": "2023-05-01T19:10:04.8751081Z"
    },
    {
      "id": "0884c3e4-5064-ed11-ac20-cc60c8b14803",
      "name": "DU Bootcamp",
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/0884c3e4-5064-ed11-ac20-cc60c8b14803?api-version=1.0",
      "digitizationStartUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/0884c3e4-5064-ed11-ac20-cc60c8b14803/digitization/start?api-version=1.0",
      "extractorsDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/0884c3e4-5064-ed11-ac20-cc60c8b14803/extractors?api-version=1.0",
      "classifiersDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/0884c3e4-5064-ed11-ac20-cc60c8b14803/classifiers?api-version=1.0",
      "createdOn": "2022-11-14T19:16:52.6658079Z"
    },
    {
      "id": "15895968-855e-ed11-ade6-cc60c85b4740",
      "name": "Documentation",
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/15895968-855e-ed11-ade6-cc60c85b4740?api-version=1.0",
      "digitizationStartUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/15895968-855e-ed11-ade6-cc60c85b4740/digitization/start?api-version=1.0",
      "extractorsDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/15895968-855e-ed11-ade6-cc60c85b4740/extractors?api-version=1.0",
      "classifiersDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/15895968-855e-ed11-ade6-cc60c85b4740/classifiers?api-version=1.0",
      "createdOn": "2022-11-07T10:17:40.2729322Z"
    },
    {
      "id": "64b8c43f-2046-ec11-981f-0050f281975f",
      "name": "ACORD",
      "description": "",
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/64b8c43f-2046-ec11-981f-0050f281975f?api-version=1.0",
      "digitizationStartUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/64b8c43f-2046-ec11-981f-0050f281975f/digitization/start?api-version=1.0",
      "extractorsDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/64b8c43f-2046-ec11-981f-0050f281975f/extractors?api-version=1.0",
      "classifiersDiscoveryUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/64b8c43f-2046-ec11-981f-0050f281975f/classifiers?api-version=1.0",
      "createdOn": "2021-11-15T14:28:07.4366667Z"
    },
    
  ]
}

开始检索提取程序信息

检索项目中的所有提取程序。

curl -X 'GET' \
  'https://{fqdn}/uipathstgss/UiPathDefault/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors?api-version=1' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer e***ik5-CinKm6A'curl -X 'GET' \
  'https://{fqdn}/uipathstgss/UiPathDefault/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors?api-version=1' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer e***ik5-CinKm6A'

检索提取程序信息的响应

提供有关可用于上述项目的提取程序的信息。

为便于阅读,此示例进行了精简。

{
  "extractors": [
    {
      "id": "invoices",
      "name": "Invoices",
      "documentTypeId": "invoices",
      "status": "Available",
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/invoices?api-version=1.0",
      "syncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/invoices/extraction?api-version=1.0",
      "asyncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/invoices/extraction/start?api-version=1.0"
    },
    {
      "id": "acord140",
      "name": "ACORD 140",
      "documentTypeId": "acord140",
      "status": "Available",
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/acord140?api-version=1.0",
      "syncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/acord140/extraction?api-version=1.0",
      "asyncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/acord140/extraction/start?api-version=1.0"
    },
    {
      "id": "vehicle_titles",
      "name": "Vehicle Titles",
      "documentTypeId": "vehicle_titles",
      "status": "Available",
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/vehicle_titles?api-version=1.0",
      "syncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/vehicle_titles/extraction?api-version=1.0",
      "asyncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/vehicle_titles/extraction/start?api-version=1.0"
    }
  ]
}{
  "extractors": [
    {
      "id": "invoices",
      "name": "Invoices",
      "documentTypeId": "invoices",
      "status": "Available",
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/invoices?api-version=1.0",
      "syncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/invoices/extraction?api-version=1.0",
      "asyncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/invoices/extraction/start?api-version=1.0"
    },
    {
      "id": "acord140",
      "name": "ACORD 140",
      "documentTypeId": "acord140",
      "status": "Available",
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/acord140?api-version=1.0",
      "syncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/acord140/extraction?api-version=1.0",
      "asyncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/acord140/extraction/start?api-version=1.0"
    },
    {
      "id": "vehicle_titles",
      "name": "Vehicle Titles",
      "documentTypeId": "vehicle_titles",
      "status": "Available",
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/vehicle_titles?api-version=1.0",
      "syncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/vehicle_titles/extraction?api-version=1.0",
      "asyncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/extractors/vehicle_titles/extraction/start?api-version=1.0"
    }
  ]
}

获取分类器信息

检索项目中的所有分类器。

curl -X 'GET' \
  'https://{fqdn}/uipathstgss/UiPathDefault/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/classifiers?api-version=1' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer eyJhbG***UZik5-CinKm6A'curl -X 'GET' \
  'https://{fqdn}/uipathstgss/UiPathDefault/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/classifiers?api-version=1' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer eyJhbG***UZik5-CinKm6A'

获取分类器信息的响应

提供有关可用于上述项目的分类器的信息。

{
  "classifiers": [
    {
      "id": "ml-classification",
      "name": "ML Classification (Preview)",
      "status": "Available",
      "documentTypeIds": [
        "1040",
        "4506t",
        "990",
        "acord125",
        "acord126",
        "acord131",
        "acord140",
        "acord25",
        "bank_statements",
        "bills_of_lading",
        "checks",
        "financial_statements",
        "fm1003",
        "i9",
        "id_cards",
        "invoices",
        "packing_lists",
        "passports",
        "purchase_orders",
        "receipts",
        "remittance_advices",
        "utility_bills",
        "vehicle_titles",
        "w2",
        "w9"
      ],
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/classifiers/ml-classification?api-version=1.0",
      "syncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/classifiers/ml-classification/classification?api-version=1.0",
      "asyncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/classifiers/ml-classification/classification/start?api-version=1.0"
    }
  ]
}{
  "classifiers": [
    {
      "id": "ml-classification",
      "name": "ML Classification (Preview)",
      "status": "Available",
      "documentTypeIds": [
        "1040",
        "4506t",
        "990",
        "acord125",
        "acord126",
        "acord131",
        "acord140",
        "acord25",
        "bank_statements",
        "bills_of_lading",
        "checks",
        "financial_statements",
        "fm1003",
        "i9",
        "id_cards",
        "invoices",
        "packing_lists",
        "passports",
        "purchase_orders",
        "receipts",
        "remittance_advices",
        "utility_bills",
        "vehicle_titles",
        "w2",
        "w9"
      ],
      "detailsUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/classifiers/ml-classification?api-version=1.0",
      "syncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/classifiers/ml-classification/classification?api-version=1.0",
      "asyncUrl": "https://{fqdn}:443/95baf7a2-59c4-4438-93bb-55967f104904/cf7ae654-02bd-412b-b0cd-a2738b31a9c3/du_/api/framework/projects/00000000-0000-0000-0000-000000000000/classifiers/ml-classification/classification/start?api-version=1.0"
    }
  ]
}

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo White
信任与安全
© 2005-2024 UiPath。保留所有权利。