I managed to get this working by going through the google php client and noticing that they add a start and end time for the GET request with an additional 0 - nine infact.
Use the same GET request format as indicated in the answer above:
https://www.googleapis.com/fitness/v1/users/{userId}/dataSources/{dataSourceId}/datasets/{datasetId}
Now here is an example with a unix timestamp (the php time() function uses this)
https://www.googleapis.com/fitness/v1/users/me/dataSources/derived:com.google.step_count.delta:com.google.android.gms:estimated_steps/datasets/1470475368-1471080168
This is the answer I get:
{ "minStartTimeNs": "1470475368", "maxEndTimeNs": "1471080168", "dataSourceId": "derived:com.google.step_count.delta:com.google.android.gms:estimated_steps }
However, if you add a start and end time with nine 0 that you added to your GET requests, and form your request as follows:
https://www.googleapis.com/fitness/v1/users/me/dataSources/derived:com.google.step_count.delta:com.google.android.gms:estimated_steps/datasets/1470475368000000000-1471080168000000000
This worked - this is the answer I received:
{ "minStartTimeNs": "1470475368000000000", "maxEndTimeNs": "1471080168000000000", "dataSourceId": "derived:com.google.step_count.delta:com.google.android.gms:estimated_steps", "point": [ { "modifiedTimeMillis": "1470804762704", "startTimeNanos": "1470801347560000000", "endTimeNanos": "1470801347567000000", "value": [ { "intVal": -3 } ], "dataTypeName": "com.google.step_count.delta", "originDataSourceId": "raw:com.google.step_count.delta:com.dsi.ant.plugins.antplus:AntPlus.0.124" },
The answer is much longer, but I truncated it for the sake of this post. Therefore, when passing your datasets parameter to the request:
1470475368-1471080168 will not work, but 1470475368000000000-1471080168000000000 will.
It helped me, hope it helps someone!