Orchestrator
2020.10
バナーの背景画像
サポート対象外
Orchestrator API ガイド
最終更新日 2023年12月12日

認証

UiPath Orchestrator API の認証システムでは、ローカル ユーザーにはベアラー トークンを使用し、ディレクトリ ユーザーには NTLM 認証を使用します。

注: 既定では、ベアラー トークンは 30 分後に期限切れになります。
重要:

このページの手順は、On-Premises Orchestrator API にのみ適用されます。API の基本認証は、Automation Cloud Orchestrator テナントではサポートされません。

Automation Cloud で Orchestrator サービスを使用している場合は、代わりに「クラウド API の利用」の手順に従ってください。

ベアラー トークンによるローカル ユーザー認証

  1. 以下の例のように、Orchestrator のログイン資格情報を使用して、{OrchestratorURL}/api/account/authenticate エンドポイントに POST 要求を送信します。
    POST {OrchestratorURL}/api/account/authenticate

    Request headers:

    キー

    値 (Value)

    認可

    Bearer

    Request body:

    {
        "tenancyName" : "Documentation",
        "usernameOrEmailAddress" : "Documentation",
        "password" : "DocumentationAPItest"
    }{
        "tenancyName" : "Documentation",
        "usernameOrEmailAddress" : "Documentation",
        "password" : "DocumentationAPItest"
    }

    応答コード: 200 OK

    Response body:

    {
        "result": "Rr22VaC0D6MkzFShb0gKqaw3vYUJSMmo4jJWk5crDYtSbZkxPFuOC9ApMEnug2q8WxEGPkVwmNoaSXzxOBwia1Ecrldg5BUXXErU_VNOo_yt7X_GDF8sMTyErSqO9Gfe7RSinIueQU6Q_axlY4jDnCP5r2LHrAJVdyM8Tg9x3WHnR8MOgeOl290uTsSOM1ezGG-OmFarRqFUPiN2-iE_mo1KNW-9AmT87-p1-ZYTusLaGyTS9jKVGtRhMjjB0l9VyOFvINhjptq8zotCo5cOOVWJeuvh-307ZdcUWHxkFTwoGDS_DpC4D7JrKfp4oWeSkA0SSy95RfzT8KRTmsJGQV0k8VD6HE3aa_7c-FGrCDjRVtDSkTgpQcQFrIXD8kT4P52a_18doKaSB-asQ8scYe_o73fCL4VtqLDb2ZWlAwEChVmorcFjbXnejxuAubjoKaoJH10gzc5_IiCPI8pM-Zm09Z5D1ljsNjWJ_LrmOR3dijuuKUGvCDtyCCCU_JrPRxmdYSXZmHHx_3joAux0-A",
        "targetUrl": null,
        "success": true,
        "error": null,
        "unAuthorizedRequest": false,
        "__abp": true
    }{
        "result": "Rr22VaC0D6MkzFShb0gKqaw3vYUJSMmo4jJWk5crDYtSbZkxPFuOC9ApMEnug2q8WxEGPkVwmNoaSXzxOBwia1Ecrldg5BUXXErU_VNOo_yt7X_GDF8sMTyErSqO9Gfe7RSinIueQU6Q_axlY4jDnCP5r2LHrAJVdyM8Tg9x3WHnR8MOgeOl290uTsSOM1ezGG-OmFarRqFUPiN2-iE_mo1KNW-9AmT87-p1-ZYTusLaGyTS9jKVGtRhMjjB0l9VyOFvINhjptq8zotCo5cOOVWJeuvh-307ZdcUWHxkFTwoGDS_DpC4D7JrKfp4oWeSkA0SSy95RfzT8KRTmsJGQV0k8VD6HE3aa_7c-FGrCDjRVtDSkTgpQcQFrIXD8kT4P52a_18doKaSB-asQ8scYe_o73fCL4VtqLDb2ZWlAwEChVmorcFjbXnejxuAubjoKaoJH10gzc5_IiCPI8pM-Zm09Z5D1ljsNjWJ_LrmOR3dijuuKUGvCDtyCCCU_JrPRxmdYSXZmHHx_3joAux0-A",
        "targetUrl": null,
        "success": true,
        "error": null,
        "unAuthorizedRequest": false,
        "__abp": true
    }
  2. HTTP 応答の result パラメーターの文字列をクリップボードにコピーします。この文字列はベアラー トークンを表し、次の方法により以降のすべての要求で使用できます。
    • Bearer xxxxxxxxxxxxx の値が含まれる認可ヘッダーとして使用する。xxxxxxxxxxxxx は先ほどコピーした文字列を表します。
    • API テスト ツールでベアラー トークンがサポートされている場合は、ベアラー トークンの認可の種類を選択し、先ほどコピーした文字列を入力する。

NTLM 認証によるドメイン ユーザー認証

