Effective Log Search & Analytics Overview
- Print
- PDF
Effective Log Search & Analytics Overview
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
NAVER Cloud Platform is a cloud service built with NAVER's latest computing technology and operational know-how.
Among the many product groups provided by NAVER Cloud Platform, the set of application programming interfaces (APIs) that allow you to use solution products is called NAVER Cloud Platform API.
The Effective Log Search & Analytics API is provided in the RESTful format.
It is done through HTTP GET/POST method calls.
Common settings
API URL
https://elsa.apigw.ntruss.com/api/v1/
Request header
Header name | Description |
---|---|
x-ncp-apigw-timestamp | It indicates the time elapsed since January 1, 1970 00:00:00 UTC in milliseconds. If the time difference compared to the API Gateway server is more than 5 minutes, then the request is considered invalid. |
x-ncp-iam-access-key | API key issued by NAVER Cloud Platform or access key issued by IAM |
x-ncp-apigw-signature-v2 | A signature that encrypts the body with the secret key mapped to the access key HmacSHA256 is used as the HMAC encryption algorithm |
The following is an example of creating "x-ncp-apigw-signature-v2" in Java. Please refer to the document below for details.
Go to the creation guide of NAVER Cloud Platform authentication key and 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;
}
Operation
API name | Description |
---|---|
fields | Looks up log fields by project |
search | Looks up logs by project |
download | Downloads logs by project |
Was this article helpful?