List goals
curl --request GET \
--url https://vitalog-api.example.com/v1/goals \
--header 'Authorization: Bearer <token>'import requests
url = "https://vitalog-api.example.com/v1/goals"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vitalog-api.example.com/v1/goals', 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://vitalog-api.example.com/v1/goals",
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://vitalog-api.example.com/v1/goals"
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://vitalog-api.example.com/v1/goals")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitalog-api.example.com/v1/goals")
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{
"catalog_version": "1.0.4",
"goals": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metric": "measurement:weight",
"version": 123,
"period": "daily",
"direction": "maximum",
"target": 123,
"unit": "<string>",
"baseline": 500000000000,
"status": "active",
"effective_on": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"returned_count": 500000000
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}List goals
List current goals, active by default. Use health_get_goal_progress for historical goals and observed progress on a particular date.
GET
/
v1
/
goals
List goals
curl --request GET \
--url https://vitalog-api.example.com/v1/goals \
--header 'Authorization: Bearer <token>'import requests
url = "https://vitalog-api.example.com/v1/goals"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vitalog-api.example.com/v1/goals', 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://vitalog-api.example.com/v1/goals",
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://vitalog-api.example.com/v1/goals"
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://vitalog-api.example.com/v1/goals")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitalog-api.example.com/v1/goals")
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{
"catalog_version": "1.0.4",
"goals": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metric": "measurement:weight",
"version": 123,
"period": "daily",
"direction": "maximum",
"target": 123,
"unit": "<string>",
"baseline": 500000000000,
"status": "active",
"effective_on": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"returned_count": 500000000
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}Authorizations
staticKeyapiKeybrowserSession
Environment AUTH_KEY. Full ledger access and primary API-key administration. Not OAuth or JWT.
Query Parameters
Exactly one parameter; booleans are true/false, arrays are comma-separated. Empty values are rejected.
Available options:
active, archived, all Was this page helpful?
