getDbServerLogList

Prev Next

Available in Classic.

Overview

Search the list of Cloud DB database server logs.

Requests

Request headers

Header Description
x-ncp-apigw-timestamp This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC, and if the time difference compared to the API Gateway server is more than 5 minutes, then the request is considered invalid
x-ncp-apigw-timestamp:{Timestamp}
x-ncp-apigw-api-key Key value issued by Gateway; api-key is not used when using v2
x-ncp-apigw-api-key:{API Gateway API Key}
x-ncp-iam-access-key Access Key ID value issued by the NAVER Cloud Platform portal
x-ncp-iam-access-key:{Sub Account Access Key}
x-ncp-apigw-signature-v2 Signature encrypted with the Access Key ID value and Secret Key
x-ncp-apigw-signature-v2:{API Gateway Signature}
Content-Type The request body content type is specified as application/json
Content-Type: application/json

Request bodies

API field names in the request body are case sensitive.

Parameters Requirement status Type Restrictions Description
regionNo N String Region number
dbKindCode Y String MYSQL DB type code
cloudDBInstanceNo Y String - Instance number of the created MySQL server
- You can obtain it through getCloudDBInstanceList
cloudDBServerInstanceNo Y String - Instance number of the Cloud DB for MySQL
- You can obtain it through getCloudDBInstanceList
logType Y String BINARY, ERROR, SLOW, GENERAL Database server log file type
responseFormatType N String xml, json Format type of the response result
Default: xml
  • regionNo
  • dbKindCode
    • Selects the type of CloudDB to search. You can only select MySQL.
  • cloudDBInstanceNo
  • cloudDBServerInstanceNo
    • This is the instance number of the Cloud DB for MySQL server. You can get it through getCloudDBInstanceList.
  • LogType
    • Specifies the database server log file type. You can select from BINARY, ERROR, SLOW, and GENERAL.
  • responseFormatType
    • Determines the format to receive the API execution results as a response. You can select between xml and json.

Responses

Field Type Description Note
requestId String Request ID value
returnCode Integer Response code value
returnMessage String Response message
totalRows Integer Number of rows in response results
cloudDBServerLogList[] String DB server log list CloudDBServerLogList
  • CloudDBServerLog
Field Type Description Note
fileName String File name
fileDate Date File date
fileSize Long File size

Examples

Request examples

GET {API_URL}/getDbServerLogList
?regionNo=1
&dbKindCode=MYSQL
&cloudDBInstanceNo=15101399
&cloudDBServerInstanceNo=15101410
&logType=BINARY
&responseFormatType=XML

Request sample

{
  "regionNo": "1",
  "dbKindCode": "MYSQL",
  "cloudDBInstanceNo": "15101399",
  "cloudDBServerInstanceNo": "15101410",
  "logType": "BINARY",
  "responseFormatType": "XML"
}

Response examples

 connection: keep-alive 
 content-type: application/xml;charset=UTF-8 
 date: Mon, 12 Dec 2022 06:32:04 GMT 
 server: nginx 
 transfer-encoding: chunked 
 x-ncp-apigw-response-origin: ENDPOINT 
 x-ncp-trace-id: 6cp3664oj8cpl62phhclhjgdr4 
<getDbServerLogListResponse>
  <requestId>e604306e-7e5a-47ba-9e9f-be6f67e5946c</requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>  
  <totalRows>1</totalRows>
  <cloudDbServerLogList>
    <cloudDbServerLog>
     <fileName>mysql-bin.000001</fileName>
     <fileSize>8038</fileSize>
     <fileDate>2022-12-12T14:38:23+0900</fileDate>
    </cloudDbServerLog>
  </cloudDbServerLogList> 
</getDbServerLogListResponse>

Error code

If a wrong Cloud DB API request is sent, or an error occurs during its processing, then the success/failure result is returned as an HTTP status code. The detailed message is then returned in the form of JSON.

There are two types or errors: Cloud DB API's "common errors" and "API Gateway errors."

Error code Response message Description
200 Ok
500 Server Error