Journey stats rollup
curl --request GET \
--url https://api.inflection.io/v2/journeys/stats \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.inflection.io/v2/journeys/stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.inflection.io/v2/journeys/stats', 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.inflection.io/v2/journeys/stats",
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: Bearer <token>"
],
]);
$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.inflection.io/v2/journeys/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.inflection.io/v2/journeys/stats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.inflection.io/v2/journeys/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"aggregate": {
"totalCount": 123,
"notSentCount": 123,
"processedCount": 123,
"deliveredCount": 123,
"droppedCount": 123,
"bounceCount": 123,
"spamreportCount": 123,
"totalOpenCount": 123,
"uniqueOpenCount": 123,
"totalClickCount": 123,
"uniqueClickCountByUrl": 123,
"uniqueClickCountByEmail": 123,
"unsubCount": 123
},
"records": [
{
"journeyId": "<string>",
"totalCount": 123,
"notSentCount": 123,
"processedCount": 123,
"deliveredCount": 123,
"droppedCount": 123,
"bounceCount": 123,
"spamreportCount": 123,
"totalOpenCount": 123,
"uniqueOpenCount": 123,
"totalClickCount": 123,
"uniqueClickCountByUrl": 123,
"uniqueClickCountByEmail": 123,
"unsubCount": 123
}
]
},
"pagination": {
"pageNumber": 123,
"pageSize": 123,
"totalElements": 123,
"totalPages": 123
},
"meta": {
"status": "SUCCESS",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"errors": [
{
"errorCode": "NOT_FOUND",
"message": "<string>",
"detail": "<string>"
}
],
"meta": {
"status": "SUCCESS",
"timestamp": "2023-11-07T05:31:56Z"
}
}Stats
Journey stats rollup
Counters for many journeys in one call, so reporting on 50 journeys is one request rather than 50.
data.aggregate is a single ungrouped query over the whole matching
set, so it is not the sum of data.records. Those cover only the
current page. pagination.totalElements counts the whole matching set.
At most one of ids, tag, folderId may be given; more than one
is a 400. Explicit ids return a full row of zeros for a journey with no
activity, whereas a tag/folderId/unfiltered request returns only
journeys that have activity. A filter matching more than 1000 journeys is
a 400 (RESULT_SET_TOO_LARGE). Nothing is silently trimmed. That guard
cannot trigger when ids is used, since ids is itself capped at 50.
GET
/
v2
/
journeys
/
stats
Journey stats rollup
curl --request GET \
--url https://api.inflection.io/v2/journeys/stats \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.inflection.io/v2/journeys/stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.inflection.io/v2/journeys/stats', 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.inflection.io/v2/journeys/stats",
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: Bearer <token>"
],
]);
$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.inflection.io/v2/journeys/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.inflection.io/v2/journeys/stats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.inflection.io/v2/journeys/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"aggregate": {
"totalCount": 123,
"notSentCount": 123,
"processedCount": 123,
"deliveredCount": 123,
"droppedCount": 123,
"bounceCount": 123,
"spamreportCount": 123,
"totalOpenCount": 123,
"uniqueOpenCount": 123,
"totalClickCount": 123,
"uniqueClickCountByUrl": 123,
"uniqueClickCountByEmail": 123,
"unsubCount": 123
},
"records": [
{
"journeyId": "<string>",
"totalCount": 123,
"notSentCount": 123,
"processedCount": 123,
"deliveredCount": 123,
"droppedCount": 123,
"bounceCount": 123,
"spamreportCount": 123,
"totalOpenCount": 123,
"uniqueOpenCount": 123,
"totalClickCount": 123,
"uniqueClickCountByUrl": 123,
"uniqueClickCountByEmail": 123,
"unsubCount": 123
}
]
},
"pagination": {
"pageNumber": 123,
"pageSize": 123,
"totalElements": 123,
"totalPages": 123
},
"meta": {
"status": "SUCCESS",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"errors": [
{
"errorCode": "NOT_FOUND",
"message": "<string>",
"detail": "<string>"
}
],
"meta": {
"status": "SUCCESS",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
Query Parameters
Was this page helpful?