> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fynapse.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fynapse.app/_mcp/server.

# Statistics via API

> Learn how retrieve statistic information using the Fynapse REST API.

## Overview

Fynapse allows you to gather different metrics using REST API endpoints.

## Retrieving Metrics Using REST API

This section covers the steps required to retrieve statistical metrics using REST API.

## Statistics REST API Endpoints

### Get Processing Statistics

Allows you to retrieve current processing status of ingested data.

**Example**

### Request

GET [https://api.fynapse.com/api/v1/namespaces](https://api.fynapse.com/api/v1/namespaces)

**`Example Namespaces`**

```curl Example Namespaces
curl https://api.fynapse.com/api/v1/namespaces \
     -H "Authorization: Bearer <token>"
```

**`Example Namespaces`**

```python Example Namespaces
import requests

url = "https://api.fynapse.com/api/v1/namespaces"

headers = {"Authorization": "<token>."}

response = requests.get(url, headers=headers)

print(response.json())
```

**`Example Namespaces`**

```javascript Example Namespaces
const url = 'https://api.fynapse.com/api/v1/namespaces';
const options = {method: 'GET', headers: {Authorization: '<token>.'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**`Example Namespaces`**

```go Example Namespaces
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fynapse.com/api/v1/namespaces"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<token>.")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

**`Example Namespaces`**

```ruby Example Namespaces
require 'uri'
require 'net/http'

url = URI("https://api.fynapse.com/api/v1/namespaces")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<token>.'

response = http.request(request)
puts response.read_body
```

**`Example Namespaces`**

```java Example Namespaces
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.fynapse.com/api/v1/namespaces")
  .header("Authorization", "<token>.")
  .asString();
```

**`Example Namespaces`**

```php Example Namespaces
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fynapse.com/api/v1/namespaces', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

echo $response->getBody();
```

**`Example Namespaces`**

```csharp Example Namespaces
using RestSharp;

var client = new RestClient("https://api.fynapse.com/api/v1/namespaces");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

**`Example Namespaces`**

```swift Example Namespaces
import Foundation

let headers = ["Authorization": "<token>."]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fynapse.com/api/v1/namespaces")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Response (200)

```json
{
  "data": [
    {
      "name": "fynapse"
    },
    {
      "name": "custom-namespace"
    }
  ]
}
```

### Get Ingestion Metrics

Allows you to retrieve information about ingestions, both API-sourced and from ingestion files, in a defined period.

**Example**

### Request

