APILog API v2

Overview

Using this API, you specify the cloud storage contracted by you to store the usage history of each API. When this API is used to specify the storage location, logs are extracted for each email address of the user who CALLs the API and stored in the specified cloud storage.
Customers are required to provide their own cloud storage to store their logs. As of December 2020, Amazon S3 and Wasabi can be specified. (To be expanded in the future)
We assist in customer data management, including resource change tracing.
※ This service does not guarantee a complete log transfer.
※To protect the system, API Log application may deactivate the storage information and stop the transfer,in case of the log transfer failed due to a failure of the destination storage, write permission of the storage was exipired, and so on.
If that happens,please re-enable storage transfer using the "API Usage History - Stored Storage Information Change" API.

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.Base Path(Global Load Balance)

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

2.Base Path(Region)

https://{region}.api.ntt.com/v2/apilog
  • region is jp|us|fr|sg
  • e.g. https://us.api.ntt.com/v2/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

API Usage History - Stored Storage List Retrieval

GET /v2/apilog/storages

Request Parameters

None

Example Request

 GET /v2/apilog/storages

Response Parameters

Name Description type
storages List of registered storage UUIDs Array

Example Result

{
  "storages": [
    "Displays the UUID that corresponds to the registered storage."
  ]
}

API Usage History - Stored Storage Registration

POST /v2/apilog/storages

Request Parameters

Name ParameterName Description type
storageProvider - Destination Storage Services Dictionary
name Stored Storage Service Name string("AWS","wasabi")
accessKey Storage Services AccessKey string
secretAccessKey Storage Services SecretAccessKey string
endpoint Storage services endpoint string
bucket Storage service bucket name string

Example Request

 POST /v2/apilog/storages
{
  "storageProvider": {
    "name": "wasabi",
    "accessKey":"KEY",
    "secretAccessKey":"SECRET",
    "endpoint": "EP",
    "bucket": "BUCKET"
  }
}

Response Parameters

Name ParameterName Description type
storageProvider - Destination Storage Services Dictionary
name Stored Storage Service Name string("AWS","wasabi")
accessKey Storage Services AccessKey string
secretAccessKey Storage Services SecretAccessKey string
endpoint Storage services endpoint string
bucket Storage service bucket name string
storageUuid - registered storage UUIDs string

Example Result

{
  "storageProvider": {
    "name": "wasabi",
    "accessKey":"KEY",
    "secretAccessKey":"SECRET",
    "endpoint": "EP",
    "bucket": "BUCKET"
  },
  "storageUuid": "UUID"
}

API Usage History - Stored Storage Information Retrieval

GET /v2/apilog/storages/{{ uuid }}

Request Parameters

None

Example Request

 GET /v2/apilog/storages/uuid

Response Parameters

Name Description type
id List of registered storage UUIDs string
name Stored Storage Service Name string("AWS","wasabi")
endpoint Storage services endpoint string
bucket Storage service bucket name string
status Registration Status string("activated","deactivated")

Example Result

{
  "id": "uuid",
  "name": "wasabi",
  "endpoint": "EP",
  "bucket": "BUCKET",
  "status": "activated"
}

API Usage History - Stored Storage Information Change

POST /v2/apilog/storages/{{ uuid }}

※To protect the system, API Log application may deactivate the storage information and stop the transfer,in case of the log transfer failed due to a failure of the destination storage, write permission of the storage was exipired, and so on.
If that happens,please re-enable storage transfer using this API.

Request Parameters

Name Description type
uuid Registered storage UUID string
activated Status query argument(true,false)

Example Request

 POST /v2/apilog/storages/uuid?activated=true

Response Parameters

Name Description type
id Registered storage UUIDs string
name Stored Storage Service Name string("AWS","wasabi")
endpoint Storage Services endpoint string
bucket Storage service bucket name string
status Status string("activated","deactivated")

Example Result

{
  "id": "registered storage UUID",
  "name": "AWS",
  "endpoint": "ap-northeast-1",
  "bucket": "apilog",
  "status": "activated"
}

API Usage History - Stored Storage Information Removal

DELETE /v2/apilog/storages/{{ uuid }}

Request Parameters

None

Example Request

 DELETE /v2/apilog/storages/uuid

Response Parameters

None

Example Result

None


API Usage History - Stored Storage Connection Test

POST /v2/apilog/storages/{{ uuid }}/validate

Request Parameters

None

Example Request

 POST /v2/apilog/storages/uuid/validate

Response Parameters

Name ParameterName Description type
message "dummy data is queued" string

Example Result

{
  "message": "dummy data is queued"
}