Garmin Connect API REST

You can GET/PUT data from/to Garmin connect by using a REST API.
REST are just simple URLs you write in your browser and get a response as JSON data that can easily be converted to an array.

I have done tests to login but have failed. I also did not get the examples below to work at all.

PHP example

REST api documentation
http://sergeykrasnov.ru/subsites/dev/garmin-connect-statisics/
http://sergeykrasnov.ru/subsites/dev/garmin-connect-statisics/web_api.php
https://forums.garmin.com/showthread.php?29754-REST-API-to-connect-garmin-com

Login as usual on connect.garmin.com
If you got REST working but then stopped working, then click around on connect.garmin.com and try the REST again.

Download gpx file from activity
http://connect.garmin.com/proxy/activity-service-1.3/gpx/activity/328408299
You can see your activity number by viewing it in connect.garmin.com

Get activities (json response)
http://connect.garmin.com/proxy/activity-search-service-1.2/json/activities?
Give you the latest activities

Get newest activity
http://connect.garmin.com/proxy/activity-search-service-1.2/json/activities?start=0&limit=1
’start’=start this number of activities back in time. 0=newest, 1=second newest
’limit’=number of activities to get in the json response

Find activities
With the command above you can exchange the parameters to find activities. See documentation
Documentation: http://connect.garmin.com/proxy/activity-search-service-1.2/rest.activities.html

—->
From:  sergeykrasnov.ru
This is important information, I make it available here too. Check it out.
—->

Currently the Garmin Connect Web Services API is under development.
I collected some references on parts of Garmin web api.
Most of them can return result in JSON format.
Hope it help us in making good applications with Garmin web api.

Garmin web services api urls:
with documentation:

http://connect.garmin.com/proxy/activity-service-1.3/
http://connect.garmin.com/proxy/activity-search-service-1.2/
http://connect.garmin.com/proxy/upload-service-1.1/
http://connect.garmin.com/proxy/goal-service-1.1/
http://connect.garmin.com/proxy/user-service-1.0/
http://connect.garmin.com/proxy/calendar-service-1.0/
http://connect.garmin.com/proxy/device-service-1.1/
http://connect.garmin.com/proxy/course-service-1.0/
http://connect.garmin.com/proxy/workout-service-1.0/

without documentation:

http://connect.garmin.com/proxy/userstats-service/
http://connect.garmin.com/proxy/personalrecord-service/
http://connect.garmin.com/proxy/userprofile-service/
http://connect.garmin.com/proxy/comment-service/
http://connect.garmin.com/proxy/event-service/
http://connect.garmin.com/proxy/activitylist-service/

Authentication:
For making most of actions with api you should be authentificated.

Do HTTP POST request to https://connect.garmin.com/signin with parameters:
loginUsernameField
password

For receiving data without authorization need allow vieweing your profile for everyone in garmin privacy settings.
Get statistics data in JSON format and parse it.

User Statistics:
http://connect.garmin.com/proxy/userstats-service/statistics/monthly/username
http://connect.garmin.com/proxy/userstats-service/statistics/monthly/username?ByParentType=true
http://connect.garmin.com/proxy/userstats-service/statistics/previousDays/username
http://connect.garmin.com/proxy/userstats-service/statistics/previousDays/username?ByParentType=true
Personal records:
http://connect.garmin.com/proxy/personalrecord-service/personalrecord/prs/username

Public activities:
http://connect.garmin.com/proxy/activitylist-service/activities/username?start=1&limit=10

Web API examples: http://sergeykrasnov.ru/subsites/dev/garmin-connect-statisics/examples.php
Example 1: Total distance (team-garmin)
Request string
http://connect.garmin.com/proxy/userstats-service/statistics/previousDays/team-garmin

Example 2: Distance Graph by months (team-garmin)
Request string
http://connect.garmin.com/proxy/userstats-service/statistics/monthly/team-garmin?ByParentType=true
http://sergeykrasnov.ru/subsites/dev/garmin-connect-statisics/ex2.php