Skip to content

Commit

Permalink
[YUNIKORN-2217] Add Missing REST Endpoint description for batch event…
Browse files Browse the repository at this point in the history
… in documentation (apache#379)

Closes: apache#379

Signed-off-by: Peter Bacsko <[email protected]>
  • Loading branch information
Haser0305 authored and pbacsko committed Jan 26, 2024
1 parent dfd23db commit abeb30e
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions docs/api/scheduler.md
Original file line number Diff line number Diff line change
Expand Up @@ -2044,3 +2044,74 @@ None
### Error response

**Code**: `400 Bad Request`


## Batch Events

Endpoint is used to retrieve a batch of event records.

**URL**: `/ws/v1/events/batch`

**METHOD** : `GET`

**Auth required** : NO

**URL query parameters** :
- `count` (optional) : Specifies the maxmem number of events to be included in the response.
- `start` (optional) : Specifies the starting ID for retrieving events. If the specified ID is outside the ring buffer
(too low or too high), the response will include the lowest and highest ID values with `EventRecords` being empty.


### Success response

**Code**: `200 OK`

**Content examples**

```json
{
"InstanceUUID": "400046c6-2180-41a2-9be1-1c251ab2c498",
"LowestID": 0,
"HighestID": 7,
"EventRecords": [
{
"type": 3,
"objectID": "yk8s-worker",
"message": "schedulable: true",
"timestampNano": 1701347180239597300,
"eventChangeType": 1,
"eventChangeDetail": 302,
"resource": {}
},
{
"type": 3,
"objectID": "yk8s-worker",
"message": "Node added to the scheduler",
"timestampNano": 1701347180239650600,
"eventChangeType": 2,
"resource": {
"resources": {
"ephemeral-storage": {
"value": 502921060352
},
"hugepages-1Gi": {},
"hugepages-2Mi": {},
"memory": {
"value": 33424998400
},
"pods": {
"value": 110
},
"vcore": {
"value": 8000
}
}
}
}
]
}
```

### Error response

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

0 comments on commit abeb30e

Please sign in to comment.