重要: Windows 資格情報を使用して要求を認証するには、Postman など、NTLM 認証をサポートする API クライアントを使用する必要があります。
  1. 専用の API クライアントに Windows 資格情報を指定して、目的のエンドポイントに要求を送信します。Postman の NTLM 認証ヘッダーを変更するには、[Auth] タブに移動し、[Type][NTLM Authentication] に設定して、[Username] フィールドと [Password] フィールドに入力します。


  2. ユーザーが複数のテナントに存在する場合は、X-UIPATH-TenantName ヘッダーを使用してユーザーを正確に指定します。そうしないと、ユーザーがプロビジョニングされている最初のテナントで要求が実行されます。以下の例に、Finance テナントの {OrchestratorURL}/odata/Processes エンドポイントに対する GET 要求を示します。
    GET {OrchestratorURL}/odata/Processes

    Request headers:

    キー

    値 (Value)

    認可

    Bearer

    X-UIPATH-TenantName

    テナントの名前です。

    たとえば、「Finance」です。

    応答コード: 200 OK

    Response body:

    {
        "@odata.context": "{OrchestratorURL}/odata/$metadata#Processes",
        "@odata.count": 2,
        "value": [
            {
                "IsActive": false,
                "SupportsMultipleEntryPoints": false,
                "RequiresUserInteraction": true,
                "Title": null,
                "Version": "1.0.6981.35861",
                "Key": "QueueItemsProcessing:1.0.6981.35861",
                "Description": "Process items from an Orchestrator queue.",
                "Published": "2020-10-17T14:22:11.0566667Z",
                "IsLatestVersion": false,
                "OldVersion": null,
                "ReleaseNotes": null,
                "Authors": "petrina.smith",
                "ProjectType": "Undefined",
                "Id": "QueueItemsProcessing",
                "Arguments": {
                    "Input": "[{\"name\":\"argument1\",\"type\":\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":true},{\"name\":\"argument2\",\"type\":\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"argument3\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":true}]",
                    "Output": null
                }
            },
            {
                "IsActive": false,
                "SupportsMultipleEntryPoints": false,
                "RequiresUserInteraction": false,
                "Title": "TestingSequence",
                "Version": "4.0.6",
                "Key": "TestingSequence:4.0.6",
                "Description": "Blank Process",
                "Published": "2020-10-17T13:04:06.6766667Z",
                "IsLatestVersion": false,
                "OldVersion": null,
                "ReleaseNotes": "Invoke WF Action Generator",
                "Authors": "petrina.smith",
                "ProjectType": "Process",
                "Id": "TestingSequence",
                "Arguments": {
                    "Input": "[{\"name\":\"Name\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"Email\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"Product\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false}]",
                    "Output": null
                }
            }
        ]
    }{
        "@odata.context": "{OrchestratorURL}/odata/$metadata#Processes",
        "@odata.count": 2,
        "value": [
            {
                "IsActive": false,
                "SupportsMultipleEntryPoints": false,
                "RequiresUserInteraction": true,
                "Title": null,
                "Version": "1.0.6981.35861",
                "Key": "QueueItemsProcessing:1.0.6981.35861",
                "Description": "Process items from an Orchestrator queue.",
                "Published": "2020-10-17T14:22:11.0566667Z",
                "IsLatestVersion": false,
                "OldVersion": null,
                "ReleaseNotes": null,
                "Authors": "petrina.smith",
                "ProjectType": "Undefined",
                "Id": "QueueItemsProcessing",
                "Arguments": {
                    "Input": "[{\"name\":\"argument1\",\"type\":\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":true},{\"name\":\"argument2\",\"type\":\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"argument3\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":true}]",
                    "Output": null
                }
            },
            {
                "IsActive": false,
                "SupportsMultipleEntryPoints": false,
                "RequiresUserInteraction": false,
                "Title": "TestingSequence",
                "Version": "4.0.6",
                "Key": "TestingSequence:4.0.6",
                "Description": "Blank Process",
                "Published": "2020-10-17T13:04:06.6766667Z",
                "IsLatestVersion": false,
                "OldVersion": null,
                "ReleaseNotes": "Invoke WF Action Generator",
                "Authors": "petrina.smith",
                "ProjectType": "Process",
                "Id": "TestingSequence",
                "Arguments": {
                    "Input": "[{\"name\":\"Name\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"Email\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"Product\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false}]",
                    "Output": null
                }
            }
        ]
    }

Swagger

If you are using Swagger to try our API, just log in to your Orchestrator instance in a separate tab.

Orchestrator API Swagger 定義にアクセスするには、Orchestrator の URL にサフィックス /swagger/ui/index#/ を追加します。例: https://myOrchestrator.com/swagger/ui/index#/
注: Swagger 認証は、Orchestrator インスタンスで設定したパラメーターに従って期限切れになります。既定では、この値は 30 分に設定されています。変更するには、Web.config ファイルの Auth.Cookie.Expire パラメーターの値を変更します。

Was this page helpful?

サポートを受ける
RPA について学ぶ - オートメーション コース
UiPath コミュニティ フォーラム
UiPath ロゴ (白)
信頼とセキュリティ
© 2005-2024 UiPath. All rights reserved.