goals
goals
Page 3 of 11.
Overview
-
Sleep 8 hours nightly
#49
-
Work out 4x per week
#50
-
Work out 4x per week
#51
-
Lose weight
#52
-
Drink 2L water daily
#53
-
Run a marathon
#54
-
Do 100 push-ups
#55
-
Walk 10000 steps daily
#56
-
Meditate daily
#57
-
Bench press bodyweight
#58
-
Reduce resting heart rate
#59
-
Reduce resting heart rate
#60
-
Improve flexibility
#61
-
Sleep 8 hours nightly
#62
-
Drink 2L water daily
#63
-
Sleep 8 hours nightly
#64
-
Do 100 push-ups
#65
-
Lose weight
#66
-
Meditate daily
#67
-
Reduce body fat
#68
-
Improve flexibility
#69
-
Run a marathon
#70
-
Reduce body fat
#71
-
Sleep 8 hours nightly
#72
Request
curl example
curl -sS \ "https://example-data.com/api/v1/goals?limit=25"
JavaScript example
const res = await fetch(
"https://example-data.com/api/v1/goals?limit=25"
);
const { data, meta } = await res.json(); TypeScript example
// Download once: mkdir -p types && curl -o types/goals.d.ts https://example-data.com/types/goals.d.ts
import type { Goal, ListEnvelope } from "./types/goals";
const res = await fetch(
"https://example-data.com/api/v1/goals?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Goal>; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/goals",
params={"limit": 25},
)
data = res.json() Response
{
"data": [
{
"id": 49,
"userId": 51,
"name": "Sleep 8 hours nightly",
"category": "sleep",
"targetValue": 7.9,
"currentValue": 0.8,
"unit": "hours/night",
"deadline": "2026-06-12",
"isCompleted": false,
"createdAt": "2026-04-21T01:48:38.789Z"
},
{
"id": 50,
"userId": 53,
"name": "Work out 4x per week",
"category": "habit",
"targetValue": 4.3,
"currentValue": 2,
"unit": "sessions/week",
"deadline": "2026-07-27",
"isCompleted": false,
"createdAt": "2026-01-02T20:28:01.415Z"
},
{
"id": 51,
"userId": 53,
"name": "Work out 4x per week",
"category": "habit",
"targetValue": 4.7,
"currentValue": 1.8,
"unit": "sessions/week",
"deadline": "2026-12-10",
"isCompleted": false,
"createdAt": "2025-12-08T05:34:00.236Z"
}
],
"meta": {
"page": 3,
"limit": 24,
"total": 244,
"totalPages": 11
},
"links": {
"self": "/api/v1/goals?page=3&limit=24",
"first": "/api/v1/goals?page=1&limit=24",
"last": "/api/v1/goals?page=11&limit=24",
"next": "/api/v1/goals?page=4&limit=24",
"prev": "/api/v1/goals?page=2&limit=24"
}
}