Orchestrator
2022.4
バナーの背景画像
Orchestrator API ガイド
最終更新日 2023年11月10日

キュー アイテムの要求

重要:
/QueueItems キューがリンクされているすべてのフォルダーでキュー アイテムが繰り返されるたびに、エンドポイントがカウントされ、DTO が返されます。たとえば、3 つのフォルダーにリンクされているキューにキュー アイテムが 1 つ存在する場合、返されるキュー アイテムとカウントの数は 3 (1x3) です。
特定のフォルダーの結果を取得するには、X-UiPath-OrganizationUnitId ヘッダーを使用します。

SpecificContent の値をキュー アイテムから削除する

/odata/QueueItems({key}) エンドポイントに次の PUT 要求を使用すると、指定したキュー アイテムの特定の内容を {key} で指定して削除できます。
重要: ステータスが [成功][削除済み][リトライ済み] のキュー アイテムの特定の内容も削除できるようになりました。

API エンドポイント

PUT /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
}'
注: NULL または空の値を設定すると SpecificContent パラメーターだけが変更され、残りの値は GET 応答の値と一致することに注意してください。

Orchestrator の UI では、この変更は対応するトランザクション ID のトランザクションの詳細情報に表示されます。



Was this page helpful?

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