Effective Log Search & Analytics 개요
    • PDF

    Effective Log Search & Analytics 개요

    • PDF

    Article Summary

    개요

    네이버 클라우드 플랫폼은 NAVER의 최신 컴퓨팅 기술과 운영 노하우가 축적된 클라우드 서비스입니다.
    네이버 클라우드 플랫폼에서 제공하는 여러 가지 상품군 중에 솔루션 상품을 이용할 수 있도록 제공하는 응용 프로그램 인터페이스(API)를 네이버 클라우드 플랫폼 API 라고 합니다.

    Effective Log Search & Analytics API는 RESTful 형태로 제공됩니다.

    HTTP 방식의 GET/POST 메서드 호출을 통해서 이루어집니다.

    공통 설정

    API URL

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

    요청 헤더

    헤더명설명
    x-ncp-apigw-timestamp1970년 1월 1일 00:00:00 협정 세계시(UTC)부터의 경과 시간을 밀리초(Millisecond)로 나타낸 것
    API Gateway 서버와 시간 차가 5분 이상 나는 경우 유효하지 않은 요청으로 간주
    x-ncp-iam-access-keyNAVER Cloud Platform에서 발급받은 API Key 또는 IAM에서 발급받은 AccessKey
    x-ncp-apigw-signature-v2AccessKey와 맵핑되는 SecretKey로 암호화한 서명
    HMAC 암호화 알고리즘은 HmacSHA256 사용

    다음은 Java에서 'x-ncp-apigw-signature-v2'를 생성하는 예제입니다.자세한 사항은 아래 문서를 참조해주시기 바랍니다.

    NAVER Cloud Platform 인증키 및 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;
    }
    

    오퍼레이션

    API명설명
    fields프로젝트별 로그 필드 조회
    search프로젝트별 로그 조회
    download프로젝트별 로그 다운로드

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

    What's Next
    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.