APILog API

Overview

This API allows you to get any APIs logs via API Gateway.This API support the customer compliance management, analysis of security and resource changes traceability.

Resource URL

Please use global common domain, or the individual region domain.

If you want to use the global common domain, depending on the circumstances of your available points, your request connect to the nearest API gateway.1

1.Base Path(Global Load Balance)

https://api.ntt.com/v1/apilog

2.Base Path(Region)

https://{region}.api.ntt.com/v1/apilog
  • region is jp|us|uk
  • e.g. https://us.api.ntt.com/v1/apilog

Resource Information

Key Value
Response Format JSON
Authentication (OAuth) Yes
Bandwidth control#1 Yes
  • #1 implement appropriate flow restriction in the customer connection unit

GET API Archive Logs

GET /v1/apilog

Request Parameters

Name Description type mandatory
targetDate Target Date for API Logs#1 query argument Yes
  • #1 YYYYMMDD

Example Request

 GET /v1/apilog?targetDate=20150401

Response Parameters

Name Description type mandatory
eventVersion log Event Version String
userIdentity type User Type String
accountId Account ID String
accessKeyId AccessKey ID String
userName User Name String
eventTime Request Date(UTC) String
eventSource Request Service String
verb REST API method String
region APIGW region String
sourceIPAddress Global IP from Request String
userAgent UserAgent String
errorCode Error Code String
errorMessage Error Message String
requestQueryParameters Query Parameters String
requestParameters Request Payload String
responseElements Response Payload String

Example Result

{
  "resultCount": 2,
  "Records": [
    {
      "Record": {
        "eventVersion": "v1",
        "userIdentity": {
          "type": "client_credentials",
          "accountId": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
          "accessKeyId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "username": "apitestuser@ntt.com"
        },
        "eventTime": "2015-03-31T12:13:14+00:00",
        "eventSource": "/v1/business-process/contracts",
        "verb": "GET",
        "region": "dc-1",
        "sourceIPAddress": "173.194.38.216",
        "userAgent": "HTTPie/0.8.0",
        "errorCode": "",
        "errorMessage": "",
        "requestQueryParameters": "",
        "requestParameters": "",
        "responseElements": {…}
      }
    },
    {
      "Record": {
        "eventVersion": "v1",
        "userIdentity": {
          "type": "client_credentials",
          "accountId": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
          "accessKeyId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "username": "apitestuser@ntt.com"
        },
        "eventTime": "2015-03-31T13:14:15+00:00",
        "eventSource": "/v1/business-process/contracts",
        "verb": "GET",
        "region": "dc-1",
        "sourceIPAddress": "173.194.38.216",
        "userAgent": "HTTPie/0.8.0",
        "errorCode": "",
        "errorMessage": "",
        "requestQueryParameters": "",
        "requestParameters": "",
        "responseElements": {…}
      }
    }
  ]
}

  1. Dec. 2014 currently, DNS round robin operation. Apr. 2015 or later, API request will automatically connect to geographically close API gateway