Get Spans Count
curl --request GET \
--url https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/spans/count \
--header 'Authorization: <api-key>'import requests
url = "https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/spans/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/spans/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/spans/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/spans/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/spans/count")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/spans/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{
"spansCount": [
{
"errorSpanCount": "10",
"lowErrorSpanCount": "5",
"lowSuccessSpanCount": "50",
"mediumErrorSpanCount": "20",
"mediumSuccessSpanCount": "200",
"successSpanCount": "100",
"timestamp": "2021-01-01T00:00:00.000Z"
}
]
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}Data Usage Service
Get Spans Count
Returns the span ingestion count for the team.
Get Spans Count
curl --request GET \
--url https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/spans/count \
--header 'Authorization: <api-key>'import requests
url = "https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/spans/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/spans/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/spans/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/spans/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/spans/count")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/5/dataplans/data-usage/v2/spans/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{
"spansCount": [
{
"errorSpanCount": "10",
"lowErrorSpanCount": "5",
"lowSuccessSpanCount": "50",
"mediumErrorSpanCount": "20",
"mediumSuccessSpanCount": "200",
"successSpanCount": "100",
"timestamp": "2021-01-01T00:00:00.000Z"
}
]
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}Authorizations
API key authentication
Query Parameters
Date interval to query span 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
Response
This data structure is used to return spans count.
The spans count.
Show child attributes
Show child attributes
Was this page helpful?
⌘I