goals
goals
Page 8 of 11.
Overview
-
Drink 2L water daily
#169
-
Reduce body fat
#170
-
Lose weight
#171
-
Drink 2L water daily
#172
-
Reduce resting heart rate
#173
-
Improve flexibility
#174
-
Reduce resting heart rate
#175
-
Meditate daily
#176
-
Run a marathon
#177
-
Run a marathon
#178
-
Reduce resting heart rate
#179
-
Meditate daily
#180
-
Lose weight
#181
-
Sleep 8 hours nightly
#182
-
Bench press bodyweight
#183
-
Lose weight
#184
-
Run a 5K
#185
-
Improve flexibility
#186
-
Gain muscle mass
#187
-
Sleep 8 hours nightly
#188
-
Drink 2L water daily
#189
-
Do 100 push-ups
#190
-
Do 100 push-ups
#191
-
Reduce body fat
#192
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": 169,
"userId": 172,
"name": "Drink 2L water daily",
"category": "nutrition",
"targetValue": 2.6,
"currentValue": 1.5,
"unit": "L/day",
"deadline": null,
"isCompleted": false,
"createdAt": "2025-07-20T21:00:50.490Z"
},
{
"id": 170,
"userId": 172,
"name": "Reduce body fat",
"category": "weight",
"targetValue": 14.1,
"currentValue": 9.4,
"unit": "%",
"deadline": "2026-08-01",
"isCompleted": false,
"createdAt": "2025-10-20T22:22:57.257Z"
},
{
"id": 171,
"userId": 173,
"name": "Lose weight",
"category": "weight",
"targetValue": 64.8,
"currentValue": 53.9,
"unit": "kg",
"deadline": "2027-04-03",
"isCompleted": false,
"createdAt": "2026-04-14T01:36:34.487Z"
}
],
"meta": {
"page": 8,
"limit": 24,
"total": 244,
"totalPages": 11
},
"links": {
"self": "/api/v1/goals?page=8&limit=24",
"first": "/api/v1/goals?page=1&limit=24",
"last": "/api/v1/goals?page=11&limit=24",
"next": "/api/v1/goals?page=9&limit=24",
"prev": "/api/v1/goals?page=7&limit=24"
}
}