Get log count by period
- Print
- PDF
Get log count by period
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in Classic and VPC
Get the number of logs collected during the query period in the Cloud Log Analytics service on a specific cycle basis.
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
GET | /api/{regionCode}-v1/logs/count/interval |
Request headers
For information about the headers common to all Cloud Log Analytics APIs, see Cloud Log Analytics request headers.
Request path parameters
You can use the following path parameters with your request:
Field | Type | Required | Description |
---|---|---|---|
regionCode | String | Required | Region code
|
Request query parameters
You can use the following query parameters with your request:
Field | Type | Required | Description |
---|---|---|---|
startTime | String | Optional | Query start date and time
|
endTime | String | Optional | Query end date and time
|
interval | String | Optional | Query interval
|
Request example
The request example is as follows:
curl --location --request GET 'https://cloudloganalytics.apigw.ntruss.com/api/{regionCode}-v1/logs/count/interval' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Accept: application/json' \
Response
This section describes the response format.
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
code | Integer | - | Response status codes |
message | String | - | Response status message |
result | Integer | - | Response result |
result.chartData | Array | - | Log count |
Response status codes
For response status codes common to all Cloud Log Analytics APIs, see Cloud Log Analytics response status codes.
Response example
The response example is as follows:
{
"code": 0,
"message": "The request has been successfully processed.",
"result": {
"chartData": [
[
"11-18",
47800
],
[
"11-19",
12555
]
]
}
}
Was this article helpful?