- 基本情報
- 認証
- Swagger の定義
- Orchestrator API
- プラットフォーム管理 API

Orchestrator API ガイド
キュー アイテムの要求
/QueueItems エンドポイントは、キューがリンクされているすべてのフォルダーでキュー アイテムが繰り返されるたびにカウントされ、DTO が返されます。たとえば、3 つのフォルダーにリンクされているキューにキュー アイテムが 1 つ存在する場合、返されるキュー アイテムとカウントの数は 3 (1x3) です。特定のフォルダーの結果を取得するには、 X-UiPath-OrganizationUnitId ヘッダーを使用します。
SpecificContent の値をキュー アイテムから削除する
/odata/QueueItems({key}) エンドポイントに次の PUT 要求を使用すると、指定したキュー アイテムの特定の内容を {key} で指定して削除できます。
ステータスが [成功]、[削除済み]、または [ リトライ 済み] のキュー アイテムの特定のコンテンツも削除できるようになりました。
API エンドポイント
PUT https://{yourDomain}/odata/QueueItems({Id})
特定の内容を削除するには、対応する値を NULL または空に設定する必要がありますが、ペイロード内の他の値はすべて [成功] ステートの値と一致します。つまり、内容は削除されますが、他の要求パラメーターはすべて同じままです。
PUT 要求パラメーターの値を確認するには、GET 要求を /odata/QueueItems に送信します。応答には、テナント内のすべてのキュー アイテムが表示されます。
目的のキュー アイテムを特定し、次のパラメーターの値をコピーします。
- "OrganizationUnitId": キュー アイテムを含むフォルダーの ID です。
- "ID": キュー アイテムの ID です。必ず、ステータスが [成功] のキュー アイテムを選択してください。
2 番目の GET 要求を /odata/QueueItems({Id}) に送信します。{Id} は、前の GET 呼び出しからコピーしたキュー アイテム ID に置き換えます。応答には、目的のキュー アイテムのデータが表示されます。以下のパラメーターの値をコピーします。
- "Name": サンプル要求で
{the_Name_from_the_GET_response}を置き換えます。 - "Priority": サンプル要求で
{the_Priority_from_the_GET_response}を置き換えます。 - "DeferDate": サンプル要求で
{the_DeferDate_from_the_GET_response}を置き換えます。 - "DueDate": サンプル要求で
{the_DueDate_from_the_GET_response}を置き換えます。 - "RiskSlaDate": サンプル要求で
{the_RiskSlaDate_from_the_GET_response}を置き換えます。 - "Reference": サンプル要求で
{the_Reference_from_the_GET_response}を置き換えます。 - "Progress": サンプル要求で
{the_Progress_from_the_GET_response}を置き換えます。注:上記のパラメーター値を使用して、PUT 要求本文を設定します。
要求ヘッダー
--header 'Authorization: Bearer {access_token}'\)\)
--header 'Content-Type: application/json' \)\)
--header 'X-UIPATH-OrganizationUnitId: {the_ID_of_the_folder_that_contains_the_queue_item}' \)
--header 'Authorization: Bearer {access_token}'\)\)
--header 'Content-Type: application/json' \)\)
--header 'X-UIPATH-OrganizationUnitId: {the_ID_of_the_folder_that_contains_the_queue_item}' \)
パス パラメーター
| パラメーター | データ型 | 説明 |
|---|---|---|
Id (必須) | 文字列 | 特定の内容を削除するキュー アイテムの ID です。 |
要求本文
要求本文には、更新するキュー アイテムの情報 (名前、優先度、参照など) が含まれます。
このユース ケースでは、'SpecificContent' キーの値のみを更新する必要があります。
{
"Name": "{queue_name}", // String, the_name_of_the_container_queue
"Priority": "{the_Priority_from_the_GET_response}",//String
"SpecificContent": {}, // or NULL
"DeferDate": "{the_DeferDate_from_the_GET_response}", // 2022-02-17T13:27:43.895Z
"DueDate": "{the_DueDate_from_the_GET_response}", // 2022-02-17T13:27:43.895Z
"RiskSlaDate": "{the_RiskSlaDate_from_the_GET_response}", // 2022-02-17T13:27:43.895Z
"Reference": "{the_Reference_from_the_GET_response}", // String
"Progress": "{the_Progress_from_the_GET_response}" // String
}
{
"Name": "{queue_name}", // String, the_name_of_the_container_queue
"Priority": "{the_Priority_from_the_GET_response}",//String
"SpecificContent": {}, // or NULL
"DeferDate": "{the_DeferDate_from_the_GET_response}", // 2022-02-17T13:27:43.895Z
"DueDate": "{the_DueDate_from_the_GET_response}", // 2022-02-17T13:27:43.895Z
"RiskSlaDate": "{the_RiskSlaDate_from_the_GET_response}", // 2022-02-17T13:27:43.895Z
"Reference": "{the_Reference_from_the_GET_response}", // String
"Progress": "{the_Progress_from_the_GET_response}" // String
}
要求の例
API 呼び出しの構築に必要な情報をすべて収集したとします。
キュー アイテムのOrganizationUnitIdとIdの値を取得する
フォルダー ID とキュー アイテム ID を確認するには、/odata/QueueItems エンドポイントに GET 要求を送信します。
curl --location --request GET '{OrchestratorURL}/odata/QueueItems' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
curl --location --request GET '{OrchestratorURL}/odata/QueueItems' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
受信する応答のサンプルを以下に示します。
{
"value": [
{
"QueueDefinitionId": 29200,
"OutputData": "{\"DynamicProperties\":{\"Prop1\":\"run\"}}",
"AnalyticsData": null,
"Status": "New",
"ReviewStatus": "None",
"ReviewerUserId": null,
"Key": "bc4e8fac-dc4b-4f77-8f20-13590e19ff26",
"Reference": null,
"ProcessingExceptionType": null,
"DueDate": null,
"RiskSlaDate": null,
"Priority": "Normal",
"DeferDate": null,
"StartProcessing": "2022-02-16T15:30:12.13Z",
"EndProcessing": "2022-02-16T15:30:12.46Z",
"SecondsInPreviousAttempts": 0,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"Prop2\":\"accelerate\"}}",
"CreationTime": "2022-02-16T15:30:11.753Z",
"Progress": null,
"RowVersion": "AAAAAAB2liA=",
"OrganizationUnitId": 62516,
"OrganizationUnitFullyQualifiedName": "Banana",
"Id": 3255808,
"ProcessingException": null,
"SpecificContent": {
"Prop2": "Test demo"
},
"Output": {
"Prop1": "vgdfdf"
},
"Analytics": null
},
// other queue items data
{
"QueueDefinitionId": 3899,
"OutputData": null,
"AnalyticsData": null,
"Status": "Successful",
"ReviewStatus": "None",
"ReviewerUserId": null,
"Key": "6ea50a9c-b657-4df3-bfe6-d1893c4f31ec",
"Reference": "82086",
"ProcessingExceptionType": null,
"DueDate": null,
"RiskSlaDate": "2022-02-17T13:27:43.895Z",
"Priority": "High",
"DeferDate": null,
"StartProcessing": null,
"EndProcessing": null,
"SecondsInPreviousAttempts": 0,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"EmployeeName\":\"John Kensington\",\"ContactNumber\":\"+4457899\",\"RelocationDistance\":500,\"Description\":\"Home relocation\",\"ExpenseCode\":\"UI234\",\"Amount\":1000,\"RequirePass\":true}}",
"CreationTime": "2021-03-19T17:37:35.893Z",
"Progress": null,
"RowVersion": "AAAAAABQET4=",
"OrganizationUnitId": 39419,
"OrganizationUnitFullyQualifiedName": "Shared",
"Id": 2499339,
"ProcessingException": null,
"SpecificContent": {
"EmployeeName": "John Kensington",
"ContactNumber": "+4457899",
"RelocationDistance": 500,
"Description": "Home relocation",
"ExpenseCode": "UI234",
"Amount": 1000,
"RequirePass": true
},
"Output": null,
"Analytics": null
}
]
}
{
"value": [
{
"QueueDefinitionId": 29200,
"OutputData": "{\"DynamicProperties\":{\"Prop1\":\"run\"}}",
"AnalyticsData": null,
"Status": "New",
"ReviewStatus": "None",
"ReviewerUserId": null,
"Key": "bc4e8fac-dc4b-4f77-8f20-13590e19ff26",
"Reference": null,
"ProcessingExceptionType": null,
"DueDate": null,
"RiskSlaDate": null,
"Priority": "Normal",
"DeferDate": null,
"StartProcessing": "2022-02-16T15:30:12.13Z",
"EndProcessing": "2022-02-16T15:30:12.46Z",
"SecondsInPreviousAttempts": 0,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"Prop2\":\"accelerate\"}}",
"CreationTime": "2022-02-16T15:30:11.753Z",
"Progress": null,
"RowVersion": "AAAAAAB2liA=",
"OrganizationUnitId": 62516,
"OrganizationUnitFullyQualifiedName": "Banana",
"Id": 3255808,
"ProcessingException": null,
"SpecificContent": {
"Prop2": "Test demo"
},
"Output": {
"Prop1": "vgdfdf"
},
"Analytics": null
},
// other queue items data
{
"QueueDefinitionId": 3899,
"OutputData": null,
"AnalyticsData": null,
"Status": "Successful",
"ReviewStatus": "None",
"ReviewerUserId": null,
"Key": "6ea50a9c-b657-4df3-bfe6-d1893c4f31ec",
"Reference": "82086",
"ProcessingExceptionType": null,
"DueDate": null,
"RiskSlaDate": "2022-02-17T13:27:43.895Z",
"Priority": "High",
"DeferDate": null,
"StartProcessing": null,
"EndProcessing": null,
"SecondsInPreviousAttempts": 0,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"EmployeeName\":\"John Kensington\",\"ContactNumber\":\"+4457899\",\"RelocationDistance\":500,\"Description\":\"Home relocation\",\"ExpenseCode\":\"UI234\",\"Amount\":1000,\"RequirePass\":true}}",
"CreationTime": "2021-03-19T17:37:35.893Z",
"Progress": null,
"RowVersion": "AAAAAABQET4=",
"OrganizationUnitId": 39419,
"OrganizationUnitFullyQualifiedName": "Shared",
"Id": 2499339,
"ProcessingException": null,
"SpecificContent": {
"EmployeeName": "John Kensington",
"ContactNumber": "+4457899",
"RelocationDistance": 500,
"Description": "Home relocation",
"ExpenseCode": "UI234",
"Amount": 1000,
"RequirePass": true
},
"Output": null,
"Analytics": null
}
]
}
[成功] のキュー アイテムを特定し、次の値をコピーします。
- "OrganizationUnitId" : 39419
- "Id": 2499339
目的のキュー アイテムのデータを取得する
/odata/QueueItems({Id}) エンドポイントに GET 要求を送信します。
- {Id} は、先ほど確認した ID の値 (2499339) に置き換えます。
X-UIPATH-OrganizationUnitId要求ヘッダーを使用して、先ほど確認した OrganizationUnitId の値 (39419) を入力します。curl --location --request GET '{OrchestratorURL}/odata/QueueItems(2499339)' \ --header 'Authorization: Bearer 1234' \ --header 'Content-Type: application/json' \ --header 'X-UIPATH-OrganizationUnitId: 39419'curl --location --request GET '{OrchestratorURL}/odata/QueueItems(2499339)' \ --header 'Authorization: Bearer 1234' \ --header 'Content-Type: application/json' \ --header 'X-UIPATH-OrganizationUnitId: 39419'
受信する応答のサンプルを以下に示します。
{
"QueueDefinitionId": 3899,
"OutputData": null,
"AnalyticsData": null,
"Status": "Successful",
"ReviewStatus": "None",
"ReviewerUserId": null,
"Key": "6ea50a9c-b657-4df3-bfe6-d1893c4f31ec",
"Reference": "82086",
"ProcessingExceptionType": null,
"DueDate": null,
"RiskSlaDate": "2022-02-17T13:27:43.895Z",
"Priority": "High",
"DeferDate": null,
"StartProcessing": null,
"EndProcessing": null,
"SecondsInPreviousAttempts": 0,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"EmployeeName\":\"John Kensington\",\"ContactNumber\":\"+4457899\",\"RelocationDistance\":500,\"Description\":\"Home relocation\",\"ExpenseCode\":\"UI234\",\"Amount\":1000,\"RequirePass\":true}}",
"CreationTime": "2021-03-19T17:37:35.893Z",
"Progress": null,
"RowVersion": "AAAAAABQET4=",
"OrganizationUnitId": 39419,
"OrganizationUnitFullyQualifiedName": null,
"Id": 2499339,
"ProcessingException": null,
"SpecificContent": {
"EmployeeName": "John Kensington",
"ContactNumber": "+4457899",
"RelocationDistance": 500,
"Description": "Home relocation",
"ExpenseCode": "UI234",
"Amount": 1000,
"RequirePass": true
},
"Output": null,
"Analytics": null
}
{
"QueueDefinitionId": 3899,
"OutputData": null,
"AnalyticsData": null,
"Status": "Successful",
"ReviewStatus": "None",
"ReviewerUserId": null,
"Key": "6ea50a9c-b657-4df3-bfe6-d1893c4f31ec",
"Reference": "82086",
"ProcessingExceptionType": null,
"DueDate": null,
"RiskSlaDate": "2022-02-17T13:27:43.895Z",
"Priority": "High",
"DeferDate": null,
"StartProcessing": null,
"EndProcessing": null,
"SecondsInPreviousAttempts": 0,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{\"EmployeeName\":\"John Kensington\",\"ContactNumber\":\"+4457899\",\"RelocationDistance\":500,\"Description\":\"Home relocation\",\"ExpenseCode\":\"UI234\",\"Amount\":1000,\"RequirePass\":true}}",
"CreationTime": "2021-03-19T17:37:35.893Z",
"Progress": null,
"RowVersion": "AAAAAABQET4=",
"OrganizationUnitId": 39419,
"OrganizationUnitFullyQualifiedName": null,
"Id": 2499339,
"ProcessingException": null,
"SpecificContent": {
"EmployeeName": "John Kensington",
"ContactNumber": "+4457899",
"RelocationDistance": 500,
"Description": "Home relocation",
"ExpenseCode": "UI234",
"Amount": 1000,
"RequirePass": true
},
"Output": null,
"Analytics": null
}
以下の値をコピーします。
- "Priority" : "High"
- "DeferDate" : null
- "DueDate" : null
- "RiskSlaDate": "2022-02-17T13:27:43.895Z"
- "Reference" : "82086"
- "Progress" : null
SpecificContent値を削除する
次のような PUT 要求を送信します。
curl --location --request PUT '{OrchestratorURL}/odata/QueueItems(2499339)' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--header 'X-UIPATH-OrganizationUnitId: 39419'\
--data-raw '{
"Name": " Queue Demo",
"Priority": "High",
"SpecificContent": {},
"DeferDate": null,
"DueDate": null,
"RiskSlaDate": "2022-02-17T13:27:43.895Z",
"Reference": "82086",
"Progress": null
}'
curl --location --request PUT '{OrchestratorURL}/odata/QueueItems(2499339)' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--header 'X-UIPATH-OrganizationUnitId: 39419'\
--data-raw '{
"Name": " Queue Demo",
"Priority": "High",
"SpecificContent": {},
"DeferDate": null,
"DueDate": null,
"RiskSlaDate": "2022-02-17T13:27:43.895Z",
"Reference": "82086",
"Progress": null
}'
SpecificContent パラメーターのみが NULL または空の値を持つことによって変更されますが、残りの値は GET 応答の値と一致します。
Orchestrator の UI では、この変更は対応するトランザクション ID のトランザクションの詳細情報に表示されます。
図 1. トランザクションの詳細

