Skip to content

Commit

Permalink
[YUNIKORN-2655] Cleanup REST API documentation (#449)
Browse files Browse the repository at this point in the history
Closes: #449

Signed-off-by: Chia-Ping Tsai <[email protected]>
  • Loading branch information
ryankert01 authored and chia7712 committed Jul 8, 2024
1 parent aae16d2 commit f683d66
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 145 deletions.
10 changes: 0 additions & 10 deletions docs/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,3 @@ As an example, here is a response from a cluster with 1 resource manager.
### Error response

**Code** : `500 Internal Server Error`

**Content examples**

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```
169 changes: 34 additions & 135 deletions docs/api/scheduler.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,7 @@ Returns general information and statistics about a partition.

**Code** : `500 Internal Server Error`

**Content examples**

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```

## PlacementRules

Expand Down Expand Up @@ -299,17 +291,11 @@ For the default queue hierarchy (only `root.default` leaf queue exists) a simila

### Error response

**Code** : `500 Internal Server Error`
**Code** : `400 Bad Request` (URL query is invalid, missing partition name)

**Content examples**
**Code** : `404 Not Found` (Partition not found)

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```
**Code** : `500 Internal Server Error`

## Applications

Expand All @@ -335,6 +321,14 @@ For active state, can narrow the result by status query parameters(case-insensit
The content of the application object is the same as Queue Applications. See
[Queue Applications](#queue-applications) for details.

### Error Response

**Code** : `400 Bad Request` (URL query is invalid)

**Code** : `404 Not Found` (Partition not found)

**Code** : `500 Internal Server Error`

### 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. In case the queue name contains any special characters, it needs to be url escaped to avoid issues.
Expand Down Expand Up @@ -575,17 +569,12 @@ In the example below there are three allocations belonging to two applications,

### Error response

**Code** : `500 Internal Server Error`
**Code** : `400 Bad Request` (URL query is invalid)

**Content examples**
**Code** : `404 Not Found` (Partition or Queue not found)

**Code** : `500 Internal Server Error`

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```

## Application

Expand Down Expand Up @@ -733,17 +722,12 @@ Field `uuid` has been deprecated, would be removed from below response in YUNIKO

### Error response

**Code** : `500 Internal Server Error`
**Code** : `400 Bad Request` (URL query is invalid)

**Content examples**
**Code** : `404 Not Found` (Partition or Application not found)

**Code** : `500 Internal Server Error`

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```

## UsersTracker
### Get users usage tracking information
Expand Down Expand Up @@ -840,17 +824,9 @@ Fetch all users usage given a Partition and displays general information about t
```

### Error response
**Code** : `500 Internal Server Error`

**Content examples**
**Code** : `500 Internal Server Error`

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```

## UserTracker
### Get specific user usage tracking information
Expand Down Expand Up @@ -909,17 +885,11 @@ Fetch specific user usage given a Partition and displays general information abo

### Error response

**Code** : `500 Internal Server Error`
**Code** : `400 Bad Request` (URL query is invalid)

**Content examples**
**Code** : `404 Not Found` (User not found)

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```
**Code** : `500 Internal Server Error`

## GroupsTracker
### Get groups usage tracking information
Expand Down Expand Up @@ -1014,15 +984,6 @@ Fetch all groups usage given a Partition and displays general information about

**Code** : `500 Internal Server Error`

**Content examples**

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```

## GroupTracker
### Get specific group usage tracking information
Expand Down Expand Up @@ -1080,17 +1041,11 @@ Fetch specific group usage given a Partition and displays general information ab

### Error response

**Code** : `500 Internal Server Error`
**Code** : `400 Bad Request` (URL query is invalid)

**Content examples**
**Code** : `404 Not Found` (Group not found)

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```
**Code** : `500 Internal Server Error`

## Nodes

Expand Down Expand Up @@ -1296,17 +1251,11 @@ Here you can see an example response from a 2-node cluster having 3 allocations.

### Error response

**Code** : `500 Internal Server Error`
**Code** : `400 Bad Request` (URL query is invalid)

**Content examples**
**Code** : `404 Not Found` (Partition not found)

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```
**Code** : `500 Internal Server Error`

## Node

Expand Down Expand Up @@ -1418,17 +1367,11 @@ Node details include host and rack name, capacity, resources, utilization, and a

### Error response

**Code** : `500 Internal Server Error`
**Code** : `400 Bad Request` (URL query is invalid)

**Content examples**
**Code** : `404 Not Found` (Partition or Node not found)

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```
**Code** : `500 Internal Server Error`

## Node utilization

Expand Down Expand Up @@ -1476,15 +1419,6 @@ Show how every node is distributed with regard to dominant resource utilization.

**Code** : `500 Internal Server Error`

**Content examples**

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```

## Node utilizations

Expand Down Expand Up @@ -1552,15 +1486,6 @@ Show the nodes utilization of different types of resources in a cluster.

**Code** : `500 Internal Server Error`

**Content examples**

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```

## Goroutines info

Expand Down Expand Up @@ -1643,15 +1568,6 @@ created by os/signal.init.0

**Code** : `500 Internal Server Error`

**Content examples**

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```

## Metrics

Expand Down Expand Up @@ -1892,16 +1808,6 @@ Endpoint to retrieve historical data about the number of total applications by t

**Code** : `500 Internal Server Error`

**Content examples**

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```

## Container history

Endpoint to retrieve historical data about the number of total containers by timestamp.
Expand Down Expand Up @@ -1947,15 +1853,6 @@ Endpoint to retrieve historical data about the number of total containers by tim

**Code** : `500 Internal Server Error`

**Content examples**

```json
{
"status_code": 500,
"message": "system error message. for example, json: invalid UTF-8 in string: ..",
"description": "system error message. for example, json: invalid UTF-8 in string: .."
}
```


## Endpoint healthcheck
Expand Down Expand Up @@ -2180,5 +2077,7 @@ The number of active connections is limited. The default setting is 100 connecti
### Error responses

**Code** : `400 Bad Request` (URL query is invalid)

**Code** : `503 Service Unavailable` (Too many active streaming connections)

**Code** : `500 Internal Server Error`

0 comments on commit f683d66

Please sign in to comment.