Get Analytics Overview
curl --request GET \
--url https://api.revring.ai/v1/analytics/overview \
--header 'x-api-key: <api-key>'import requests
url = "https://api.revring.ai/v1/analytics/overview"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.revring.ai/v1/analytics/overview', 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.revring.ai/v1/analytics/overview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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.revring.ai/v1/analytics/overview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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.revring.ai/v1/analytics/overview")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revring.ai/v1/analytics/overview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"filters": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tz": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"cards": {
"totalCalls": {
"label": "Total Calls",
"value": 123
},
"totalCost": {
"label": "Total Cost",
"valueUsd": 123,
"valueCents": 123
},
"averageDuration": {
"label": "Average Duration",
"valueSeconds": 123
},
"totalTransfers": {
"label": "Total Transfers",
"value": 123
}
},
"series": [
{
"ts": "2023-11-07T05:31:56Z",
"totalCalls": 123,
"totalTransfers": 123,
"averageDurationSeconds": 123,
"billableSeconds": 123,
"totalCostCents": 123,
"totalCostUsd": 123
}
],
"activeCalls": 123
}
}{
"error": "invalid_body",
"details": {}
}{
"error": "unauthorized"
}{
"error": "billing_inactive"
}Analytics
Get Analytics Overview
Get analytics overview with time-series data and summary cards
GET
/
analytics
/
overview
Get Analytics Overview
curl --request GET \
--url https://api.revring.ai/v1/analytics/overview \
--header 'x-api-key: <api-key>'import requests
url = "https://api.revring.ai/v1/analytics/overview"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.revring.ai/v1/analytics/overview', 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.revring.ai/v1/analytics/overview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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.revring.ai/v1/analytics/overview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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.revring.ai/v1/analytics/overview")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revring.ai/v1/analytics/overview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"filters": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tz": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"cards": {
"totalCalls": {
"label": "Total Calls",
"value": 123
},
"totalCost": {
"label": "Total Cost",
"valueUsd": 123,
"valueCents": 123
},
"averageDuration": {
"label": "Average Duration",
"valueSeconds": 123
},
"totalTransfers": {
"label": "Total Transfers",
"value": 123
}
},
"series": [
{
"ts": "2023-11-07T05:31:56Z",
"totalCalls": 123,
"totalTransfers": 123,
"averageDurationSeconds": 123,
"billableSeconds": 123,
"totalCostCents": 123,
"totalCostUsd": 123
}
],
"activeCalls": 123
}
}{
"error": "invalid_body",
"details": {}
}{
"error": "unauthorized"
}{
"error": "billing_inactive"
}Authorizations
API key for authentication. Generate API keys from the RevRing dashboard.
Query Parameters
Start date (ISO 8601)
End date (ISO 8601)
Filter by agent ID
Timezone (IANA format)
Time bucket granularity
Available options:
auto, hour, day, month Response
Analytics data
Show child attributes
Show child attributes
⌘I