MENU
      Effective Log Search & Analytics 概要

        Effective Log Search & Analytics 概要


        記事の要約

        概要

        NAVERクラウドプラットフォームは、NAVERの最新コンピューティング技術や運用ノウハウが蓄積されたクラウドサービスです。
        NAVERクラウドプラットフォームが提供する様々な商品群のうち、ソリューション商品を利用できるように提供するアプリケーションインターフェース(API)をNAVERクラウドプラットフォームAPIといいます。

        Effective Log Search & Analytics APIはRESTfulの形で提供されます。

        HTTP方式のGET/POSTメソッドの呼び出しにより実行されます。

        共通の設定

        API URL

        https://elsa.apigw.ntruss.com/api/v1/
        HTTP

        リクエストヘッダ

        ヘッダ名説明
        x-ncp-apigw-timestamp1970年1月1日 00:00:00 協定世界時(UTC)からの経過時間をミリセカンド(Millisecond)で表したもの
        API Gatewayサーバとの時間差が5分以上の場合は無効なリクエストとみなす
        x-ncp-iam-access-keyNAVERクラウドプラットフォームで発行されたAPIキーまたはIAMで発行されたAccessKey
        x-ncp-apigw-signature-v2AccessKeyとマッピングするSecretKeyで暗号化した署名
        HMAC暗号化アルゴリズムはHmacSHA256を使用

        以下はJavaで「x-ncp-apigw-signature-v2」を作成する例です。詳細については以下の文書をご参照ください。

        NAVERクラウドプラットフォームの認証キー及びSignature作成ガイドに移動

        public String makeSignature() {
            String space = " ";                    // one space
            String newLine = "\n";                    // new line
            String method = "GET";                    // method
            String url = "/api/v1/fields?projectKey=Pbxxxxx_elsa-test&projectId=8171&from=1381190400000&to=1381190400000";    // url (include query string)
            String timestamp = "{timestamp}";            // current timestamp (epoch)
            String accessKey = "{accessKey}"            // access key id (from portal or sub account)
            String secretKey = "{secretKey}";
        
            String message = new StringBuilder()
                .append(method)
                .append(space)
                .append(url)
                .append(newLine)
                .append(timestamp)
                .append(newLine)
                .append(accessKey)
                .toString();
        
            SecretKeySpec signingKey = new SecretKeySpec(secretKey.getBytes("UTF-8"), "HmacSHA256");
            Mac mac = Mac.getInstance("HmacSHA256");
            mac.init(signingKey);
        
            byte[] rawHmac = mac.doFinal(message.getBytes("UTF-8"));
            String encodeBase64String = org.apache.commons.codec.binary.Base64.encodeBase64String(rawHmac);
        
          return encodeBase64String;
        }
        Plain text

        オペレーション

        API名説明
        fieldsプロジェクト別のログフィールドを照会
        searchプロジェクト別のログを照会
        downloadプロジェクト別のログをダウンロード

        この記事は役に立ちましたか?

        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.