Reading an Event
Function
This API is used to query the details about a specified event.
URI
GET /api/v1/namespaces/{namespace}/events/{name}
|
Parameter |
Description |
|---|---|
|
namespace |
Object name and auth scope, such as for teams and projects. |
|
name |
Name of the event. |
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
pretty |
No |
If 'true', then the output is pretty printed. |
|
exact |
No |
Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. |
|
export |
No |
Should this value be exported. Export strips fields that a user cannot specify. |
Request
N/A
Response
Response parameters
For the description about response parameters, see Table 127.
Example response
{
"kind": "Event",
"apiVersion": "v1",
"metadata": {
"name": "deployment-test-57f7cff77c-5x5tw.1550e534d2d8a5ef",
"namespace": "namespace-test",
"selfLink": "/api/v1/namespaces/namespace-test/events/deployment-test-57f7cff77c-5x5tw.1550e534d2d8a5ef",
"uid": "0122b5b2-af79-11e8-8f17-c81fbe371a17",
"resourceVersion": "760533",
"creationTimestamp": "2018-09-03T12:58:07Z",
"enable": true
},
"involvedObject": {
"kind": "Pod",
"namespace": "namespace-test",
"name": "deployment-test-57f7cff77c-5x5tw",
"uid": "010fec39-af79-11e8-8f17-c81fbe371a17",
"apiVersion": "v1",
"resourceVersion": "5036865"
},
"reason": "Scheduled",
"message": "Successfully assigned deployment-test-57f7cff77c-5x5tw to c0dd6256-195a-e811-90a2-10c17294fcbc",
"source": {
"component": "default-scheduler"
},
"firstTimestamp": "2018-09-03T12:58:07Z",
"lastTimestamp": "2018-09-03T12:58:07Z",
"count": 1,
"type": "Normal",
"eventTime": null,
"reportingComponent": "",
"reportingInstance": ""
}
Status Code
Table 3 describes the status code of this API.
|
Status Code |
Description |
|---|---|
|
200 |
This operation succeeds, and an Event resource object is returned. |
For more status codes, see Status Codes.
Last Article: Event
Next Article: Listing All Events
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.