GET [https://api.fynapse.com/api/v1/statistics/operational-dashboard/ingestion-metrics](https://api.fynapse.com/api/v1/statistics/operational-dashboard/ingestion-metrics)

**`Ingestion metrics`**

```curl Ingestion metrics
curl -G https://api.fynapse.com/api/v1/statistics/operational-dashboard/ingestion-metrics \
     -H "Authorization: Bearer <token>" \
     -d from=from \
     -d to=to
```

**`Ingestion metrics`**

```python Ingestion metrics
import requests

url = "https://api.fynapse.com/api/v1/statistics/operational-dashboard/ingestion-metrics"

querystring = {"from":"from","to":"to"}

headers = {"Authorization": "<token>."}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

**`Ingestion metrics`**

```javascript Ingestion metrics
const url = 'https://api.fynapse.com/api/v1/statistics/operational-dashboard/ingestion-metrics?from=from&to=to';
const options = {method: 'GET', headers: {Authorization: '<token>.'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**`Ingestion metrics`**

```go Ingestion metrics
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fynapse.com/api/v1/statistics/operational-dashboard/ingestion-metrics?from=from&to=to"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<token>.")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

**`Ingestion metrics`**

```ruby Ingestion metrics
require 'uri'
require 'net/http'

url = URI("https://api.fynapse.com/api/v1/statistics/operational-dashboard/ingestion-metrics?from=from&to=to")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<token>.'

response = http.request(request)
puts response.read_body
```

**`Ingestion metrics`**

```java Ingestion metrics
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.fynapse.com/api/v1/statistics/operational-dashboard/ingestion-metrics?from=from&to=to")
  .header("Authorization", "<token>.")
  .asString();
```

**`Ingestion metrics`**

```php Ingestion metrics
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fynapse.com/api/v1/statistics/operational-dashboard/ingestion-metrics?from=from&to=to', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

echo $response->getBody();
```

**`Ingestion metrics`**

```csharp Ingestion metrics
using RestSharp;

var client = new RestClient("https://api.fynapse.com/api/v1/statistics/operational-dashboard/ingestion-metrics?from=from&to=to");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

**`Ingestion metrics`**

```swift Ingestion metrics
import Foundation

let headers = ["Authorization": "<token>."]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fynapse.com/api/v1/statistics/operational-dashboard/ingestion-metrics?from=from&to=to")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Response (200)

```json
{
  "pendingFiles": 5,
  "processedFiles": 20,
  "referenceFiles": 10,
  "apiCalls": 15,
  "erroredFiles": 2
}
```

### Get Journal Metrics

Allows you to retrieve information about the status of ingested Journals in a defined period.

**Example**

### Request

GET [https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics](https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics)

**`Journal metrics`**

```curl Journal metrics
curl -G https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics \
     -H "Authorization: Bearer <token>" \
     -d from=from \
     -d to=to
```

**`Journal metrics`**

```python Journal metrics
import requests

url = "https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics"

querystring = {"from":"from","to":"to"}

headers = {"Authorization": "<token>."}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

**`Journal metrics`**

```javascript Journal metrics
const url = 'https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics?from=from&to=to';
const options = {method: 'GET', headers: {Authorization: '<token>.'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**`Journal metrics`**

```go Journal metrics
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics?from=from&to=to"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<token>.")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

**`Journal metrics`**

```ruby Journal metrics
require 'uri'
require 'net/http'

url = URI("https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics?from=from&to=to")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<token>.'

response = http.request(request)
puts response.read_body
```

**`Journal metrics`**

```java Journal metrics
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics?from=from&to=to")
  .header("Authorization", "<token>.")
  .asString();
```

**`Journal metrics`**

```php Journal metrics
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics?from=from&to=to', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

echo $response->getBody();
```

**`Journal metrics`**

```csharp Journal metrics
using RestSharp;

var client = new RestClient("https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics?from=from&to=to");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

**`Journal metrics`**

```swift Journal metrics
import Foundation

let headers = ["Authorization": "<token>."]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics?from=from&to=to")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Response (200)

```json
{
  "awaitingApproval": 4,
  "deniedApproval": 1,
  "postedJournals": 10,
  "unpostedJournals": 3,
  "totalJournalLines": 150,
  "errors": 5
}
```

### Get Journal Metrics by Day

Allows you to retrieve information about the status of ingested Journals per day.

**Example**

### Request

GET [https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics-by-day](https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics-by-day)

**`Journal metrics by day`**

```curl Journal metrics by day
curl -G https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics-by-day \
     -H "Authorization: Bearer <token>" \
     -d from=from \
     -d to=to
```

**`Journal metrics by day`**

```python Journal metrics by day
import requests

url = "https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics-by-day"

querystring = {"from":"from","to":"to"}

headers = {"Authorization": "<token>."}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

**`Journal metrics by day`**

```javascript Journal metrics by day
const url = 'https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics-by-day?from=from&to=to';
const options = {method: 'GET', headers: {Authorization: '<token>.'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**`Journal metrics by day`**

```go Journal metrics by day
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics-by-day?from=from&to=to"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<token>.")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

**`Journal metrics by day`**

```ruby Journal metrics by day
require 'uri'
require 'net/http'

url = URI("https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics-by-day?from=from&to=to")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<token>.'

response = http.request(request)
puts response.read_body
```

**`Journal metrics by day`**

```java Journal metrics by day
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics-by-day?from=from&to=to")
  .header("Authorization", "<token>.")
  .asString();
```

**`Journal metrics by day`**

```php Journal metrics by day
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics-by-day?from=from&to=to', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

echo $response->getBody();
```

**`Journal metrics by day`**

```csharp Journal metrics by day
using RestSharp;

var client = new RestClient("https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics-by-day?from=from&to=to");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

**`Journal metrics by day`**

```swift Journal metrics by day
import Foundation

let headers = ["Authorization": "<token>."]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fynapse.com/api/v1/statistics/operational-dashboard/journal-metrics-by-day?from=from&to=to")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Response (200)

```json
{
  "0": {
    "day": "2024-05-01",
    "errors": 2,
    "postedJournals": 3,
    "totalJournalLines": 50,
    "unpostedJournals": 1
  },
  "1": {
    "day": "2024-05-02",
    "errors": 1,
    "postedJournals": 4,
    "totalJournalLines": 60,
    "unpostedJournals": 1
  }
}
```

### Get Processing Metrics

Allows you to retrieve information about Business Event processing metrics and the total number of records generated by a Flow.

**Example**

### Request

GET [https://api.fynapse.com/api/v1/statistics/operational-dashboard/processing-metrics](https://api.fynapse.com/api/v1/statistics/operational-dashboard/processing-metrics)

**`Processing metrics`**

```curl Processing metrics
curl -G https://api.fynapse.com/api/v1/statistics/operational-dashboard/processing-metrics \
     -H "Authorization: Bearer <token>" \
     -d from=from \
     -d to=to
```

**`Processing metrics`**

```python Processing metrics
import requests

url = "https://api.fynapse.com/api/v1/statistics/operational-dashboard/processing-metrics"

querystring = {"from":"from","to":"to"}

headers = {"Authorization": "<token>."}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

**`Processing metrics`**

```javascript Processing metrics
const url = 'https://api.fynapse.com/api/v1/statistics/operational-dashboard/processing-metrics?from=from&to=to';
const options = {method: 'GET', headers: {Authorization: '<token>.'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**`Processing metrics`**

```go Processing metrics
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fynapse.com/api/v1/statistics/operational-dashboard/processing-metrics?from=from&to=to"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<token>.")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

**`Processing metrics`**

```ruby Processing metrics
require 'uri'
require 'net/http'

url = URI("https://api.fynapse.com/api/v1/statistics/operational-dashboard/processing-metrics?from=from&to=to")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<token>.'

response = http.request(request)
puts response.read_body
```

**`Processing metrics`**

```java Processing metrics
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.fynapse.com/api/v1/statistics/operational-dashboard/processing-metrics?from=from&to=to")
  .header("Authorization", "<token>.")
  .asString();
```

**`Processing metrics`**

```php Processing metrics
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fynapse.com/api/v1/statistics/operational-dashboard/processing-metrics?from=from&to=to', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

echo $response->getBody();
```

**`Processing metrics`**

```csharp Processing metrics
using RestSharp;

var client = new RestClient("https://api.fynapse.com/api/v1/statistics/operational-dashboard/processing-metrics?from=from&to=to");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

**`Processing metrics`**

```swift Processing metrics
import Foundation

let headers = ["Authorization": "<token>."]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fynapse.com/api/v1/statistics/operational-dashboard/processing-metrics?from=from&to=to")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Response (200)

```json
{
  "errors": 7,
  "businessEvents": 100,
  "flowTriggersTotal": 150,
  "flowTriggersByEntity": "string"
}
```

### Get Throughput Metrics

Allows you to retrieve information about the daily average processing speed of ingested Journal Lines per day.

**Example**

### Request

GET [https://api.fynapse.com/api/v1/statistics/operational-dashboard/throughput-metrics](https://api.fynapse.com/api/v1/statistics/operational-dashboard/throughput-metrics)

```curl
curl -G https://api.fynapse.com/api/v1/statistics/operational-dashboard/throughput-metrics \
     -H "Authorization: Bearer <token>" \
     -d from=from \
     -d to=to
```

```python
import requests

url = "https://api.fynapse.com/api/v1/statistics/operational-dashboard/throughput-metrics"

querystring = {"from":"from","to":"to"}

headers = {"Authorization": "<token>."}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.fynapse.com/api/v1/statistics/operational-dashboard/throughput-metrics?from=from&to=to';
const options = {method: 'GET', headers: {Authorization: '<token>.'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fynapse.com/api/v1/statistics/operational-dashboard/throughput-metrics?from=from&to=to"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<token>.")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.fynapse.com/api/v1/statistics/operational-dashboard/throughput-metrics?from=from&to=to")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<token>.'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.fynapse.com/api/v1/statistics/operational-dashboard/throughput-metrics?from=from&to=to")
  .header("Authorization", "<token>.")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fynapse.com/api/v1/statistics/operational-dashboard/throughput-metrics?from=from&to=to', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.fynapse.com/api/v1/statistics/operational-dashboard/throughput-metrics?from=from&to=to");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<token>."]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fynapse.com/api/v1/statistics/operational-dashboard/throughput-metrics?from=from&to=to")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Response (200)

```json
[
  {
    "day": "2023-01-15",
    "completedIngests": 1,
    "journalLines": 1,
    "processingTimeSeconds": 1,
    "avgJournalLinesPerHour": 1.1
  }
]
```