Available in Classic and VPC
View the event history of an API.
Request
The following describes the request format for the endpoint. The request format is as follows:
| Method | URI |
|---|---|
| POST | /dashboards/events/search |
Request headers
For headers common to API Gateway, see API Gateway common request headers.
Request syntax
The request syntax is as follows.
{
"offset" : 0,
"level" : [ "level" ],
"limit" : 0,
"timeZone" : "timeZone",
"from" : "from",
"to" : "to",
"type" : [ "type" ]
}
Request body
The following describes the request body.
| Field | Type | Required | Description |
|---|---|---|---|
offset |
Long | Optional | Starting point in the list of data to view
|
level |
List<String> | Optional | Occurred event level
|
limit |
Long | Optional | Number of data to view at once
|
timeZone |
String | Required | Time zone (+09:00) |
from |
String | Required | Query start date (yyyy-MM-dd) |
to |
String | Required | Query end date (yyyy-MM-dd) |
type |
List<String> | Optional | Occurred eventy type
|
Request example
The following is a sample request.
curl -X POST 'https://apigateway.apigw.ntruss.com/api/v1/dashboards/events/search \
--header 'Content-Type: application/json' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
--data '{
"offset" : 6,
"level" : [ "EVENT" ],
"limit" : 1,
"timeZone" : "timeZone",
"from" : "from",
"to" : "to",
"type" : [ "ES020" ]
}
Response
The following describes the response format.
Response syntax
The syntax is as follows.
{
"events": {
"content": [
{
"time": "2024-05-08 13:45:58",
"level": "level",
"type": "type",
"message": "message"
}
],
"total": 0
}
}
Response status codes
For response status codes common to API Gateway, see API Gateway response status codes.
Response example
The following is a sample response.
{
"events": {
"content": [
{
"time": "2024-05-08 13:45:58",
"level": "EVENT",
"type": "ES020",
"message": "The status of subscription request for [test-***] requested by [apiKey-***] has been changed to [Accepted]."
}
],
"total": 1
}
}