- 基本情報
- Swagger の定義
- Orchestrator API
Orchestrator API ガイド
キュー アイテムはロボットのみが処理できます。たとえば、 /odata/Queues/UiPathODataSvc.StartTransaction エンドポイントに POST 要求を送信するには、ロボットだけが利用可能な情報が必要です。
アイテムの履歴を表示する
以下の呼び出しでは、特定のキュー アイテムで実行されたすべてのアクションを表示できます。
GET
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/QueueItemEvents/UiPath.Server.Configuration.OData.GetQueueItemEventsHistory(queueItemId=1050203)?$orderby=Timestamp&$top=10
要求ヘッダー
| キー | 値 (Value) |
|---|---|
| 認可 | Bearer |
応答コード
200 OK
応答本文
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItemEvents",
"@odata.count": 5,
"value": [
{
"QueueItemId": 1050203,
"Timestamp": "2018-03-07T16:02:59.09Z",
"Action": "Create",
"Data": null,
"UserId": 910,
"UserName": "DocBot",
"Status": "New",
"ReviewStatus": "None",
"ReviewerUserId": null,
"ReviewerUserName": null,
"Id": 18276
},
{
"QueueItemId": 1050203,
"Timestamp": "2018-03-07T18:15:04.46Z",
"Action": "Status",
"Data": null,
"UserId": 910,
"UserName": "DocBot",
"Status": "InProgress",
"ReviewStatus": "None",
"ReviewerUserId": null,
"ReviewerUserName": null,
"Id": 20333
},
{
"QueueItemId": 1050203,
"Timestamp": "2018-03-07T18:15:05.07Z",
"Action": "Edit",
"Data": null,
"UserId": 910,
"UserName": "DocBot",
"Status": "InProgress",
"ReviewStatus": "None",
"ReviewerUserId": null,
"ReviewerUserName": null,
"Id": 20334
},
{
"QueueItemId": 1050203,
"Timestamp": "2018-03-07T18:15:05.507Z",
"Action": "Edit",
"Data": null,
"UserId": 910,
"UserName": "DocBot",
"Status": "Failed",
"ReviewStatus": "None",
"ReviewerUserId": null,
"ReviewerUserName": null,
"Id": 20335
},
{
"QueueItemId": 1050203,
"Timestamp": "2018-03-08T10:47:40.463Z",
"Action": "Edit",
"Data": null,
"UserId": 583,
"UserName": "admin",
"Status": "Failed",
"ReviewStatus": "None",
"ReviewerUserId": 583,
"ReviewerUserName": "admin",
"Id": 21240
}
]
}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItemEvents",
"@odata.count": 5,
"value": [
{
"QueueItemId": 1050203,
"Timestamp": "2018-03-07T16:02:59.09Z",
"Action": "Create",
"Data": null,
"UserId": 910,
"UserName": "DocBot",
"Status": "New",
"ReviewStatus": "None",
"ReviewerUserId": null,
"ReviewerUserName": null,
"Id": 18276
},
{
"QueueItemId": 1050203,
"Timestamp": "2018-03-07T18:15:04.46Z",
"Action": "Status",
"Data": null,
"UserId": 910,
"UserName": "DocBot",
"Status": "InProgress",
"ReviewStatus": "None",
"ReviewerUserId": null,
"ReviewerUserName": null,
"Id": 20333
},
{
"QueueItemId": 1050203,
"Timestamp": "2018-03-07T18:15:05.07Z",
"Action": "Edit",
"Data": null,
"UserId": 910,
"UserName": "DocBot",
"Status": "InProgress",
"ReviewStatus": "None",
"ReviewerUserId": null,
"ReviewerUserName": null,
"Id": 20334
},
{
"QueueItemId": 1050203,
"Timestamp": "2018-03-07T18:15:05.507Z",
"Action": "Edit",
"Data": null,
"UserId": 910,
"UserName": "DocBot",
"Status": "Failed",
"ReviewStatus": "None",
"ReviewerUserId": null,
"ReviewerUserName": null,
"Id": 20335
},
{
"QueueItemId": 1050203,
"Timestamp": "2018-03-08T10:47:40.463Z",
"Action": "Edit",
"Data": null,
"UserId": 583,
"UserName": "admin",
"Status": "Failed",
"ReviewStatus": "None",
"ReviewerUserId": 583,
"ReviewerUserName": "admin",
"Id": 21240
}
]
}
特定のキューの平均実行時間を取得する
以下の要求では、指定したキュー内にあるアイテムの平均実行時間を確認できます。
この種類の要求は、キュー ID ではなく、キューの名前または説明でのみフィルター処理できます。
GET
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/QueueProcessingRecords/UiPathODataSvc.RetrieveQueuesProcessingStatus?$filter=QueueDefinitionName eq 'DocQueue'
応答コード
200 OK
応答本文
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Collection(UiPath.Core.Model.Queues.QueueProcessingStatus)",
"@odata.count": 1,
"value": [
{
"ItemsToProcess": 682,
"ItemsInProgress": 0,
"QueueDefinitionId": 188,
"QueueDefinitionName": "DocQueue",
"QueueDefinitionDescription": null,
"QueueDefinitionAcceptAutomaticallyRetry": true,
"QueueDefinitionMaxNumberOfRetries": 5,
"QueueDefinitionEnforceUniqueReference": false,
"ProcessingMeanTime": 2.15,
"SuccessfulTransactionsNo": 0,
"ApplicationExceptionsNo": 0,
"BusinessExceptionsNo": 883,
"SuccessfulTransactionsProcessingTime": 0,
"ApplicationExceptionsProcessingTime": 0,
"BusinessExceptionsProcessingTime": 2.15,
"TotalNumberOfTransactions": 883,
"LastProcessed": "2018-03-07T18:20:29.3833333Z"
}
]
}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Collection(UiPath.Core.Model.Queues.QueueProcessingStatus)",
"@odata.count": 1,
"value": [
{
"ItemsToProcess": 682,
"ItemsInProgress": 0,
"QueueDefinitionId": 188,
"QueueDefinitionName": "DocQueue",
"QueueDefinitionDescription": null,
"QueueDefinitionAcceptAutomaticallyRetry": true,
"QueueDefinitionMaxNumberOfRetries": 5,
"QueueDefinitionEnforceUniqueReference": false,
"ProcessingMeanTime": 2.15,
"SuccessfulTransactionsNo": 0,
"ApplicationExceptionsNo": 0,
"BusinessExceptionsNo": 883,
"SuccessfulTransactionsProcessingTime": 0,
"ApplicationExceptionsProcessingTime": 0,
"BusinessExceptionsProcessingTime": 2.15,
"TotalNumberOfTransactions": 883,
"LastProcessed": "2018-03-07T18:20:29.3833333Z"
}
]
}
キュー アイテムのレビュー担当者を変更する
以下の例では、ID が 1050200 の失敗したトランザクション アイテムのレビュー担当者を変更できます。
RowVersion パラメーターの値は、キュー アイテムが更新されるたびに変更されます。この情報を取得するには、 /odata/QueueItems() エンドポイントで {AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_ /odata/QueueItems(1050200)などの GET 呼び出しを実行します。
POST
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/QueueItems/UiPathODataSvc.SetItemReviewer
要求ヘッダー
| キー | 値 (Value) |
|---|---|
| 認可 | Bearer |
要求本文
{
"queueItems": [{
"Id": 1050200,
"RowVersion":"AAAAAABDIK8="
}],
"userId": 583
}
{
"queueItems": [{
"Id": 1050200,
"RowVersion":"AAAAAABDIK8="
}],
"userId": 583
}
応答コード
200 OK
応答本文
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.BulkOperationResponseDto_1OfInt64",
"Success": true,
"Message": null,
"FailedItems": []
}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.BulkOperationResponseDto_1OfInt64",
"Success": true,
"Message": null,
"FailedItems": []
}
指定したレビュー ステータスのキュー アイテムを取得する
この例では、リビジョン ステータスが [レビュー中] に設定されている最初の 2 つのキュー アイテムを抽出できます。
GET
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_
/odata/QueueItems?$filter=ReviewStatus eq 'InReview'&$top=2
要求ヘッダー
| キー | 値 (Value) |
|---|---|
| 認可 | Bearer |
応答コード
200 OK
応答本文
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItems",
"@odata.count": 3,
"value": [
{
"QueueDefinitionId": 188,
"OutputData": null,
"Status": "Failed",
"ReviewStatus": "InReview",
"ReviewerUserId": 583,
"Key": "e4760d27-a76d-4469-b7e6-fbda2f732b10",
"Reference": "ActivityDescription",
"ProcessingExceptionType": "BusinessException",
"DueDate": null,
"Priority": "High",
"DeferDate": null,
"StartProcessing": "2018-03-07T18:14:56.633Z",
"EndProcessing": "2018-03-07T18:14:58.723Z",
"SecondsInPreviousAttempts": 2,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"Description\":\"Gets a specified credential by using a provided AssetName, and returns a username and a secure password.\"}}",
"CreationTime": "2018-03-07T16:02:57.547Z",
"Progress": null,
"RowVersion": "AAAAAABDFiU=",
"Id": 1050199,
"ProcessingException": {
"Reason": "authentication",
"Details": null,
"Type": "BusinessException",
"AssociatedImageFilePath": null,
"CreationTime": "2018-03-07T18:14:58.723Z"
},
"SpecificContent": {
"Description": "Gets a specified credential by using a provided AssetName, and returns a username and a secure password."
},
"Output": null
},
{
"QueueDefinitionId": 188,
"OutputData": null,
"Status": "Failed",
"ReviewStatus": "InReview",
"ReviewerUserId": 583,
"Key": "e90e8067-50fc-407a-9678-eede311f815a",
"Reference": "ActivityDescription",
"ProcessingExceptionType": "BusinessException",
"DueDate": null,
"Priority": "High",
"DeferDate": null,
"StartProcessing": "2018-03-07T18:14:54.85Z",
"EndProcessing": "2018-03-07T18:14:57.103Z",
"SecondsInPreviousAttempts": 2,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"Description\":\"Gets a specified asset by using a provided AssetName. If the asset is not global, it must be assigned to the local robot in order to be retrieved.\"}}",
"CreationTime": "2018-03-07T16:02:57.287Z",
"Progress": null,
"RowVersion": "AAAAAABDFiY=",
"Id": 1050198,
"ProcessingException": {
"Reason": "authentication",
"Details": null,
"Type": "BusinessException",
"AssociatedImageFilePath": null,
"CreationTime": "2018-03-07T18:14:57.103Z"
},
"SpecificContent": {
"Description": "Gets a specified asset by using a provided AssetName. If the asset is not global, it must be assigned to the local robot in order to be retrieved."
},
"Output": null
}
]
}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItems",
"@odata.count": 3,
"value": [
{
"QueueDefinitionId": 188,
"OutputData": null,
"Status": "Failed",
"ReviewStatus": "InReview",
"ReviewerUserId": 583,
"Key": "e4760d27-a76d-4469-b7e6-fbda2f732b10",
"Reference": "ActivityDescription",
"ProcessingExceptionType": "BusinessException",
"DueDate": null,
"Priority": "High",
"DeferDate": null,
"StartProcessing": "2018-03-07T18:14:56.633Z",
"EndProcessing": "2018-03-07T18:14:58.723Z",
"SecondsInPreviousAttempts": 2,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"Description\":\"Gets a specified credential by using a provided AssetName, and returns a username and a secure password.\"}}",
"CreationTime": "2018-03-07T16:02:57.547Z",
"Progress": null,
"RowVersion": "AAAAAABDFiU=",
"Id": 1050199,
"ProcessingException": {
"Reason": "authentication",
"Details": null,
"Type": "BusinessException",
"AssociatedImageFilePath": null,
"CreationTime": "2018-03-07T18:14:58.723Z"
},
"SpecificContent": {
"Description": "Gets a specified credential by using a provided AssetName, and returns a username and a secure password."
},
"Output": null
},
{
"QueueDefinitionId": 188,
"OutputData": null,
"Status": "Failed",
"ReviewStatus": "InReview",
"ReviewerUserId": 583,
"Key": "e90e8067-50fc-407a-9678-eede311f815a",
"Reference": "ActivityDescription",
"ProcessingExceptionType": "BusinessException",
"DueDate": null,
"Priority": "High",
"DeferDate": null,
"StartProcessing": "2018-03-07T18:14:54.85Z",
"EndProcessing": "2018-03-07T18:14:57.103Z",
"SecondsInPreviousAttempts": 2,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"Description\":\"Gets a specified asset by using a provided AssetName. If the asset is not global, it must be assigned to the local robot in order to be retrieved.\"}}",
"CreationTime": "2018-03-07T16:02:57.287Z",
"Progress": null,
"RowVersion": "AAAAAABDFiY=",
"Id": 1050198,
"ProcessingException": {
"Reason": "authentication",
"Details": null,
"Type": "BusinessException",
"AssociatedImageFilePath": null,
"CreationTime": "2018-03-07T18:14:57.103Z"
},
"SpecificContent": {
"Description": "Gets a specified asset by using a provided AssetName. If the asset is not global, it must be assigned to the local robot in order to be retrieved."
},
"Output": null
}
]
}
キュー アイテムを追加する
以下の例では、「高」の優先度、延期日と期限日、および 2 つの引数と値を持つアイテムを「DocQueue」キューに追加できます。このように追加したアイテムのステータスはすべて、[ キュー アイテムを追加] アクティビティと同様に「新規」になります。
SpecificContent パラメーターにはプリミティブな値のみを設定する必要があることに注意してください。
POST
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Queues/UiPathODataSvc.AddQueueItem
要求ヘッダー
| キー | 値 (Value) |
|---|---|
| 認可 | Bearer |
要求本文
{
"itemData": {
"Priority": "High",
"DeferDate": "2018-03-21T13:42:27.654Z",
"DueDate": "2018-03-25T13:42:27.654Z",
"Name": "DocQueue",
"SpecificContent": {
"Email": "obrian@uipath.com",
"Name": "O'Brian"
}
}
}
{
"itemData": {
"Priority": "High",
"DeferDate": "2018-03-21T13:42:27.654Z",
"DueDate": "2018-03-25T13:42:27.654Z",
"Name": "DocQueue",
"SpecificContent": {
"Email": "obrian@uipath.com",
"Name": "O'Brian"
}
}
}
応答コード
200 OK
応答本文
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#queueItem/$entity",
"QueueDefinitionId": 188,
"OutputData": null,
"Status": "New",
"ReviewStatus": "None",
"ReviewerUserId": null,
"Key": "e9cb2205-0232-4b99-9556-52dc2e686663",
"Reference": null,
"ProcessingExceptionType": null,
"DueDate": "2018-03-25T13:42:27.654Z",
"Priority": "High",
"DeferDate": "2018-03-21T13:42:27.654Z",
"StartProcessing": null,
"EndProcessing": null,
"SecondsInPreviousAttempts": 0,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"Email\":\"obrian@uipath.com\",\"Name\":\"O'brian\"}}",
"CreationTime": "2018-03-21T15:31:27.2699068Z",
"Progress": null,
"RowVersion": "AAAAAABDGLk=",
"Id": 1050947,
"ProcessingException": null,
"SpecificContent": {
"Email": "obrian@uipath.com",
"Name": "O'Brian"
},
"Output": null
}}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#queueItem/$entity",
"QueueDefinitionId": 188,
"OutputData": null,
"Status": "New",
"ReviewStatus": "None",
"ReviewerUserId": null,
"Key": "e9cb2205-0232-4b99-9556-52dc2e686663",
"Reference": null,
"ProcessingExceptionType": null,
"DueDate": "2018-03-25T13:42:27.654Z",
"Priority": "High",
"DeferDate": "2018-03-21T13:42:27.654Z",
"StartProcessing": null,
"EndProcessing": null,
"SecondsInPreviousAttempts": 0,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"Email\":\"obrian@uipath.com\",\"Name\":\"O'brian\"}}",
"CreationTime": "2018-03-21T15:31:27.2699068Z",
"Progress": null,
"RowVersion": "AAAAAABDGLk=",
"Id": 1050947,
"ProcessingException": null,
"SpecificContent": {
"Email": "obrian@uipath.com",
"Name": "O'Brian"
},
"Output": null
}}
Validation error details
If the queue has a Specific Data JSON schema and the submitted item fails validation, the response uses the standard error envelope and the validator's messages are surfaced in the details field, one line per violation. details is null when no extra context is available.
Example response body:
{
"message": "Queue item violates the specific data JSON schema.",
"errorCode": 1857,
"resourceIds": null,
"details": "/Email should match regex pattern '^.+@.+\\..+$'\n/Age should be at least 18"
}
{
"message": "Queue item violates the specific data JSON schema.",
"errorCode": 1857,
"resourceIds": null,
"details": "/Email should match regex pattern '^.+@.+\\..+$'\n/Age should be at least 18"
}
複数のキュー アイテムを追加する
複数のフォルダーに割り当てられている場合、要求には、目的のキューの FolderId または FolderPath を提供する HTTP ヘッダーが含まれている必要があります。詳細については こちらをご覧ください 。HTTP ヘッダーが含まれない場合、要求は失敗し、「 An organization unit is required for this action.
以下の例では、一意の参照のみを許可するように設定されている「DocTest」キューに同時に複数のアイテムを追加できます。追加したアイテムは、すべて [新規] ステータスになります。
[固有データ] コンテンツにはデータ型を指定することをお勧めします。たとえば、[ 名前 ] フィールドに String 型のデータが含まれている場合は、次の構文を使用してキーと値のペアを追加する必要があります "Name@odata.type": "#string"。以下の例をご覧ください。
最初の例は成功しますが、後者は失敗します。このアイテムには、一意の参照キューに必要な参照がないためです。
複数のキュー アイテムを追加する場合に使用できるアップロード ストラテジは 2 つあります。
AllOrNothing- エラーが発生しなかった場合にのみキュー アイテムを追加します。それ以外の場合、何も挿入されず、エラーが発生した行が返されます。ProcessAllIndependently- すべてのアイテムを追加し、失敗したすべてのアイテムのリストを返します。注:2 つ目の例から分かるように、失敗したアイテムは応答の本文で返されるため、失敗した要求は 200 OK を返します。 200 OK を返さない要求は、入力パラメーターが正しくない要求のみです。
成功した要求
POST
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Queues/UiPathODataSvc.BulkAddQueueItems
要求ヘッダー
| キー | 値 (Value) |
|---|---|
| 認可 | Bearer |
要求本文
{
"queueName": "DocTest",
"commitType": "AllOrNothing",
"queueItems": [{
"Priority": "High",
"SpecificContent": {
"Name": "rêvé",
"Name@odata.type": "#String"
},
"DeferDate": "2019-03-14T12:20:13.290Z",
"DueDate": "2019-03-14T12:20:13.290Z",
"Reference": "ref4"
},
{
"Priority": "High",
"SpecificContent": {
"Name": "même",
"Name@odata.type": "#String"
},
"DeferDate": "2019-03-14T12:20:13.290Z",
"DueDate": "2019-03-14T12:20:13.290Z",
"Reference": "ref5"
},
{
"Priority": "High",
"SpecificContent": {
"Name": "Žao",
"Name@odata.type": "#String"
},
"DeferDate": "2019-03-14T12:20:13.290Z",
"DueDate": "2019-03-14T12:20:13.290Z",
"Reference": "ref6"
}
]
}
{
"queueName": "DocTest",
"commitType": "AllOrNothing",
"queueItems": [{
"Priority": "High",
"SpecificContent": {
"Name": "rêvé",
"Name@odata.type": "#String"
},
"DeferDate": "2019-03-14T12:20:13.290Z",
"DueDate": "2019-03-14T12:20:13.290Z",
"Reference": "ref4"
},
{
"Priority": "High",
"SpecificContent": {
"Name": "même",
"Name@odata.type": "#String"
},
"DeferDate": "2019-03-14T12:20:13.290Z",
"DueDate": "2019-03-14T12:20:13.290Z",
"Reference": "ref5"
},
{
"Priority": "High",
"SpecificContent": {
"Name": "Žao",
"Name@odata.type": "#String"
},
"DeferDate": "2019-03-14T12:20:13.290Z",
"DueDate": "2019-03-14T12:20:13.290Z",
"Reference": "ref6"
}
]
}
応答コード
200 OK
応答本文
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.BulkOperationResponseDto_1OfFailedQueueItemDto",
"Success": true,
"Message": null,
"FailedItems": []
}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.BulkOperationResponseDto_1OfFailedQueueItemDto",
"Success": true,
"Message": null,
"FailedItems": []
}
失敗した要求
POST
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Queues/UiPathODataSvc.BulkAddQueueItems
要求ヘッダー
| キー | 値 (Value) |
|---|---|
| 認可 | Bearer |
要求本文
{
"queueName": "DocTest",
"commitType": "AllOrNothing",
"queueItems": [{
"Priority": "High",
"SpecificContent": {
"Name": "rêvé",
"Name@odata.type": "#String"
},
"DeferDate": "2019-03-14T12:20:13.290Z",
"DueDate": "2019-03-14T12:20:13.290Z",
},
{
"Priority": "High",
"SpecificContent": {
"Name": "même",
"Name@odata.type": "#String"
},
"DeferDate": "2019-03-14T12:20:13.290Z",
"DueDate": "2019-03-14T12:20:13.290Z",
},
{
"Priority": "High",
"SpecificContent": {
"Name": "Žao",
"Name@odata.type": "#String"
},
"DeferDate": "2019-03-14T12:20:13.290Z",
"DueDate": "2019-03-14T12:20:13.290Z",
}
]
}
{
"queueName": "DocTest",
"commitType": "AllOrNothing",
"queueItems": [{
"Priority": "High",
"SpecificContent": {
"Name": "rêvé",
"Name@odata.type": "#String"
},
"DeferDate": "2019-03-14T12:20:13.290Z",
"DueDate": "2019-03-14T12:20:13.290Z",
},
{
"Priority": "High",
"SpecificContent": {
"Name": "même",
"Name@odata.type": "#String"
},
"DeferDate": "2019-03-14T12:20:13.290Z",
"DueDate": "2019-03-14T12:20:13.290Z",
},
{
"Priority": "High",
"SpecificContent": {
"Name": "Žao",
"Name@odata.type": "#String"
},
"DeferDate": "2019-03-14T12:20:13.290Z",
"DueDate": "2019-03-14T12:20:13.290Z",
}
]
}
応答コード
200 OK
応答本文
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.BulkOperationResponseDto_1OfFailedQueueItemDto",
"Success": false,
"Message": "Some items have not been inserted.",
"FailedItems": [{
"Ordinal": 1,
"ErrorCode": "TransactionReferenceRequired",
"ErrorMessage": "Error creating Transaction. Reference is required for Unique Reference Queues.",
"ErrorDetails": null
}]
}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.BulkOperationResponseDto_1OfFailedQueueItemDto",
"Success": false,
"Message": "Some items have not been inserted.",
"FailedItems": [{
"Ordinal": 1,
"ErrorCode": "TransactionReferenceRequired",
"ErrorMessage": "Error creating Transaction. Reference is required for Unique Reference Queues.",
"ErrorDetails": null
}]
}
FailedQueueItemDto fields
The FailedItems[] array uses the FailedQueueItemDto shape.
| フィールド | 入力 | 説明 |
|---|---|---|
Ordinal | integer | 1-based position of the failing item in the request batch. Returned for AllOrNothing, StopOnFirstFailure, and ProcessAllIndependently. |
ErrorCode | string | Symbolic error code (for example, TransactionReferenceRequired, QueueItemViolatesSpecificDataJsonSchema). |
ErrorMessage | string | Human-readable summary of the failure. |
ErrorDetails | string | Additional context — for JSON-schema violations, the validator's messages, one line per violation. null when no extra context is available. |
Example: schema validation failure
When a queue has a Specific Data JSON schema and an item fails validation, ErrorDetails carries the validator's messages so callers can pinpoint which property and rule failed.
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.BulkOperationResponseDto_1OfFailedQueueItemDto",
"Success": false,
"Message": "Some items have not been inserted.",
"FailedItems": [{
"Ordinal": 1,
"ErrorCode": "QueueItemViolatesSpecificDataJsonSchema",
"ErrorMessage": "Queue item violates the specific data JSON schema.",
"ErrorDetails": "/Email should match regex pattern '^.+@.+\\..+$'\n/Age should be at least 18"
}]
}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.BulkOperationResponseDto_1OfFailedQueueItemDto",
"Success": false,
"Message": "Some items have not been inserted.",
"FailedItems": [{
"Ordinal": 1,
"ErrorCode": "QueueItemViolatesSpecificDataJsonSchema",
"ErrorMessage": "Queue item violates the specific data JSON schema.",
"ErrorDetails": "/Email should match regex pattern '^.+@.+\\..+$'\n/Age should be at least 18"
}]
}
トランザクションをステータスとロボット ID に従って取得する
以下の例では、Orchestrator データベースに対してクエリを実行し、Id が 749 のロボットによって処理された、ステータスが [処理中] の最初の 10 個のキュー アイテムを取得します。最後に、ロボット情報を展開します。この例の応答は切り詰められていることに注意してください。
GET
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/QueueItems?$top=10&$expand=Robot&$filter=Status eq 'InProgress' and Robot/Id eq 749
要求ヘッダー
| キー | 値 (Value) |
|---|---|
| 認可 | Bearer |
応答コード
200 OK
応答本文
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItems",
"@odata.count": 1752,
"value": [
{
"QueueDefinitionId": 188,
"OutputData": null,
"Status": "InProgress",
"ReviewStatus": "None",
"ReviewerUserId": null,
"Key": "1c632cc1-44ab-4624-bace-6fbb5fd1c0cd",
"Reference": "ActivityDescription",
"ProcessingExceptionType": null,
"DueDate": null,
"Priority": "High",
"DeferDate": null,
"StartProcessing": "2018-03-07T15:05:05.113Z",
"EndProcessing": null,
"SecondsInPreviousAttempts": 0,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"Description\":\"Checks if Stop was triggered in UiPath Orchestrator.\"}}",
"CreationTime": "2018-03-05T18:39:16.06Z",
"Progress": null,
"RowVersion": "AAAAAABC3aA=",
"Id": 1048065,
"ProcessingException": null,
"SpecificContent": {
"Description": "Checks if Stop was triggered in UiPath Orchestrator."
},
"Output": null,
"Robot": {
"LicenseKey": null,
"MachineName": "MBOBOC",
"Name": "DocBot",
"Username": "UIPATH\\MADALINA.BOBOC",
"Description": null,
"Type": "NonProduction",
"Password": null,
"RobotEnvironments": "",
"Id": 749,
"ExecutionSettings": null
}
},
{
"QueueDefinitionId": 188,
"OutputData": null,
"Status": "InProgress",
"ReviewStatus": "None",
"ReviewerUserId": null,
"Key": "7dfa834b-8398-476e-bd18-b0fa51d4ddf6",
"Reference": "ActivityDescription",
"ProcessingExceptionType": null,
"DueDate": null,
"Priority": "High",
"DeferDate": null,
"StartProcessing": "2018-03-07T15:05:04.503Z",
"EndProcessing": null,
"SecondsInPreviousAttempts": 0,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"Description\":\"Sets the status of a transaction item to Failed or Successful.\"}}",
"CreationTime": "2018-03-05T18:39:15.627Z",
"Progress": null,
"RowVersion": "AAAAAABC3Z8=",
"Id": 1048064,
"ProcessingException": null,
"SpecificContent": {
"Description": "Sets the status of a transaction item to Failed or Successful."
},
"Output": null,
"Robot": {
"LicenseKey": null,
"MachineName": "MBOBOC",
"Name": "DocBot",
"Username": "UIPATH\\MADALINA.BOBOC",
"Description": null,
"Type": "NonProduction",
"Password": null,
"RobotEnvironments": "",
"Id": 749,
"ExecutionSettings": null
}
}
]
}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItems",
"@odata.count": 1752,
"value": [
{
"QueueDefinitionId": 188,
"OutputData": null,
"Status": "InProgress",
"ReviewStatus": "None",
"ReviewerUserId": null,
"Key": "1c632cc1-44ab-4624-bace-6fbb5fd1c0cd",
"Reference": "ActivityDescription",
"ProcessingExceptionType": null,
"DueDate": null,
"Priority": "High",
"DeferDate": null,
"StartProcessing": "2018-03-07T15:05:05.113Z",
"EndProcessing": null,
"SecondsInPreviousAttempts": 0,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"Description\":\"Checks if Stop was triggered in UiPath Orchestrator.\"}}",
"CreationTime": "2018-03-05T18:39:16.06Z",
"Progress": null,
"RowVersion": "AAAAAABC3aA=",
"Id": 1048065,
"ProcessingException": null,
"SpecificContent": {
"Description": "Checks if Stop was triggered in UiPath Orchestrator."
},
"Output": null,
"Robot": {
"LicenseKey": null,
"MachineName": "MBOBOC",
"Name": "DocBot",
"Username": "UIPATH\\MADALINA.BOBOC",
"Description": null,
"Type": "NonProduction",
"Password": null,
"RobotEnvironments": "",
"Id": 749,
"ExecutionSettings": null
}
},
{
"QueueDefinitionId": 188,
"OutputData": null,
"Status": "InProgress",
"ReviewStatus": "None",
"ReviewerUserId": null,
"Key": "7dfa834b-8398-476e-bd18-b0fa51d4ddf6",
"Reference": "ActivityDescription",
"ProcessingExceptionType": null,
"DueDate": null,
"Priority": "High",
"DeferDate": null,
"StartProcessing": "2018-03-07T15:05:04.503Z",
"EndProcessing": null,
"SecondsInPreviousAttempts": 0,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"Description\":\"Sets the status of a transaction item to Failed or Successful.\"}}",
"CreationTime": "2018-03-05T18:39:15.627Z",
"Progress": null,
"RowVersion": "AAAAAABC3Z8=",
"Id": 1048064,
"ProcessingException": null,
"SpecificContent": {
"Description": "Sets the status of a transaction item to Failed or Successful."
},
"Output": null,
"Robot": {
"LicenseKey": null,
"MachineName": "MBOBOC",
"Name": "DocBot",
"Username": "UIPATH\\MADALINA.BOBOC",
"Description": null,
"Type": "NonProduction",
"Password": null,
"RobotEnvironments": "",
"Id": 749,
"ExecutionSettings": null
}
}
]
}
特定の項目のコメントを取得する
以下の例では、ID が 1050204 のキュー アイテムのすべてのコメントを、作成順に昇順で表示します。
GET
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/QueueItemComments/UiPath.Server.Configuration.OData.GetQueueItemCommentsHistory(queueItemId=1050204)?$orderby=CreationTime%20desc
要求ヘッダー
| キー | 値 (Value) |
|---|---|
| 認可 | Bearer |
応答コード
200 OK
応答本文
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItemComments",
"@odata.count": 2,
"value": [
{
"Text": "needs review asap",
"QueueItemId": 1050204,
"CreationTime": "2018-03-08T13:41:49.167Z",
"UserId": 583,
"UserName": "admin",
"Id": 320
},
{
"Text": "fixed. excel hiccup.",
"QueueItemId": 1050204,
"CreationTime": "2018-03-08T13:46:48.613Z",
"UserId": 901,
"UserName": "dragomirmir",
"Id": 321
}
]
}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItemComments",
"@odata.count": 2,
"value": [
{
"Text": "needs review asap",
"QueueItemId": 1050204,
"CreationTime": "2018-03-08T13:41:49.167Z",
"UserId": 583,
"UserName": "admin",
"Id": 320
},
{
"Text": "fixed. excel hiccup.",
"QueueItemId": 1050204,
"CreationTime": "2018-03-08T13:46:48.613Z",
"UserId": 901,
"UserName": "dragomirmir",
"Id": 321
}
]
}
- アイテムの履歴を表示する
- 要求ヘッダー
- 応答コード
- 応答本文
- 特定のキューの平均実行時間を取得する
- 応答コード
- 応答本文
- キュー アイテムのレビュー担当者を変更する
- 要求ヘッダー
- 要求本文
- 応答コード
- 応答本文
- 指定したレビュー ステータスのキュー アイテムを取得する
- 要求ヘッダー
- 応答コード
- 応答本文
- キュー アイテムを追加する
- 要求ヘッダー
- 要求本文
- 応答コード
- 応答本文
- Validation error details
- 複数のキュー アイテムを追加する
- 成功した要求
- 失敗した要求
- トランザクションをステータスとロボット ID に従って取得する
- 要求ヘッダー
- 応答コード
- 応答本文
- 特定の項目のコメントを取得する
- 要求ヘッダー
- 応答コード
- 応答本文