From 1135108877b9b6a7e2133a868e1081c0c40c6616 Mon Sep 17 00:00:00 2001 From: Xie Yifan Date: Wed, 28 Feb 2024 04:49:11 +0800 Subject: [PATCH] [YUNIKORN-2315] Update REST API docs with changes from YUNIKORN-2235 (#390) Closes: #390 Signed-off-by: Chia-Ping Tsai --- docs/api/scheduler.md | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/docs/api/scheduler.md b/docs/api/scheduler.md index 4517603ac3b..1ab0c644ce5 100644 --- a/docs/api/scheduler.md +++ b/docs/api/scheduler.md @@ -271,6 +271,28 @@ For the default queue hierarchy (only `root.default` leaf queue exists) a simila ## Applications +### Partition applications + +Fetch all Applications for the given Partition/State combination and displays general information about the applications like used resources, queue name, submission time and allocations. +Only following application states are allowed: active, rejected, completed. Active is a fake state that represents all application states except completed and rejected. +For active state, can narrow the result by status query parameters(case-insensitive). For example, can fetch `Running` applications for the default partition by +`/ws/v1/partition/default/applications/active?status=running`. + +**URL** : `/ws/v1/partition/:partition/applications/:state` + +**Method** : `GET` + +**Auth required** : NO + +### Success response + +**Code** : `200 OK` + +**Content examples** + +The content of the application object is the same as Queue Applications. See + [Queue Applications](#queue-applications) for details. + ### Queue applications Fetch all Applications for the given Partition/Queue combination and displays general information about the applications like used resources, queue name, submission time and allocations. @@ -533,11 +555,11 @@ In the example below there are three allocations belonging to two applications, ## Application -### Queue application +### Partition/Queue application -Fetch an Application given a Partition, Queue and Application ID and displays general information about the application like used resources, queue name, submission time and allocations. +Fetch an Application given a Partition, Queue(optional) and Application ID and displays general information about the application like used resources, queue name, submission time and allocations. -**URL** : `/ws/v1/partition/{partitionName}/queue/{queueName}/application/{appId}` +**URL** : `/ws/v1/partition/{partitionName}/application/{appId}` or `/ws/v1/partition/{partitionName}/queue/{queueName}/application/{appId}` **Method** : `GET`