goals
goals
Page 5 of 11.
Overview
-
Reduce body fat
#97
-
Work out 4x per week
#98
-
Run a 5K
#99
-
Bench press bodyweight
#100
-
Walk 10000 steps daily
#101
-
Reduce resting heart rate
#102
-
Meditate daily
#103
-
Run a 5K
#104
-
Do 100 push-ups
#105
-
Sleep 8 hours nightly
#106
-
Reduce resting heart rate
#107
-
Reduce body fat
#108
-
Lose weight
#109
-
Meditate daily
#110
-
Run a 5K
#111
-
Gain muscle mass
#112
-
Run a marathon
#113
-
Improve flexibility
#114
-
Bench press bodyweight
#115
-
Gain muscle mass
#116
-
Reduce resting heart rate
#117
-
Gain muscle mass
#118
-
Run a marathon
#119
-
Run a 5K
#120
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": 97,
"userId": 98,
"name": "Reduce body fat",
"category": "weight",
"targetValue": 15.3,
"currentValue": 11.1,
"unit": "%",
"deadline": "2026-11-23",
"isCompleted": false,
"createdAt": "2026-03-23T20:33:05.357Z"
},
{
"id": 98,
"userId": 100,
"name": "Work out 4x per week",
"category": "habit",
"targetValue": 4.5,
"currentValue": 4.5,
"unit": "sessions/week",
"deadline": "2026-08-02",
"isCompleted": true,
"createdAt": "2026-01-25T10:09:01.345Z"
},
{
"id": 99,
"userId": 102,
"name": "Run a 5K",
"category": "fitness",
"targetValue": 5,
"currentValue": 5,
"unit": "km",
"deadline": "2026-12-06",
"isCompleted": true,
"createdAt": "2025-06-25T08:50:47.159Z"
}
],
"meta": {
"page": 5,
"limit": 24,
"total": 244,
"totalPages": 11
},
"links": {
"self": "/api/v1/goals?page=5&limit=24",
"first": "/api/v1/goals?page=1&limit=24",
"last": "/api/v1/goals?page=11&limit=24",
"next": "/api/v1/goals?page=6&limit=24",
"prev": "/api/v1/goals?page=4&limit=24"
}
}