キュー アイテムをエクスポートする
このアクションでは、さまざまなエンドポイントを呼び出す必要があります。
このエンドポイントは、各テナントで 1 日あたり 100 件の API 要求に制限されます。
- エクスポートを開始するには、
POST https://{yourDomain}//odata/QueueDefinitionsを呼び出します。必要に応じてフィルターを追加します。
要求本文は次のようになります。
POST https://{yourDomain}/odata/QueueDefinitions(27965)/UiPathODataSvc.Export?$filter=((QueueDefinitionId%20eq%2027965))&$expand=Robot,ReviewerUser HTTP/1.1
Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
X-Uipath-Organizationunitid: 770643
Content-Length: 0
POST https://{yourDomain}/odata/QueueDefinitions(27965)/UiPathODataSvc.Export?$filter=((QueueDefinitionId%20eq%2027965))&$expand=Robot,ReviewerUser HTTP/1.1
Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
X-Uipath-Organizationunitid: 770643
Content-Length: 0
応答には、後続の手順で必要な ID が含まれます。
{"@odata.context":"https://{yourDomain}/odata/$metadata#Exports/$entity","Id":8657,"Name":"MyQueue12345-items","Type":"Queues","Status":"New","RequestedAt":"2024-01-15T07:38:21.8891311Z","ExecutedAt":null,"Size":null}
{"@odata.context":"https://{yourDomain}/odata/$metadata#Exports/$entity","Id":8657,"Name":"MyQueue12345-items","Type":"Queues","Status":"New","RequestedAt":"2024-01-15T07:38:21.8891311Z","ExecutedAt":null,"Size":null}
GET https://{yourDomain}/orchestrator_/odata/Exports(8657)を呼び出して要求の状態を取得します。角かっこで囲まれたテキストは、手順 1 で返された ID です。
要求本文は次のようになります。
GET https://{yourDomain}/odata/Exports(8657) HTTP/1.1
Host: alpha.uipath.com
Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
X-Uipath-Organizationunitid: 770643
Cookie: __cf_bm=SGYN6zxyBJpmMFjIxBCC8M2eZUvxXaEFqCiZtbidn00-1705304301-1-AUAOuQBjBD1bJQZXFHnyqzGZuBIyHkMpmedMwLZLMtRuGgsyCAsyTOaM8qVoi1meJ0/lRNX6BUZUfV7fWYZc43E=
GET https://{yourDomain}/odata/Exports(8657) HTTP/1.1
Host: alpha.uipath.com
Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
X-Uipath-Organizationunitid: 770643
Cookie: __cf_bm=SGYN6zxyBJpmMFjIxBCC8M2eZUvxXaEFqCiZtbidn00-1705304301-1-AUAOuQBjBD1bJQZXFHnyqzGZuBIyHkMpmedMwLZLMtRuGgsyCAsyTOaM8qVoi1meJ0/lRNX6BUZUfV7fWYZc43E=
応答が完了するまで待ちます。
{"@odata.context":"https://{yourDomain}/odata/$metadata#Exports/$entity","Id":8657,"Name":"MyQueue12345-items","Type":"Queues","Status":"Completed","RequestedAt":"2024-01-15T07:37:02.783Z","ExecutedAt":"2024-01-15T07:37:05.553Z","Size":203226}
{"@odata.context":"https://{yourDomain}/odata/$metadata#Exports/$entity","Id":8657,"Name":"MyQueue12345-items","Type":"Queues","Status":"Completed","RequestedAt":"2024-01-15T07:37:02.783Z","ExecutedAt":"2024-01-15T07:37:05.553Z","Size":203226}
GET https://{yourDomain}/odata/Exports(8657)/UiPath.Server.Configuration.OData.GetDownloadLinkを呼び出してダウンロード リンクを取得します。かっこで囲まれたテキストは、手順 1 で返された ID です。
要求本文は次のようになります。
GET https://{yourDomain}/odata/Exports(8657)/UiPath.Server.Configuration.OData.GetDownloadLink HTTP/1.1
Host: alpha.uipath.com
Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
X-Uipath-Organizationunitid: 770643
Cookie: __cf_bm=SGYN6zxyBJpmMFjIxBCC8M2eZUvxXaEFqCiZtbidn00-1705304301-1-AUAOuQBjBD1bJQZXFHnyqzGZuBIyHkMpmedMwLZLMtRuGgsyCAsyTOaM8qVoi1meJ0/lRNX6BUZUfV7fWYZc43E=
GET https://{yourDomain}/odata/Exports(8657)/UiPath.Server.Configuration.OData.GetDownloadLink HTTP/1.1
Host: alpha.uipath.com
Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
X-Uipath-Organizationunitid: 770643
Cookie: __cf_bm=SGYN6zxyBJpmMFjIxBCC8M2eZUvxXaEFqCiZtbidn00-1705304301-1-AUAOuQBjBD1bJQZXFHnyqzGZuBIyHkMpmedMwLZLMtRuGgsyCAsyTOaM8qVoi1meJ0/lRNX6BUZUfV7fWYZc43E=
応答には、データの CSV エクスポートを取得するために使用できる URI が含まれています。
{"@odata.context":"https://{yourDomain}/odata/$metadata#UiPath.Server.Configuration.OData.BlobFileAccessDto","Uri":"<Download URI>","Verb":"GET","RequiresAuth":false,"Headers":{"Keys":[],"Values":[]}}
{"@odata.context":"https://{yourDomain}/odata/$metadata#UiPath.Server.Configuration.OData.BlobFileAccessDto","Uri":"<Download URI>","Verb":"GET","RequiresAuth":false,"Headers":{"Keys":[],"Values":[]}}
- 手順 3 で返された URI に GET 要求を送信します。これにより、CSV エクスポートのダウンロードがトリガーされます。形式と命名規則について詳しくは、ユーザー ガイドの「 エクスポートされるレポート 」をご覧ください。