Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YUNIKORN-2655] Cleanup REST API documentation #449

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: .."
}
```
172 changes: 37 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.
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 Application not found)
chenyulin0719 marked this conversation as resolved.
Show resolved Hide resolved

**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 @@ -1705,6 +1621,9 @@ yunikorn_scheduler_vcore_nodes_usage{range="(80%,90%]"} 0
yunikorn_scheduler_vcore_nodes_usage{range="(90%,100%]"} 0
yunikorn_scheduler_vcore_nodes_usage{range="[0,10%]"} 0
```
### Error response

**Code** : `500 Internal Server Error`
chenyulin0719 marked this conversation as resolved.
Show resolved Hide resolved

## Configuration validation

Expand Down Expand Up @@ -1892,16 +1811,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 +1856,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 +2080,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`