By calling RESTful API to Cloud Trail, events can be queried by user-defined conditions.
Appkey is required to use the CloudTrail API. The Appkey is included in the request URL to identify and specify a particular resource when making API calls.
For more information on checking and using Appkeys, please refer to the Appkey.
User Access Key is required to use the CloudTrail API(V2.0+). A User Access Key is an authentication key issued based on an NHN Cloud or IAM account. It is used in conjunction with a Secret Access Key to authenticate API requests.
User Access Keys and Secret Access Keys can be issued in the console's API Security Setting. For more information on issuing and using User Access Key, please refer to the User Access Key.
To all API requests, HTTP sends 200 for response code. Read the header at Response Body for more details of the response result.
{
"header" : {
"isSuccessful" : true,
"resultCode": 0,
"resultMessage" : "Success."
}
}
| Key | Type | Description |
|---|---|---|
| header | Object | Response header |
| header.isSuccessful | boolean | Successful or not |
| header.resultCode | int | Response code: 0 for successful; error code returned if it fails |
| header.resultMessage | String | Response message: "SUCCESS" if successful; or, error code returned if it fails. |
[Method, URL]
| Method | URI |
|---|---|
| POST | /cloud-trail/v1.0/appkeys/{appKey}/events/search |
[Path Variable]
| Key | Value |
|---|---|
| appKey | Appkey issued on [CONSOLE] |
[Request Body]
{
"idNo" : "string",
"member" : {
"memberType" : "string", /* TOAST / IAM */
"userCode" : "string", /* In Case IAM member type */
"emailAddress" : "string", /* In Case TOAST member type */
"idNo" : "string"
},
"eventId" : "string",
"startDate": "2019-09-01T02:00:00.000Z",
"endDate": "2019-09-12T03:13:00.000Z",
"page": {
"sortBy": "string",
"limit": 20,
"page": 0
}
}
| Key | Type | Required | Description |
|---|---|---|---|
| idNo | String | X | ID of the member incurring an event (uuid) |
| eventId | String | O | ID of an event to query |
| startDate | Date | O | Start date of query period |
| endDate | Date | O | End date of query period |
| page | Object | O | Page conditions of query result |
| page.sortBy | String | X | Size sorting conditions of query result (ex. eventTime:desc, idNo:asc) |
| page.limit | Integer | O | Size conditions of query result (default: 20, max: 1000)) |
| page.page | Integer | O | Page conditions to query among result pages |
[Response Body]
{
"header": {
"resultCode": 0,
"resultMessage": "SUCCESS",
"isSuccessful": true
},
"page": {
"content": [
{
"eventTime": "2019-09-04T10:31:49.348+0000",
"userIdNo": "24bfb870-46da-11e9-aafd-005056ac7022",
"userIp":"10.162.5.18",
"userAgent":"ReactorNetty/0.8.4.RELEASE",
"userName": "Hong kildong",
"userId": "test_email@nhn.com",
"eventSourceType": "API",
"productId": "M0XnzOFE",
"region": "string",
"orgId": "Y4PbNFUlBsRgAxcU",
"projectId": "string",
"projectName": "string",
"appKey": "string",
"tenantId": "string",
"eventId": "event_id.iam.member.role.update",
"eventLogUuid": "17278c08-8338-4fd9-9693-931290adb9ec",
"request": "{\n\t\"id\" : \"2\",\n\t\"productId\" : \"M0XnzOFE\",\n\t\"uuid\" : \"24bfb870-46da-11e9-aafd-005056ac7022\"\n\t\n}",
"response": "{\"header\":{\"resultCode\":0,\"resultMessage\":\"SUCCESS\",\"isSuccessful\":true}}",
"eventTarget": {
"targetMembers": [
{
"idNo": "9c30dff8-53ba-4f18-8b44-22ab3b1678d7",
"name": "Lim kkukjeong",
"userCode": "test_user",
"emailAddress": "test_email2@nhn.com"
}
]
}
}
],
"pageable": "INSTANCE",
"totalPages": 1,
"totalElements": 1,
"last": true,
"size": 0,
"number": 0,
"numberOfElements": 1,
"first": true,
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"empty": false
}
}
| Key | Type | Description |
|---|---|---|
| eventTime | Date | Time when event is incurred |
| userIdNo | Object | UUID of event-incurring member |
| userName | String | Name of event-incurring member |
| UserId | String | ID of event-incurring member (email format for NHN Cloud account) |
| userIp | String | IP of event-incurring member |
| userAgent | String | Agent of event-incurring member |
| eventSourceType | String | Type of event-incurring subject |
| productId | String | ID of product in which event is incurred |
| region | String | Region where event is incurred |
| orgId | String | ID of organization where event is incurred |
| projectId | String | ID of project in which event is incurred |
| projectName | String | Name of project in which event is incurred |
| appKey | String | Appkey in which event is incurred |
| tenantId | String | ID of tenant where event is incurred |
| eventId | String | ID of event |
| eventLogUuid | String | Event log serial number (identification key) |
| request | String | Request of incurred event |
| response | String | Response of incurred event |
| eventTarget | Object | Target of incurred event |
| eventTarget.targetMembers | Object | Target member of incurred event |
| targetMembers.idNo | String | UUID of target member incurred with event |
| targetMembers.name | String | Name of target member incurred with event |
| targetMembers.userCode | Integer | ID of target member incurred with event (for IAM members) |
| targetMembers.emailAddress | String | Email address of target member incurred with event (for NHN Cloud members) |
[Required Permissions]
* CloudTrail:EventLog.List
[Method, URL]
| Method | URI |
|---|---|
| POST | /cloud-trail/v2.0/appkeys/{appKey}/events/search |
[HEADER]
| Key | Value |
|---|---|
| X-TC-AUTHENTICATION-ID | User Access Key ID issued by the console |
| X-TC-AUTHENTICATION-SECRET | Secret Access Key issued by the console |
[Path Variable]
| Key | Value |
|---|---|
| appKey | Appkey issued on [CONSOLE] |
[Request Body]
{
"idNo" : "string",
"member" : {
"memberType" : "string", /* TOAST / IAM */
"userCode" : "string", /* In Case IAM member type */
"emailAddress" : "string", /* In Case TOAST member type */
"idNo" : "string"
},
"eventId" : "string",
"startDate": "2019-09-01T02:00:00.000Z",
"endDate": "2019-09-12T03:13:00.000Z",
"page": {
"sortBy": "string",
"limit": 20,
"page": 0
}
}
| Key | Type | Required | Description |
|---|---|---|---|
| idNo | String | X | ID of the member incurring an event (uuid) |
| eventId | String | O | ID of an event to query |
| startDate | Date | O | Start date of query period |
| endDate | Date | O | End date of query period |
| page | Object | O | Page conditions of query result |
| page.sortBy | String | X | Size sorting conditions of query result (ex. eventTime:desc, idNo:asc) |
| page.limit | Integer | O | Size conditions of query result (default: 20, max: 1000)) |
| page.page | Integer | O | Page conditions to query among result pages |
[Response Body]
{
"header": {
"resultCode": 0,
"resultMessage": "SUCCESS",
"isSuccessful": true
},
"page": {
"content": [
{
"eventTime": "2019-09-04T10:31:49.348+0000",
"userIdNo": "24bfb870-46da-11e9-aafd-005056ac7022",
"userIp":"10.162.5.18",
"userAgent":"ReactorNetty/0.8.4.RELEASE",
"userName": "Hong kildong",
"userId": "test_email@nhn.com",
"eventSourceType": "API",
"productId": "M0XnzOFE",
"region": "string",
"orgId": "Y4PbNFUlBsRgAxcU",
"projectId": "string",
"projectName": "string",
"appKey": "string",
"tenantId": "string",
"eventId": "event_id.iam.member.role.update",
"eventLogUuid": "17278c08-8338-4fd9-9693-931290adb9ec",
"request": "{\n\t\"id\" : \"2\",\n\t\"productId\" : \"M0XnzOFE\",\n\t\"uuid\" : \"24bfb870-46da-11e9-aafd-005056ac7022\"\n\t\n}",
"response": "{\"header\":{\"resultCode\":0,\"resultMessage\":\"SUCCESS\",\"isSuccessful\":true}}",
"eventTarget": {
"targetMembers": [
{
"idNo": "9c30dff8-53ba-4f18-8b44-22ab3b1678d7",
"name": "Lim kkukjeong",
"userCode": "test_user",
"emailAddress": "test_email2@nhn.com"
}
]
}
}
],
"pageable": "INSTANCE",
"totalPages": 1,
"totalElements": 1,
"last": true,
"size": 0,
"number": 0,
"numberOfElements": 1,
"first": true,
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"empty": false
}
}
| Key | Type | Description |
|---|---|---|
| eventTime | Date | Time when event is incurred |
| userIdNo | Object | UUID of event-incurring member |
| userName | String | Name of event-incurring member |
| UserId | String | ID of event-incurring member (email format for NHN Cloud account) |
| userIp | String | IP of event-incurring member |
| userAgent | String | Agent of event-incurring member |
| eventSourceType | String | Type of event-incurring subject |
| productId | String | ID of product in which event is incurred |
| region | String | Region where event is incurred |
| orgId | String | ID of organization where event is incurred |
| projectId | String | ID of project in which event is incurred |
| projectName | String | Name of project in which event is incurred |
| appKey | String | Appkey in which event is incurred |
| tenantId | String | ID of tenant where event is incurred |
| eventId | String | ID of event |
| eventLogUuid | String | Event log serial number (identification key) |
| request | String | Request of incurred event |
| response | String | Response of incurred event |
| eventTarget | Object | Target of incurred event |
| eventTarget.targetMembers | Object | Target member of incurred event |
| targetMembers.idNo | String | UUID of target member incurred with event |
| targetMembers.name | String | Name of target member incurred with event |
| targetMembers.userCode | Integer | ID of target member incurred with event (for IAM members) |
| targetMembers.emailAddress | String | Email address of target member incurred with event (for NHN Cloud members) |