getDbServerLogList
    • PDF

    getDbServerLogList

    • PDF

    Article Summary

    Classic 환경에서 이용 가능합니다.

    개요

    Cloud DB 데이터베이스 서버 로그 리스트를 조회합니다.

    요청

    요청 헤더

    헤더명설명
    x-ncp-apigw-timestamp1970년 1월 1일 00:00:00 협정 세계시(UTC)부터의 경과 시간을 밀리초(Millisecond)로 나타내며 API Gateway 서버와 시간 차가 5분 이상 나는 경우 유효하지 않은 요청으로 간주
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-apigw-api-keyAPIGW에서 발급받은 키 값, v2를 사용할 경우 api-key는 사용하지 않음
    x-ncp-apigw-api-key:{API Gateway API Key}
    x-ncp-iam-access-key네이버 클라우드 플랫폼 포털에서 발급받은 Access Key ID 값
    x-ncp-iam-access-key:{Sub Account Access Key}
    x-ncp-apigw-signature-v2Access Key ID 값과 Secret Key로 암호화한 서명
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    Content-TypeRequest body content type을 application/json으로 지정
    Content-Type: application/json

    요청 바디

    API 요청 시 필드명의 대소문자 구분이 필요합니다.

    파라미터명필수 여부타입제약 사항설명
    regionNoNString리전 번호
    dbKindCodeYStringMYSQLDB 유형 코드
    cloudDBInstanceNoYString- 생성되어있는 MySQL 서버의 인스턴스 번호
    - getCloudDBInstanceList 를 통해 취득 가능
    cloudDBServerInstanceNoYString- Cloud DB for MySQL 서버 인스턴스 번호
    - getCloudDBInstanceList 를 통해 취득 가능
    logTypeYStringBINARY, ERROR, SLOW, GENERAL데이터베이스 서버 로그 파일 타입
    responseFormatTypeNStringxml, json응답 결과의 포맷 타입
    Default: xml
    • regionNo
    • dbKindCode
      • 조회할 CloudDB의 종류를 선택합니다. MySQL만 선택 가능합니다.
    • cloudDBInstanceNo
      • 생성되어있는 MySQL 서버의 인스턴스 번호입니다. getCloudDBInstanceList를 통해 얻을 수 있습니다.
    • cloudDBServerInstanceNo
      • Cloud DB for MySQL 서버 인스턴스 번호입니다. getCloudDBInstanceList를 통해 얻을 수 있습니다.
    • LogType
      • 데이터베이스 서버 로그 파일 타입을 정합니다. BINARY, ERROR, SLOW, GENERAL 중에서 선택 가능합니다.
    • responseFormatType
      • API 실행 결과를 응답받을 포맷을 정합니다. xml과 json 중에서 선택 가능합니다.

    응답

    필드명타입설명비고
    requestIdString요청 ID 값
    returnCodeInteger응답 코드 값
    returnMessageString응답 메시지
    totalRowsInteger응답 결과 row 수
    cloudDBServerLogList[]StringDB 서버 로그 목록CloudDBServerLogList
    • CloudDBServerLog
    필드명타입설명비고
    fileNameString파일명
    fileDateDate파일날짜
    fileSizeLong파일사이즈

    예시

    요청 예시

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

    요청 샘플

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

    응답 예시

     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>
    

    오류 코드

    Cloud DB API 요청이 잘못되었거나, 처리 도중 오류가 발생하면 HTTP 상태코드로 성공/실패를 반환하고 JSON 형식으로 상세 메시지를 반환합니다.

    오류 코드는 Cloud DB API의 '공통 오류 코드'와 'API Gateway 오류 코드' 두 가지입니다.

    오류 코드응답 메시지설명
    200Ok
    500Server Error

    이 문서가 도움이 되었습니까?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.