- 基本情報
- Swagger の定義
- Orchestrator API
UiPath Orchestrator API の認証システムでは、ローカル ユーザーにはベアラー トークンを使用し、ディレクトリ ユーザーには NTLM 認証を使用します。
By default, the bearer token expires after 30 minutes.
このページの手順は、On-Premises Orchestrator API にのみ適用されます。API の基本認証は、Automation Cloud Orchestrator テナントではサポートされません。
If you are using the Orchestrator service in Automation Cloud, use the instructions in Consuming Cloud API instead.
ベアラー トークンによるローカル ユーザー認証
-
Make a POST request to the
{OrchestratorURL}/api/account/authenticateendpoint with your Orchestrator login credentials, as in the example below.POST
{OrchestratorURL}/api/account/authenticateRequest headers:
キー 値 (Value) 認可 Bearer Request body:
{ "tenancyName" : "Documentation", "usernameOrEmailAddress" : "Documentation", "password" : "DocumentationAPItest" }{ "tenancyName" : "Documentation", "usernameOrEmailAddress" : "Documentation", "password" : "DocumentationAPItest" }Response code: 200 OK
Response body:
{ "result": "<BEARER_TOKEN>", "targetUrl": null, "success": true, "error": null, "unAuthorizedRequest": false, "__abp": true }{ "result": "<BEARER_TOKEN>", "targetUrl": null, "success": true, "error": null, "unAuthorizedRequest": false, "__abp": true } -
HTTP 応答の result パラメーターの文字列をクリップボードにコピーします。この文字列はベアラー トークンを表し、次の方法により以降のすべての要求で使用できます。
- As an Authorization header with the
Bearer xxxxxxxxxxxxxvalue, wherexxxxxxxxxxxxxrepresents the string previously copied; - API テスト ツールでベアラー トークンがサポートされている場合は、ベアラー トークンの認可の種類を選択し、先ほどコピーした文字列を入力する。
- As an Authorization header with the
NTLM 認証によるドメイン ユーザー認証
To authenticate your requests using Windows credentials you need to use an API client that supports NTLM authentication, such as Postman.
-
Make a request to the desired endpoint specifying your Windows credentials in the dedicated API client. To change an NTLM auth header in Postman, navigate to the Auth tab, set the Type to NTLM Authentication, and fill in the Username and Password fields.
-
ユーザーが複数のテナントに存在する場合は、
X-UIPATH-TenantNameヘッダーを使用してユーザーを正確に指定します。そうしないと、ユーザーがプロビジョニングされている最初のテナントで要求が実行されます。以下の例に、Finance テナントの{OrchestratorURL}/odata/Processesエンドポイントに対するGET要求を示します。GET
{OrchestratorURL}/odata/ProcessesRequest headers:
キー 値 (Value) 認可 Bearer X-UIPATH-TenantName テナントの名前です。
たとえば、「Finance」です。Response code: 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 } } ] }
Accessing Swagger
If you are using Swagger to try our API, just log in to your Orchestrator instance in a separate tab.
The Orchestrator API Swagger definition can be accessed by adding the /swagger/ui/index#/ suffix to your Orchestrator URL. For example, {baseURL2} /swagger/ui/index#/.
The Swagger authentication expires according to the parameters set in your Orchestrator instance. By default, it is set to 30 minutes. You can change it by modifying the value of the Auth.Cookie.Expire parameter, in the Web.config file.