List users
curl --request GET \
--url https://api.onvy.health/users \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onvy.health/users"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onvy.health/users', 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://api.onvy.health/users",
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://api.onvy.health/users"
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://api.onvy.health/users")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onvy.health/users")
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{
"users": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"language": "<string>",
"tz_offset": 123,
"firstname": "<string>",
"lastname": "<string>",
"measurement_unit": "metric",
"gender": "male",
"birthday": "2023-12-25",
"height": 123,
"weight": 123,
"thresholds": {
"ftp": 123,
"lthr": 123,
"mhr": 123
},
"location": {
"lat": 123,
"lon": 123
},
"coach_config": {
"enabled": true
},
"data_syncs": [
{
"data_type": "auth",
"sync_type": "historical",
"provider": "GARMIN",
"status": "pending",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
],
"pagination": {
"limit": 500,
"total": 1,
"page": "<string>",
"next_page": "<string>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}users
List users
List all users in the project with pagination
GET
/
users
List users
curl --request GET \
--url https://api.onvy.health/users \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onvy.health/users"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onvy.health/users', 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://api.onvy.health/users",
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://api.onvy.health/users"
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://api.onvy.health/users")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onvy.health/users")
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{
"users": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"language": "<string>",
"tz_offset": 123,
"firstname": "<string>",
"lastname": "<string>",
"measurement_unit": "metric",
"gender": "male",
"birthday": "2023-12-25",
"height": 123,
"weight": 123,
"thresholds": {
"ftp": 123,
"lthr": 123,
"mhr": 123
},
"location": {
"lat": 123,
"lon": 123
},
"coach_config": {
"enabled": true
},
"data_syncs": [
{
"data_type": "auth",
"sync_type": "historical",
"provider": "GARMIN",
"status": "pending",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
],
"pagination": {
"limit": 500,
"total": 1,
"page": "<string>",
"next_page": "<string>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
OAuth bearer token for Health API authentication
Query Parameters
Page Key for pagination
Number of items per page
Required range:
1 <= x <= 1000Was this page helpful?