Get Secret Logs

Prev Next

Available in VPC

Get secret usage logs.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET /api/v1/secrets/{secretId}/logs

Request headers

For information about the headers common to all Secret Manager APIs, see Secret Manager request headers.

Request path parameters

You can use the following path parameters with your request:

Field Type Required Description
secretId String Required Secret ID

Request query parameters

You can use the following query parameters with your request:

Field Type Required Description
keyword String Optional Search keyword
  • URL encoding required when using the GET method
pageNo Integer Optional Page number
  • 1-N (default: 1)
pageSize Integer Optional Page output count
  • 1-N (default: 100)
timestampFrom Long Optional Query start date and time (millisecond)
  • Unix timestamp format
timestampTo Long Optional Query end date and time (millisecond)
  • Unix timestamp format

Request example

The request example is as follows:

curl --location --request GET 'https://secretmanager.apigw.ntruss.com/api/v1/secrets/{secretId}/logspageNo=1&pageSize=1&timestampFrom=1753067196000&keyword=Get%20Secret%20Log' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
code String - Response code
data Object - Response result
data.pageSize Integer - Page size
data.currentPage Integer - Current page number
data.totalPage Integer - Total number of pages
data.totalCount Integer - Total number of logs
data.result Array - Log list
data.paged Boolean - Paging status
  • true | false
    • true: Paging applied
    • false: Paging not applied

Response status codes

For information about the HTTP status codes common to all Secret Manager APIs, see Secret Manager response status codes.

Response example

The response example is as follows:

{
    "code": "SUCCESS",
    "data": {
        "pageSize": 100,
        "currentPage": 1,
        "totalPage": 1,
        "totalCount": 44,
        "result": [
            {
                "timestamp": "2025-07-23T05:05:06.298Z",
                "data": {
                    "secret": {
                        "id": "*****687685109842348f7358629bca2a6b2491e8c2352718e7d312b183*****",
                        "name": "test-***"
                    },
                    "requestor": {
                        "requestType": "API",
                        "ncpIdNo": "********-f973-11eb-9c82-246e965*****",
                        "ip": "192.168.***.***"
                    },
                    "api": {
                        "result": "SUCCESS",
                        "action": "Retry Rotation"
                    }
                },
                "type": "Secret_Manager_Log",
                "message": "{\"result\":\"SUCCESS\",\"action\":\"RETRY_ROTATION\",\"secretId\":\"******687685109842348f7358629bca2a6b2491e8c2352718e7d312b183*****\",\"jobToken\":\"********-9274-4923-958c-04efd8f*****\"}"
            }
        ],
        "paged": false
    }
}