View event history

Prev Next

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
  • 0 - 9,223,372,036,854,775,807
level List<String> Optional Occurred event level
  • EVENT | ALARM | ALERT
    • EVENT: event
    • ALARM: notification
    • ALERT: alert
  • Items in a collection can't be null
limit Long Optional Number of data to view at once
  • 1 - 9,223,372,036,854,775,807
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
  • ES010 | ES020 | EU400 | EU410 | EU420
    • ES010: subscription request
    • ES020: subscription status change
    • EU400: exceeded usage
    • EU410: exceeded requests per second
    • EU420: exceeded usage per second
  • Items in a collection can't be null

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
    }
}