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-keyNAVERクラウドプラットフォームのポータルで発行した 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
      • Server APIである getRegionListを通じて取得できます。
    • 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エラーコード」の2種類があります。

    エラーコードレスポンスメッセージ説明
    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.