mycorerepository/Postman collections/Withings API.postman_collection.json
2020-07-24 11:56:08 +02:00

361 lines
7.7 KiB
JSON

{
"variables": [],
"info": {
"name": "Withings API",
"_postman_id": "9e9a6c60-7d5f-653e-d195-55641d32770d",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
"name": "OAuth2.0 Get Authentication code",
"request": {
"url": {
"raw": "https://account.withings.com/oauth2_user/authorize2?response_type=code&client_id=90cbac16ac79260bbd38245e9c4390b409023033c2d6fc12002f09d8c41088a9&state=myhomie&scope=user.info,user.activity,user.sleepevents&redirect_uri=http://www.myhomie.be",
"protocol": "https",
"host": [
"account",
"withings",
"com"
],
"path": [
"oauth2_user",
"authorize2"
],
"query": [
{
"key": "response_type",
"value": "code",
"equals": true,
"description": ""
},
{
"key": "client_id",
"value": "90cbac16ac79260bbd38245e9c4390b409023033c2d6fc12002f09d8c41088a9",
"equals": true,
"description": ""
},
{
"key": "state",
"value": "myhomie",
"equals": true,
"description": ""
},
{
"key": "scope",
"value": "user.info,user.activity,user.sleepevents",
"equals": true,
"description": ""
},
{
"key": "redirect_uri",
"value": "http://www.myhomie.be",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "GET",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "OAuth2.0 Get your access token",
"request": {
"url": "https://account.withings.com/oauth2/token",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "grant_type",
"value": "authorization_code",
"description": "",
"type": "text"
},
{
"key": "client_id",
"value": "90cbac16ac79260bbd38245e9c4390b409023033c2d6fc12002f09d8c41088a9",
"description": "",
"type": "text"
},
{
"key": "client_secret",
"value": "39f432b72b5aa217e0b67f55f500cecbf4ee3b135da1fdc6344a4b664cc38927",
"description": "",
"type": "text"
},
{
"key": "code",
"value": "7cb0e38df94478fbc76f74bea4cfcfa4c5cc95ec",
"description": "",
"type": "text"
},
{
"key": "redirect_uri",
"value": "http://www.myhomie.be",
"description": "",
"type": "text"
}
]
},
"description": ""
},
"response": []
},
{
"name": "OAuth 2.0 - Refresh your access token",
"request": {
"url": "https://account.withings.com/oauth2/token",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "grant_type",
"value": "refresh_token",
"description": "",
"type": "text"
},
{
"key": "client_id",
"value": "90cbac16ac79260bbd38245e9c4390b409023033c2d6fc12002f09d8c41088a9",
"description": "",
"type": "text"
},
{
"key": "client_secret",
"value": "39f432b72b5aa217e0b67f55f500cecbf4ee3b135da1fdc6344a4b664cc38927",
"description": "",
"type": "text"
},
{
"key": "refresh_token",
"value": "8fe42e67d5f0c1ef59f52bf2805b0b6f398fcecc",
"description": "",
"type": "text"
}
]
},
"description": ""
},
"response": []
},
{
"name": "User - v2 Getdevice",
"request": {
"url": {
"raw": "https://wbsapi.withings.net/v2/user?action=getdevice",
"protocol": "https",
"host": [
"wbsapi",
"withings",
"net"
],
"path": [
"v2",
"user"
],
"query": [
{
"key": "action",
"value": "getdevice",
"equals": true
}
],
"variable": []
},
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer 3ba491b996dd82ae5b479682593aaf0f69a687b8",
"description": ""
}
],
"body": {},
"description": ""
},
"response": []
},
{
"name": "Sleep - v2 Get",
"request": {
"url": {
"raw": "https://wbsapi.withings.net/v2/sleep?action=get&startdate=1595527200&enddate=1595581200&data_fields=hr,rr,snoring",
"protocol": "https",
"host": [
"wbsapi",
"withings",
"net"
],
"path": [
"v2",
"sleep"
],
"query": [
{
"key": "action",
"value": "get",
"equals": true,
"description": ""
},
{
"key": "startdate",
"value": "1595527200",
"equals": true,
"description": ""
},
{
"key": "enddate",
"value": "1595581200",
"equals": true,
"description": ""
},
{
"key": "data_fields",
"value": "hr,rr,snoring",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer 3ba491b996dd82ae5b479682593aaf0f69a687b8",
"description": ""
}
],
"body": {},
"description": ""
},
"response": []
},
{
"name": "Sleep - v2 Getsummary",
"request": {
"url": {
"raw": "https://wbsapi.withings.net/v2/sleep?action=getsummary&startdateymd=2020-07-20&enddateymd=2020-07-24&data_fields=sleep_score,hr_average,snoring,lightsleepduration,remsleepduration,breathing_disturbances_intensity,wakeupcount,",
"protocol": "https",
"host": [
"wbsapi",
"withings",
"net"
],
"path": [
"v2",
"sleep"
],
"query": [
{
"key": "action",
"value": "getsummary",
"equals": true,
"description": ""
},
{
"key": "startdateymd",
"value": "2020-07-20",
"equals": true,
"description": ""
},
{
"key": "enddateymd",
"value": "2020-07-24",
"equals": true,
"description": ""
},
{
"key": "data_fields",
"value": "sleep_score,hr_average,snoring,lightsleepduration,remsleepduration,breathing_disturbances_intensity,wakeupcount,",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer 3ba491b996dd82ae5b479682593aaf0f69a687b8",
"description": ""
}
],
"body": {},
"description": ""
},
"response": []
},
{
"name": "Notify - Subscribe",
"request": {
"url": {
"raw": "https://wbsapi.withings.net/notify?action=subscribe&callbackurl=http://www.myhomie.be&appli=50",
"protocol": "https",
"host": [
"wbsapi",
"withings",
"net"
],
"path": [
"notify"
],
"query": [
{
"key": "action",
"value": "subscribe",
"equals": true,
"description": ""
},
{
"key": "callbackurl",
"value": "http://www.myhomie.be",
"equals": true,
"description": ""
},
{
"key": "appli",
"value": "50",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer 5eb27244d1f5e71d9f150f72e7fb1f9f3c7679b2",
"description": ""
}
],
"body": {},
"description": ""
},
"response": []
}
]
}