- ケースアプリ API
- CaseApp の要求
CaseApp の要求
API endpoints for triggering ad-hoc case tasks, closing case instances, and listing available ad-hoc tasks through the CaseApp v3 API.
アドホック ケース タスクをトリガーする
実行中の Maestro Case インスタンスで、ケース プラン名で識別される、手動でトリガーする (アドホック) タスクを 1 つトリガーします。
POST
{AutomationCloudURL}/{organizationName}/{tenantName}/pims_/api/v3/caseapp/instances/{instanceId}/tasks/trigger
要求ヘッダー
| キー | 値 (Value) |
|---|---|
| 認可 | Bearer |
| X-UIPATH-FolderKey | ケース インスタンスのフォルダー キーです |
要求本文
| フィールド | 入力 | Required | 説明 |
|---|---|---|---|
| taskName | string | はい | トリガーするアドホック タスクの名前です。ケース プランで解決される名前とまったく同じです。一致では大文字と小文字が区別されます。 |
| タスク入力 | object | いいえ | 自由形式の JSON オブジェクトが、入れ子になったペイロードとしてトリガーされたタスクに逐語的に転送されます。たとえば、承認の参照や意思決定データなどです。このペイロードは解釈もスキーマ検証も行わず、タスクの宣言された入力にバインドされません。 |
{
"taskName": "string",
"taskInput": {}
}
{
"taskName": "string",
"taskInput": {}
}
応答コード
200成功(空の本体)
エラー応答
| コード | 意味 |
|---|---|
| 400 | 要求本文が見つからないか、無効です。 |
| 401 | 呼び出し元は認証されていません。 |
| 403 | 呼び出し元には、このタスクに必要なアクセス許可がありません。 |
| 404 | ケース インスタンスが存在しないか、同じ名前のアドホック タスクがケース プランに存在しません。エントリ条件が「アドホック」のタスクのみが対象となります。それ以外の名前では 404 が返されます。 |
| 500 | 予期しないサーバー エラーが発生していました。 |
権限
要求されたタスクを所有するステージの範囲で承認された Cases.RunAdhocTasks 権限が必要です。
ケース インスタンスを閉じる
実行中の Maestro Case インスタンスを閉じます。
POST
{AutomationCloudURL}/{organizationName}/{tenantName}/pims_/api/v3/caseapp/instances/{instanceId}/close
要求ヘッダー
| キー | 値 (Value) |
|---|---|
| 認可 | Bearer |
| X-UIPATH-FolderKey | ケース インスタンスのフォルダー キーです |
応答コード
| コード | 意味 |
|---|---|
| 200 | インスタンスは Cancelingに移行します。作業者がシフトを完了して、非同期に Cancelled します。すでにターミナルにあるインスタンスは、現在のステータスを変更せずに返します。 |
| 400 | インスタンスはすでに Completed に達しているため、キャンセルできません。 |
| 401 | 呼び出し元は認証されていません。 |
| 403 | 呼び出し元には、このインスタンスに必要な権限がありません。 |
| 404 | インスタンス ID がケース インスタンスに解決されません。 |
権限
Cases.Close ペルソナの付与が必要です。
List the ad-hoc tasks you can run on a case
Lists the ad-hoc tasks a caller is permitted to trigger on a case instance, grouped by the stage that owns each task.
GET
{AutomationCloudURL}/{organizationName}/{tenantName}/pims_/api/v3/caseapp/instances/{instanceId}/tasks/adhoc
要求ヘッダー
| キー | 値 (Value) |
|---|---|
| 認可 | Bearer |
| X-UIPATH-FolderKey | ケース インスタンスのフォルダー キーです |
応答本文
Returns the ad-hoc tasks the caller can trigger, grouped by the stage that owns them. Stages without a task the caller can trigger are omitted, so an empty stages list means the caller can't trigger any task on this case.
| フィールド | 入力 | 説明 |
|---|---|---|
| stages | 配列 | The stages that contain at least one task the caller can trigger. |
| stages[].stageId | string | The stage's case plan node ID. Can be null. |
| stages[].stageLabel | string | The stage's label in the case plan. |
| stages[].tasks | 配列 | The stage's ad-hoc tasks, in case plan order. |
| stages[].tasks[].taskName | string | The task's name, to pass as taskName when calling Trigger an ad-hoc case task. Matching is case-sensitive. |
| stages[].tasks[].taskId | string | The task's case plan node ID. Can be null. The trigger endpoint doesn't accept it. |
{
"stages": [
{
"stageId": "string",
"stageLabel": "string",
"tasks": [
{
"taskName": "string",
"taskId": "string"
}
]
}
]
}
{
"stages": [
{
"stageId": "string",
"stageLabel": "string",
"tasks": [
{
"taskName": "string",
"taskId": "string"
}
]
}
]
}
A listed task is one the caller is authorized to trigger, but the trigger can still fail. For example, triggering a task on a completed case returns 404.
応答コード
| コード | 意味 |
|---|---|
| 200 | The list was returned. It can be empty. |
| 400 | The X-UIPATH-FolderKey header is missing or invalid. |
| 401 | 呼び出し元は認証されていません。 |
| 403 | The caller has no Cases.RunAdhocTasks grant related to this case. |
| 404 | The instance doesn't exist in the folder specified in X-UIPATH-FolderKey, or it isn't a case instance. |
| 500 | The case plan couldn't be read, or an unexpected server error occurred. |
権限
Requires the Cases.RunAdhocTasks permission, authorized at the scope of the stage that owns each listed task.