Metrics
List metrics
Lists the metrics GET /metric_values can return, with each metric’s key, group and
definition. group is point_in_time for a value read on a row’s as_of date, such as
cash, or period for a value over its start_date to end_date, such as revenue.
GET
/
metrics
List metrics
curl --request GET \
--url https://app.finta.com/api/v1/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.finta.com/api/v1/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.finta.com/api/v1/metrics', 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://app.finta.com/api/v1/metrics",
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://app.finta.com/api/v1/metrics"
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://app.finta.com/api/v1/metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.finta.com/api/v1/metrics")
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{
"object": "list",
"url": "/api/v1/metrics",
"data": [
{
"object": "metric",
"key": "runway_months",
"group": "point_in_time",
"definition": "How many months the company's cash would last at the month's loss, rounded to whole months. The current month uses last month's loss until the 5th, then its loss so far. Already worked out, so it doesn't need cash or net income alongside it. Null when there's no loss or cash is zero."
},
{
"object": "metric",
"key": "net_income_cents",
"group": "period",
"definition": "Income minus expenses for the period, in cents. Negative is the company's burn, positive is profit."
}
]
}Was this page helpful?
⌘I
List metrics
curl --request GET \
--url https://app.finta.com/api/v1/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.finta.com/api/v1/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.finta.com/api/v1/metrics', 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://app.finta.com/api/v1/metrics",
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://app.finta.com/api/v1/metrics"
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://app.finta.com/api/v1/metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.finta.com/api/v1/metrics")
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{
"object": "list",
"url": "/api/v1/metrics",
"data": [
{
"object": "metric",
"key": "runway_months",
"group": "point_in_time",
"definition": "How many months the company's cash would last at the month's loss, rounded to whole months. The current month uses last month's loss until the 5th, then its loss so far. Already worked out, so it doesn't need cash or net income alongside it. Null when there's no loss or cash is zero."
},
{
"object": "metric",
"key": "net_income_cents",
"group": "period",
"definition": "Income minus expenses for the period, in cents. Negative is the company's burn, positive is profit."
}
]
}