# Events

Workload events that occurred while the workload was running. Use to diagnose issue around workload scheduling.

## Get the workload events.

> Retrieve all the workload events using a workload id.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.24"},"tags":[{"name":"Events","description":"Workload events that occurred while the workload was running. Use to diagnose issue around workload scheduling."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"WorkloadId":{"name":"workloadId","in":"path","required":true,"description":"The  Universally Unique Identifier (UUID) of the workload.","schema":{"type":"string","format":"uuid"}},"Offset":{"name":"offset","in":"query","required":false,"description":"The offset of the first item returned in the collection.","schema":{"type":"integer","format":"int32"}},"Limit":{"name":"limit","in":"query","required":false,"description":"The maximum number of entries to return.","schema":{"type":"integer","format":"int32","default":50,"minimum":1,"maximum":500}},"EventsSort":{"name":"sortOrder","in":"query","required":false,"description":"Sort results in descending or ascending order.","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}}},"schemas":{"Events":{"type":"array","items":{"$ref":"#/components/schemas/Event2"}},"Event2":{"type":"object","nullable":true,"required":["createdAt","type","clusterId","message"],"properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"message":{"type":"string"},"reason":{"type":"string"},"source":{"type":"string"},"involvedObject":{"$ref":"#/components/schemas/InvolvedObject"}}},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"InvolvedObject":{"type":"object","required":["uid","kind","name","namespace"],"properties":{"uid":{"type":"string","format":"uuid"},"kind":{"type":"string"},"name":{"type":"string"},"namespace":{"type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/workloads/{workloadId}/events":{"get":{"summary":"Get the workload events.","description":"Retrieve all the workload events using a workload id.","operationId":"get_workload_events","tags":["Events"],"parameters":[{"$ref":"#/components/parameters/WorkloadId"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/EventsSort"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"type":"object","required":["events"],"properties":{"next":{"type":"integer"},"events":{"$ref":"#/components/schemas/Events"}}}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get the workload history.

> Retrieve workload history details, including events, using a workload id.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.24"},"tags":[{"name":"Events","description":"Workload events that occurred while the workload was running. Use to diagnose issue around workload scheduling."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"WorkloadId":{"name":"workloadId","in":"path","required":true,"description":"The  Universally Unique Identifier (UUID) of the workload.","schema":{"type":"string","format":"uuid"}},"Offset":{"name":"offset","in":"query","required":false,"description":"The offset of the first item returned in the collection.","schema":{"type":"integer","format":"int32"}},"Limit":{"name":"limit","in":"query","required":false,"description":"The maximum number of entries to return.","schema":{"type":"integer","format":"int32","default":50,"minimum":1,"maximum":500}}},"schemas":{"HistoryRecords1":{"type":"array","items":{"$ref":"#/components/schemas/HistoryRecord1"}},"HistoryRecord1":{"type":"object","required":["meta","spec"],"properties":{"meta":{"$ref":"#/components/schemas/HistoryRecordMeta"},"spec":{"type":"object","properties":{"event":{"$ref":"#/components/schemas/Event2"},"phaseUpdate":{"$ref":"#/components/schemas/PhaseUpdate"}}}}},"HistoryRecordMeta":{"type":"object","required":["creationTimestamp","type"],"properties":{"creationTimestamp":{"type":"string","format":"date-time"},"type":{"$ref":"#/components/schemas/HistoryRecordType"}}},"HistoryRecordType":{"type":"string","enum":["Event","PhaseUpdate"]},"Event2":{"type":"object","nullable":true,"required":["createdAt","type","clusterId","message"],"properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"message":{"type":"string"},"reason":{"type":"string"},"source":{"type":"string"},"involvedObject":{"$ref":"#/components/schemas/InvolvedObject"}}},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"InvolvedObject":{"type":"object","required":["uid","kind","name","namespace"],"properties":{"uid":{"type":"string","format":"uuid"},"kind":{"type":"string"},"name":{"type":"string"},"namespace":{"type":"string"}}},"PhaseUpdate":{"type":"object","nullable":true,"required":["phase","phaseMessage"],"properties":{"phase":{"$ref":"#/components/schemas/Phase"},"phaseMessage":{"type":"string"}}},"Phase":{"type":"string","enum":["Creating","Initializing","Resuming","Pending","Deleting","Running","Updating","Stopped","Stopping","Degraded","Failed","Completed","Terminating","Unknown"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/workloads/{workloadId}/history":{"get":{"summary":"Get the workload history.","description":"Retrieve workload history details, including events, using a workload id.","operationId":"get_workload_history","tags":["Events"],"parameters":[{"$ref":"#/components/parameters/WorkloadId"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"type":"object","required":["records"],"properties":{"next":{"type":"integer"},"records":{"$ref":"#/components/schemas/HistoryRecords1"}}}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get revision events by id.

> Retrieve all the revision events using a revision id. Supported for clusters v2.21+.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.24"},"tags":[{"name":"Events","description":"Workload events that occurred while the workload was running. Use to diagnose issue around workload scheduling."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"RevisionId":{"name":"revisionId","in":"path","required":true,"description":"The  Universally Unique Identifier (UUID) of the revision.","schema":{"type":"string","format":"uuid"}},"Offset":{"name":"offset","in":"query","required":false,"description":"The offset of the first item returned in the collection.","schema":{"type":"integer","format":"int32"}},"Limit":{"name":"limit","in":"query","required":false,"description":"The maximum number of entries to return.","schema":{"type":"integer","format":"int32","default":50,"minimum":1,"maximum":500}},"EventsSort":{"name":"sortOrder","in":"query","required":false,"description":"Sort results in descending or ascending order.","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}}},"schemas":{"Events":{"type":"array","items":{"$ref":"#/components/schemas/Event2"}},"Event2":{"type":"object","nullable":true,"required":["createdAt","type","clusterId","message"],"properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"message":{"type":"string"},"reason":{"type":"string"},"source":{"type":"string"},"involvedObject":{"$ref":"#/components/schemas/InvolvedObject"}}},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"InvolvedObject":{"type":"object","required":["uid","kind","name","namespace"],"properties":{"uid":{"type":"string","format":"uuid"},"kind":{"type":"string"},"name":{"type":"string"},"namespace":{"type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/workloads/inferences/revisions/{revisionId}/events":{"get":{"summary":"Get revision events by id.","description":"Retrieve all the revision events using a revision id. Supported for clusters v2.21+.","operationId":"get_revision_events","tags":["Events"],"parameters":[{"$ref":"#/components/parameters/RevisionId"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/EventsSort"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"type":"object","required":["events"],"properties":{"next":{"type":"integer"},"events":{"$ref":"#/components/schemas/Events"}}}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get the revision history.

> Retrieve revision history details, including events, using a revision id. Supported for clusters v2.21+.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.24"},"tags":[{"name":"Events","description":"Workload events that occurred while the workload was running. Use to diagnose issue around workload scheduling."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"RevisionId":{"name":"revisionId","in":"path","required":true,"description":"The  Universally Unique Identifier (UUID) of the revision.","schema":{"type":"string","format":"uuid"}},"Offset":{"name":"offset","in":"query","required":false,"description":"The offset of the first item returned in the collection.","schema":{"type":"integer","format":"int32"}},"Limit":{"name":"limit","in":"query","required":false,"description":"The maximum number of entries to return.","schema":{"type":"integer","format":"int32","default":50,"minimum":1,"maximum":500}}},"schemas":{"HistoryRecords1":{"type":"array","items":{"$ref":"#/components/schemas/HistoryRecord1"}},"HistoryRecord1":{"type":"object","required":["meta","spec"],"properties":{"meta":{"$ref":"#/components/schemas/HistoryRecordMeta"},"spec":{"type":"object","properties":{"event":{"$ref":"#/components/schemas/Event2"},"phaseUpdate":{"$ref":"#/components/schemas/PhaseUpdate"}}}}},"HistoryRecordMeta":{"type":"object","required":["creationTimestamp","type"],"properties":{"creationTimestamp":{"type":"string","format":"date-time"},"type":{"$ref":"#/components/schemas/HistoryRecordType"}}},"HistoryRecordType":{"type":"string","enum":["Event","PhaseUpdate"]},"Event2":{"type":"object","nullable":true,"required":["createdAt","type","clusterId","message"],"properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"message":{"type":"string"},"reason":{"type":"string"},"source":{"type":"string"},"involvedObject":{"$ref":"#/components/schemas/InvolvedObject"}}},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"InvolvedObject":{"type":"object","required":["uid","kind","name","namespace"],"properties":{"uid":{"type":"string","format":"uuid"},"kind":{"type":"string"},"name":{"type":"string"},"namespace":{"type":"string"}}},"PhaseUpdate":{"type":"object","nullable":true,"required":["phase","phaseMessage"],"properties":{"phase":{"$ref":"#/components/schemas/Phase"},"phaseMessage":{"type":"string"}}},"Phase":{"type":"string","enum":["Creating","Initializing","Resuming","Pending","Deleting","Running","Updating","Stopped","Stopping","Degraded","Failed","Completed","Terminating","Unknown"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/workloads/inferences/revisions/{revisionId}/history":{"get":{"summary":"Get the revision history.","description":"Retrieve revision history details, including events, using a revision id. Supported for clusters v2.21+.","operationId":"get_revision_history","tags":["Events"],"parameters":[{"$ref":"#/components/parameters/RevisionId"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"type":"object","required":["records"],"properties":{"next":{"type":"integer"},"records":{"$ref":"#/components/schemas/HistoryRecords1"}}}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```
