Get Logs Count
curl --request GET \
--url https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/logs/count \
--header 'Authorization: <api-key>'import requests
url = "https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/logs/count"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/logs/count', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/logs/count",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/logs/count"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/logs/count")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/logs/count")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"logsCount": [
{
"applicationName": "<string>",
"logsCount": "100",
"priority": "PRIORITY_UNSPECIFIED",
"severity": "SEVERITY_UNSPECIFIED",
"subsystemName": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
]
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}Data Usage Service
Get Logs Count
Returns the log ingestion count for the team.
Get Logs Count
curl --request GET \
--url https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/logs/count \
--header 'Authorization: <api-key>'import requests
url = "https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/logs/count"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/logs/count', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/logs/count",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/logs/count"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/logs/count")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/logs/count")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"logsCount": [
{
"applicationName": "<string>",
"logsCount": "100",
"priority": "PRIORITY_UNSPECIFIED",
"severity": "SEVERITY_UNSPECIFIED",
"subsystemName": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
]
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}Authorizations
API key authentication
Query Parameters
Date interval to query log ingestion counts over. This data structure represents a date range.
Show child attributes
Show child attributes
Aggregation resolution with second precision. Must be between 1 second and the date_range interval.
Optional scope filter that restricts results to the listed applications and subsystems (full match). This data structure represents a filter for scopes.
Show child attributes
Show child attributes
When true, aggregate the returned counts by subsystem name.
When true, aggregate the returned counts by application name.
Response
This data structure is used to return logs count.
The logs count.
Show child attributes
Show child attributes
Was this page helpful?