OLD | NEW |
(Empty) | |
| 1 { |
| 2 "auth": { |
| 3 "oauth2": { |
| 4 "scopes": { |
| 5 "https://www.googleapis.com/auth/fitness.activity.read": { |
| 6 "description": "View your activity information in Google Fit
" |
| 7 }, |
| 8 "https://www.googleapis.com/auth/fitness.activity.write": { |
| 9 "description": "View and store your activity information in
Google Fit" |
| 10 }, |
| 11 "https://www.googleapis.com/auth/fitness.body.read": { |
| 12 "description": "View body sensor information in Google Fit" |
| 13 }, |
| 14 "https://www.googleapis.com/auth/fitness.body.write": { |
| 15 "description": "View and store body sensor data in Google Fi
t" |
| 16 }, |
| 17 "https://www.googleapis.com/auth/fitness.location.read": { |
| 18 "description": "View your stored location data in Google Fit
" |
| 19 }, |
| 20 "https://www.googleapis.com/auth/fitness.location.write": { |
| 21 "description": "View and store your location data in Google
Fit" |
| 22 } |
| 23 } |
| 24 } |
| 25 }, |
| 26 "basePath": "/fitness/v1/users/", |
| 27 "baseUrl": "https://www.googleapis.com/fitness/v1/users/", |
| 28 "batchPath": "batch", |
| 29 "description": "Google Fit API", |
| 30 "discoveryVersion": "v1", |
| 31 "etag": "\"l66ggWbucbkBw9Lpos72oziyefE/TfpgqPaBHwKM6ZXQvQNWyFJhjHY\"", |
| 32 "icons": { |
| 33 "x16": "http://www.google.com/images/icons/product/search-16.gif", |
| 34 "x32": "http://www.google.com/images/icons/product/search-32.gif" |
| 35 }, |
| 36 "id": "fitness:v1", |
| 37 "kind": "discovery#restDescription", |
| 38 "name": "fitness", |
| 39 "ownerDomain": "google.com", |
| 40 "ownerName": "Google", |
| 41 "parameters": { |
| 42 "alt": { |
| 43 "default": "json", |
| 44 "description": "Data format for the response.", |
| 45 "enum": [ |
| 46 "json" |
| 47 ], |
| 48 "enumDescriptions": [ |
| 49 "Responses with Content-Type of application/json" |
| 50 ], |
| 51 "location": "query", |
| 52 "type": "string" |
| 53 }, |
| 54 "fields": { |
| 55 "description": "Selector specifying which fields to include in a par
tial response.", |
| 56 "location": "query", |
| 57 "type": "string" |
| 58 }, |
| 59 "key": { |
| 60 "description": "API key. Your API key identifies your project and pr
ovides you with API access, quota, and reports. Required unless you provide an O
Auth 2.0 token.", |
| 61 "location": "query", |
| 62 "type": "string" |
| 63 }, |
| 64 "oauth_token": { |
| 65 "description": "OAuth 2.0 token for the current user.", |
| 66 "location": "query", |
| 67 "type": "string" |
| 68 }, |
| 69 "prettyPrint": { |
| 70 "default": "true", |
| 71 "description": "Returns response with indentations and line breaks."
, |
| 72 "location": "query", |
| 73 "type": "boolean" |
| 74 }, |
| 75 "quotaUser": { |
| 76 "description": "Available to use for quota purposes for server-side
applications. Can be any arbitrary string assigned to a user, but should not exc
eed 40 characters. Overrides userIp if both are provided.", |
| 77 "location": "query", |
| 78 "type": "string" |
| 79 }, |
| 80 "userIp": { |
| 81 "description": "IP address of the site where the request originates.
Use this if you want to enforce per-user limits.", |
| 82 "location": "query", |
| 83 "type": "string" |
| 84 } |
| 85 }, |
| 86 "protocol": "rest", |
| 87 "resources": { |
| 88 "users": { |
| 89 "resources": { |
| 90 "dataSources": { |
| 91 "methods": { |
| 92 "create": { |
| 93 "description": "Creates a new data source that is un
ique across all data sources belonging to this user. The data stream ID field ca
n be omitted and will be generated by the server with the correct format. The da
ta stream ID is an ordered combination of some fields from the data source. In a
ddition to the data source fields reflected into the data source ID, the develop
er project number that is authenticated when creating the data source is include
d. This developer project number is obfuscated when read by any other developer
reading public data types.", |
| 94 "httpMethod": "POST", |
| 95 "id": "fitness.users.dataSources.create", |
| 96 "parameterOrder": [ |
| 97 "userId" |
| 98 ], |
| 99 "parameters": { |
| 100 "userId": { |
| 101 "description": "Create the data source for t
he person identified. Use me to indicate the authenticated user. Only me is supp
orted at this time.", |
| 102 "location": "path", |
| 103 "required": true, |
| 104 "type": "string" |
| 105 } |
| 106 }, |
| 107 "path": "{userId}/dataSources", |
| 108 "request": { |
| 109 "$ref": "DataSource" |
| 110 }, |
| 111 "response": { |
| 112 "$ref": "DataSource" |
| 113 }, |
| 114 "scopes": [ |
| 115 "https://www.googleapis.com/auth/fitness.activit
y.write", |
| 116 "https://www.googleapis.com/auth/fitness.body.wr
ite", |
| 117 "https://www.googleapis.com/auth/fitness.locatio
n.write" |
| 118 ] |
| 119 }, |
| 120 "get": { |
| 121 "description": "Returns a data source identified by
a data stream ID.", |
| 122 "httpMethod": "GET", |
| 123 "id": "fitness.users.dataSources.get", |
| 124 "parameterOrder": [ |
| 125 "userId", |
| 126 "dataSourceId" |
| 127 ], |
| 128 "parameters": { |
| 129 "dataSourceId": { |
| 130 "description": "The data stream ID of the da
ta source to retrieve.", |
| 131 "location": "path", |
| 132 "required": true, |
| 133 "type": "string" |
| 134 }, |
| 135 "userId": { |
| 136 "description": "Retrieve a data source for t
he person identified. Use me to indicate the authenticated user. Only me is supp
orted at this time.", |
| 137 "location": "path", |
| 138 "required": true, |
| 139 "type": "string" |
| 140 } |
| 141 }, |
| 142 "path": "{userId}/dataSources/{dataSourceId}", |
| 143 "response": { |
| 144 "$ref": "DataSource" |
| 145 }, |
| 146 "scopes": [ |
| 147 "https://www.googleapis.com/auth/fitness.activit
y.read", |
| 148 "https://www.googleapis.com/auth/fitness.activit
y.write", |
| 149 "https://www.googleapis.com/auth/fitness.body.re
ad", |
| 150 "https://www.googleapis.com/auth/fitness.body.wr
ite", |
| 151 "https://www.googleapis.com/auth/fitness.locatio
n.read", |
| 152 "https://www.googleapis.com/auth/fitness.locatio
n.write" |
| 153 ] |
| 154 }, |
| 155 "list": { |
| 156 "description": "Lists all data sources that are visi
ble to the developer, using the OAuth scopes provided. The list is not exhaustiv
e: the user may have private data sources that are only visible to other develop
ers or calls using other scopes.", |
| 157 "httpMethod": "GET", |
| 158 "id": "fitness.users.dataSources.list", |
| 159 "parameterOrder": [ |
| 160 "userId" |
| 161 ], |
| 162 "parameters": { |
| 163 "dataTypeName": { |
| 164 "description": "The names of data types to i
nclude in the list. If not specified, all data sources will be returned.", |
| 165 "location": "query", |
| 166 "repeated": true, |
| 167 "type": "string" |
| 168 }, |
| 169 "userId": { |
| 170 "description": "List data sources for the pe
rson identified. Use me to indicate the authenticated user. Only me is supported
at this time.", |
| 171 "location": "path", |
| 172 "required": true, |
| 173 "type": "string" |
| 174 } |
| 175 }, |
| 176 "path": "{userId}/dataSources", |
| 177 "response": { |
| 178 "$ref": "ListDataSourcesResponse" |
| 179 }, |
| 180 "scopes": [ |
| 181 "https://www.googleapis.com/auth/fitness.activit
y.read", |
| 182 "https://www.googleapis.com/auth/fitness.activit
y.write", |
| 183 "https://www.googleapis.com/auth/fitness.body.re
ad", |
| 184 "https://www.googleapis.com/auth/fitness.body.wr
ite", |
| 185 "https://www.googleapis.com/auth/fitness.locatio
n.read", |
| 186 "https://www.googleapis.com/auth/fitness.locatio
n.write" |
| 187 ] |
| 188 }, |
| 189 "patch": { |
| 190 "description": "Updates a given data source. It is a
n error to modify the data source's data stream ID, data type, type, stream name
or device information apart from the device version. Changing these fields woul
d require a new unique data stream ID and separate data source.\n\nData sources
are identified by their data stream ID. This method supports patch semantics.", |
| 191 "httpMethod": "PATCH", |
| 192 "id": "fitness.users.dataSources.patch", |
| 193 "parameterOrder": [ |
| 194 "userId", |
| 195 "dataSourceId" |
| 196 ], |
| 197 "parameters": { |
| 198 "dataSourceId": { |
| 199 "description": "The data stream ID of the da
ta source to update.", |
| 200 "location": "path", |
| 201 "required": true, |
| 202 "type": "string" |
| 203 }, |
| 204 "userId": { |
| 205 "description": "Update the data source for t
he person identified. Use me to indicate the authenticated user. Only me is supp
orted at this time.", |
| 206 "location": "path", |
| 207 "required": true, |
| 208 "type": "string" |
| 209 } |
| 210 }, |
| 211 "path": "{userId}/dataSources/{dataSourceId}", |
| 212 "request": { |
| 213 "$ref": "DataSource" |
| 214 }, |
| 215 "response": { |
| 216 "$ref": "DataSource" |
| 217 }, |
| 218 "scopes": [ |
| 219 "https://www.googleapis.com/auth/fitness.activit
y.write", |
| 220 "https://www.googleapis.com/auth/fitness.body.wr
ite", |
| 221 "https://www.googleapis.com/auth/fitness.locatio
n.write" |
| 222 ] |
| 223 }, |
| 224 "update": { |
| 225 "description": "Updates a given data source. It is a
n error to modify the data source's data stream ID, data type, type, stream name
or device information apart from the device version. Changing these fields woul
d require a new unique data stream ID and separate data source.\n\nData sources
are identified by their data stream ID.", |
| 226 "httpMethod": "PUT", |
| 227 "id": "fitness.users.dataSources.update", |
| 228 "parameterOrder": [ |
| 229 "userId", |
| 230 "dataSourceId" |
| 231 ], |
| 232 "parameters": { |
| 233 "dataSourceId": { |
| 234 "description": "The data stream ID of the da
ta source to update.", |
| 235 "location": "path", |
| 236 "required": true, |
| 237 "type": "string" |
| 238 }, |
| 239 "userId": { |
| 240 "description": "Update the data source for t
he person identified. Use me to indicate the authenticated user. Only me is supp
orted at this time.", |
| 241 "location": "path", |
| 242 "required": true, |
| 243 "type": "string" |
| 244 } |
| 245 }, |
| 246 "path": "{userId}/dataSources/{dataSourceId}", |
| 247 "request": { |
| 248 "$ref": "DataSource" |
| 249 }, |
| 250 "response": { |
| 251 "$ref": "DataSource" |
| 252 }, |
| 253 "scopes": [ |
| 254 "https://www.googleapis.com/auth/fitness.activit
y.write", |
| 255 "https://www.googleapis.com/auth/fitness.body.wr
ite", |
| 256 "https://www.googleapis.com/auth/fitness.locatio
n.write" |
| 257 ] |
| 258 } |
| 259 }, |
| 260 "resources": { |
| 261 "datasets": { |
| 262 "methods": { |
| 263 "delete": { |
| 264 "description": "Performs an inclusive delete
of all data points whose start and end times have any overlap with the time ran
ge specified by the dataset ID. For most data types, the entire data point will
be deleted. For data types where the time span represents a consistent value (su
ch as com.google.activity.segment), and a data point straddles either end point
of the dataset, only the overlapping portion of the data point will be deleted."
, |
| 265 "httpMethod": "DELETE", |
| 266 "id": "fitness.users.dataSources.datasets.de
lete", |
| 267 "parameterOrder": [ |
| 268 "userId", |
| 269 "dataSourceId", |
| 270 "datasetId" |
| 271 ], |
| 272 "parameters": { |
| 273 "currentTimeMillis": { |
| 274 "description": "The client's current
time in milliseconds since epoch.", |
| 275 "format": "int64", |
| 276 "location": "query", |
| 277 "type": "string" |
| 278 }, |
| 279 "dataSourceId": { |
| 280 "description": "The data stream ID o
f the data source that created the dataset.", |
| 281 "location": "path", |
| 282 "required": true, |
| 283 "type": "string" |
| 284 }, |
| 285 "datasetId": { |
| 286 "description": "Dataset identifier t
hat is a composite of the minimum data point start time and maximum data point e
nd time represented as nanoseconds from the epoch. The ID is formatted like: \"s
tartTime-endTime\" where startTime and endTime are 64 bit integers.", |
| 287 "location": "path", |
| 288 "required": true, |
| 289 "type": "string" |
| 290 }, |
| 291 "modifiedTimeMillis": { |
| 292 "description": "When the operation w
as performed on the client.", |
| 293 "format": "int64", |
| 294 "location": "query", |
| 295 "type": "string" |
| 296 }, |
| 297 "userId": { |
| 298 "description": "Delete a dataset for
the person identified. Use me to indicate the authenticated user. Only me is su
pported at this time.", |
| 299 "location": "path", |
| 300 "required": true, |
| 301 "type": "string" |
| 302 } |
| 303 }, |
| 304 "path": "{userId}/dataSources/{dataSourceId}
/datasets/{datasetId}", |
| 305 "scopes": [ |
| 306 "https://www.googleapis.com/auth/fitness
.activity.write", |
| 307 "https://www.googleapis.com/auth/fitness
.body.write", |
| 308 "https://www.googleapis.com/auth/fitness
.location.write" |
| 309 ] |
| 310 }, |
| 311 "get": { |
| 312 "description": "Returns a dataset containing
all data points whose start and end times overlap with the specified range of t
he dataset minimum start time and maximum end time. Specifically, any data point
whose start time is less than or equal to the dataset end time and whose end ti
me is greater than or equal to the dataset start time.", |
| 313 "httpMethod": "GET", |
| 314 "id": "fitness.users.dataSources.datasets.ge
t", |
| 315 "parameterOrder": [ |
| 316 "userId", |
| 317 "dataSourceId", |
| 318 "datasetId" |
| 319 ], |
| 320 "parameters": { |
| 321 "dataSourceId": { |
| 322 "description": "The data stream ID o
f the data source that created the dataset.", |
| 323 "location": "path", |
| 324 "required": true, |
| 325 "type": "string" |
| 326 }, |
| 327 "datasetId": { |
| 328 "description": "Dataset identifier t
hat is a composite of the minimum data point start time and maximum data point e
nd time represented as nanoseconds from the epoch. The ID is formatted like: \"s
tartTime-endTime\" where startTime and endTime are 64 bit integers.", |
| 329 "location": "path", |
| 330 "required": true, |
| 331 "type": "string" |
| 332 }, |
| 333 "userId": { |
| 334 "description": "Retrieve a dataset f
or the person identified. Use me to indicate the authenticated user. Only me is
supported at this time.", |
| 335 "location": "path", |
| 336 "required": true, |
| 337 "type": "string" |
| 338 } |
| 339 }, |
| 340 "path": "{userId}/dataSources/{dataSourceId}
/datasets/{datasetId}", |
| 341 "response": { |
| 342 "$ref": "Dataset" |
| 343 }, |
| 344 "scopes": [ |
| 345 "https://www.googleapis.com/auth/fitness
.activity.read", |
| 346 "https://www.googleapis.com/auth/fitness
.activity.write", |
| 347 "https://www.googleapis.com/auth/fitness
.body.read", |
| 348 "https://www.googleapis.com/auth/fitness
.body.write", |
| 349 "https://www.googleapis.com/auth/fitness
.location.read", |
| 350 "https://www.googleapis.com/auth/fitness
.location.write" |
| 351 ] |
| 352 }, |
| 353 "patch": { |
| 354 "description": "Adds data points to a datase
t. The dataset need not be previously created. All points within the given datas
et will be returned with subsquent calls to retrieve this dataset. Data points c
an belong to more than one dataset. This method does not use patch semantics.", |
| 355 "httpMethod": "PATCH", |
| 356 "id": "fitness.users.dataSources.datasets.pa
tch", |
| 357 "parameterOrder": [ |
| 358 "userId", |
| 359 "dataSourceId", |
| 360 "datasetId" |
| 361 ], |
| 362 "parameters": { |
| 363 "currentTimeMillis": { |
| 364 "description": "The client's current
time in milliseconds since epoch. Note that the minStartTimeNs and maxEndTimeNs
properties in the request body are in nanoseconds instead of milliseconds.", |
| 365 "format": "int64", |
| 366 "location": "query", |
| 367 "type": "string" |
| 368 }, |
| 369 "dataSourceId": { |
| 370 "description": "The data stream ID o
f the data source that created the dataset.", |
| 371 "location": "path", |
| 372 "required": true, |
| 373 "type": "string" |
| 374 }, |
| 375 "datasetId": { |
| 376 "description": "Dataset identifier t
hat is a composite of the minimum data point start time and maximum data point e
nd time represented as nanoseconds from the epoch. The ID is formatted like: \"s
tartTime-endTime\" where startTime and endTime are 64 bit integers.", |
| 377 "location": "path", |
| 378 "required": true, |
| 379 "type": "string" |
| 380 }, |
| 381 "userId": { |
| 382 "description": "Patch a dataset for
the person identified. Use me to indicate the authenticated user. Only me is sup
ported at this time.", |
| 383 "location": "path", |
| 384 "required": true, |
| 385 "type": "string" |
| 386 } |
| 387 }, |
| 388 "path": "{userId}/dataSources/{dataSourceId}
/datasets/{datasetId}", |
| 389 "request": { |
| 390 "$ref": "Dataset" |
| 391 }, |
| 392 "response": { |
| 393 "$ref": "Dataset" |
| 394 }, |
| 395 "scopes": [ |
| 396 "https://www.googleapis.com/auth/fitness
.activity.write", |
| 397 "https://www.googleapis.com/auth/fitness
.body.write", |
| 398 "https://www.googleapis.com/auth/fitness
.location.write" |
| 399 ] |
| 400 } |
| 401 } |
| 402 } |
| 403 } |
| 404 }, |
| 405 "sessions": { |
| 406 "methods": { |
| 407 "delete": { |
| 408 "description": "Deletes a session specified by the g
iven session ID.", |
| 409 "httpMethod": "DELETE", |
| 410 "id": "fitness.users.sessions.delete", |
| 411 "parameterOrder": [ |
| 412 "userId", |
| 413 "sessionId" |
| 414 ], |
| 415 "parameters": { |
| 416 "currentTimeMillis": { |
| 417 "description": "The client's current time in
milliseconds since epoch.", |
| 418 "format": "int64", |
| 419 "location": "query", |
| 420 "type": "string" |
| 421 }, |
| 422 "sessionId": { |
| 423 "description": "The ID of the session to be
deleted.", |
| 424 "location": "path", |
| 425 "required": true, |
| 426 "type": "string" |
| 427 }, |
| 428 "userId": { |
| 429 "description": "Delete a session for the per
son identified. Use me to indicate the authenticated user. Only me is supported
at this time.", |
| 430 "location": "path", |
| 431 "required": true, |
| 432 "type": "string" |
| 433 } |
| 434 }, |
| 435 "path": "{userId}/sessions/{sessionId}", |
| 436 "scopes": [ |
| 437 "https://www.googleapis.com/auth/fitness.activit
y.write" |
| 438 ] |
| 439 }, |
| 440 "list": { |
| 441 "description": "Lists sessions previously created.", |
| 442 "httpMethod": "GET", |
| 443 "id": "fitness.users.sessions.list", |
| 444 "parameterOrder": [ |
| 445 "userId" |
| 446 ], |
| 447 "parameters": { |
| 448 "endTime": { |
| 449 "description": "An RFC3339 timestamp. Only s
essions ending between the start and end times will be included in the response.
", |
| 450 "location": "query", |
| 451 "type": "string" |
| 452 }, |
| 453 "includeDeleted": { |
| 454 "description": "If true, deleted sessions wi
ll be returned. When set to true, sessions returned in this response will only h
ave an ID and will not have any other fields.", |
| 455 "location": "query", |
| 456 "type": "boolean" |
| 457 }, |
| 458 "pageToken": { |
| 459 "description": "The continuation token, whic
h is used to page through large result sets. To get the next page of results, se
t this parameter to the value of nextPageToken from the previous response.", |
| 460 "location": "query", |
| 461 "type": "string" |
| 462 }, |
| 463 "startTime": { |
| 464 "description": "An RFC3339 timestamp. Only s
essions ending between the start and end times will be included in the response.
", |
| 465 "location": "query", |
| 466 "type": "string" |
| 467 }, |
| 468 "userId": { |
| 469 "description": "List sessions for the person
identified. Use me to indicate the authenticated user. Only me is supported at
this time.", |
| 470 "location": "path", |
| 471 "required": true, |
| 472 "type": "string" |
| 473 } |
| 474 }, |
| 475 "path": "{userId}/sessions", |
| 476 "response": { |
| 477 "$ref": "ListSessionsResponse" |
| 478 }, |
| 479 "scopes": [ |
| 480 "https://www.googleapis.com/auth/fitness.activit
y.read", |
| 481 "https://www.googleapis.com/auth/fitness.activit
y.write", |
| 482 "https://www.googleapis.com/auth/fitness.body.re
ad", |
| 483 "https://www.googleapis.com/auth/fitness.body.wr
ite", |
| 484 "https://www.googleapis.com/auth/fitness.locatio
n.read", |
| 485 "https://www.googleapis.com/auth/fitness.locatio
n.write" |
| 486 ] |
| 487 }, |
| 488 "update": { |
| 489 "description": "Updates or insert a given session.", |
| 490 "httpMethod": "PUT", |
| 491 "id": "fitness.users.sessions.update", |
| 492 "parameterOrder": [ |
| 493 "userId", |
| 494 "sessionId" |
| 495 ], |
| 496 "parameters": { |
| 497 "currentTimeMillis": { |
| 498 "description": "The client's current time in
milliseconds since epoch.", |
| 499 "format": "int64", |
| 500 "location": "query", |
| 501 "type": "string" |
| 502 }, |
| 503 "sessionId": { |
| 504 "description": "The ID of the session to be
created.", |
| 505 "location": "path", |
| 506 "required": true, |
| 507 "type": "string" |
| 508 }, |
| 509 "userId": { |
| 510 "description": "Create sessions for the pers
on identified. Use me to indicate the authenticated user. Only me is supported a
t this time.", |
| 511 "location": "path", |
| 512 "required": true, |
| 513 "type": "string" |
| 514 } |
| 515 }, |
| 516 "path": "{userId}/sessions/{sessionId}", |
| 517 "request": { |
| 518 "$ref": "Session" |
| 519 }, |
| 520 "response": { |
| 521 "$ref": "Session" |
| 522 }, |
| 523 "scopes": [ |
| 524 "https://www.googleapis.com/auth/fitness.activit
y.write" |
| 525 ] |
| 526 } |
| 527 } |
| 528 } |
| 529 } |
| 530 } |
| 531 }, |
| 532 "revision": "20141030", |
| 533 "rootUrl": "https://www.googleapis.com/", |
| 534 "schemas": { |
| 535 "Application": { |
| 536 "description": "See: google3/java/com/google/android/apps/heart/plat
form/api/Application.java", |
| 537 "id": "Application", |
| 538 "properties": { |
| 539 "detailsUrl": { |
| 540 "description": "An optional URI that can be used to link bac
k to the application.", |
| 541 "type": "string" |
| 542 }, |
| 543 "name": { |
| 544 "annotations": { |
| 545 "required": [ |
| 546 "fitness.users.dataSources.create", |
| 547 "fitness.users.dataSources.update", |
| 548 "fitness.users.sessions.update" |
| 549 ] |
| 550 }, |
| 551 "description": "The name of this application. This is requir
ed for REST clients, but we do not enforce uniqueness of this name. It is provid
ed as a matter of convenience for other developers who would like to identify wh
ich REST created an Application or Data Source.", |
| 552 "type": "string" |
| 553 }, |
| 554 "packageName": { |
| 555 "description": "Package name for this application. This is u
sed as a unique identifier when creaed by Android applications, but cannot be sp
ecified by REST clients. REST clients will have their developer project number r
eflected into the Data Source data stream IDs, instead of the packageName.", |
| 556 "type": "string" |
| 557 }, |
| 558 "version": { |
| 559 "description": "Version of the application. You should updat
e this field whenever the application changes in a way that affects the computat
ion of the data.", |
| 560 "type": "string" |
| 561 } |
| 562 }, |
| 563 "type": "object" |
| 564 }, |
| 565 "DataPoint": { |
| 566 "description": "Represents a single data point, generated by a parti
cular data source. A data point holds a value for each field, an end timestamp a
nd an optional start time. The exact semantics of each of these attributes are s
pecified in the documentation for the particular data type.\n\nA data point can
represent an instantaneous measurement, reading or input observation, as well as
averages or aggregates over a time interval. Check the data type documentation
to determine which is the case for a particular data type.\n\nData points always
contain one value for each field of the data type.", |
| 567 "id": "DataPoint", |
| 568 "properties": { |
| 569 "computationTimeMillis": { |
| 570 "description": "Used for version checking during transformat
ion; that is, a datapoint can only replace another datapoint that has an older c
omputation time stamp.", |
| 571 "format": "int64", |
| 572 "type": "string" |
| 573 }, |
| 574 "dataTypeName": { |
| 575 "annotations": { |
| 576 "required": [ |
| 577 "fitness.users.dataSources.datasets.patch" |
| 578 ] |
| 579 }, |
| 580 "description": "The data type defining the format of the val
ues in this data point.", |
| 581 "type": "string" |
| 582 }, |
| 583 "endTimeNanos": { |
| 584 "annotations": { |
| 585 "required": [ |
| 586 "fitness.users.dataSources.datasets.patch" |
| 587 ] |
| 588 }, |
| 589 "description": "The end time of the interval represented by
this data point, in nanoseconds since epoch.", |
| 590 "format": "int64", |
| 591 "type": "string" |
| 592 }, |
| 593 "modifiedTimeMillis": { |
| 594 "description": "Indicates the last time this data point was
modified. Useful only in contexts where we are listing the data changes, rather
than representing the current state of the data.", |
| 595 "format": "int64", |
| 596 "type": "string" |
| 597 }, |
| 598 "originDataSourceId": { |
| 599 "description": "If the data point is contained in a dataset
for a derived data source, this field will be populated with the data source str
eam ID that created the data point originally.", |
| 600 "type": "string" |
| 601 }, |
| 602 "rawTimestampNanos": { |
| 603 "description": "The raw timestamp from the original SensorEv
ent.", |
| 604 "format": "int64", |
| 605 "type": "string" |
| 606 }, |
| 607 "startTimeNanos": { |
| 608 "annotations": { |
| 609 "required": [ |
| 610 "fitness.users.dataSources.datasets.patch" |
| 611 ] |
| 612 }, |
| 613 "description": "The start time of the interval represented b
y this data point, in nanoseconds since epoch.", |
| 614 "format": "int64", |
| 615 "type": "string" |
| 616 }, |
| 617 "value": { |
| 618 "annotations": { |
| 619 "required": [ |
| 620 "fitness.users.dataSources.datasets.patch" |
| 621 ] |
| 622 }, |
| 623 "description": "Values of each data type field for the data
point. It is expected that each value corresponding to a data type field will oc
cur in the same order that the field is listed with in the data type specified i
n a data source.\n\nOnly one of integer and floating point fields will be popula
ted, depending on the format enum value within data source's type field.", |
| 624 "items": { |
| 625 "$ref": "Value" |
| 626 }, |
| 627 "type": "array" |
| 628 } |
| 629 }, |
| 630 "type": "object" |
| 631 }, |
| 632 "DataSource": { |
| 633 "description": "Definition of a unique source of sensor data. Data s
ources can expose raw data coming from hardware sensors on local or companion de
vices. They can also expose derived data, created by transforming or merging oth
er data sources. Multiple data sources can exist for the same data type. Every d
ata point inserted into or read from this service has an associated data source.
\n\nThe data source contains enough information to uniquely identify its data, i
ncluding the hardware device and the application that collected and/or transform
ed the data. It also holds useful metadata, such as the hardware and application
versions, and the device type.\n\nEach data source produces a unique stream of
data, with a unique identifier. Not all changes to data source affect the stream
identifier, so that data collected by updated versions of the same application/
device can still be considered to belong to the same data stream.", |
| 634 "id": "DataSource", |
| 635 "properties": { |
| 636 "application": { |
| 637 "$ref": "Application", |
| 638 "annotations": { |
| 639 "required": [ |
| 640 "fitness.users.dataSources.create", |
| 641 "fitness.users.dataSources.update" |
| 642 ] |
| 643 }, |
| 644 "description": "Information about an application which feeds
sensor data into the platform." |
| 645 }, |
| 646 "dataStreamId": { |
| 647 "annotations": { |
| 648 "required": [ |
| 649 "fitness.users.dataSources.update" |
| 650 ] |
| 651 }, |
| 652 "description": "A unique identifier for the data stream prod
uced by this data source. The identifier includes:\n\n \n- The physical device's
manufacturer, model, and serial number (UID). \n- The application's package nam
e or name. Package name is used when the data source was created by an Android a
pplication. The developer project number is used when the data source was create
d by a REST client. \n- The data source's type. \n- The data source's stream nam
e. Note that not all attributes of the data source are used as part of the stre
am identifier. In particular, the version of the hardware/the application isn't
used. This allows us to preserve the same stream through version updates. This a
lso means that two DataSource objects may represent the same data stream even if
they're not equal.\n\nThe exact format of the data stream ID created by an Andr
oid application is: type:dataType.name:application.packageName:device.manufactur
er:device.model:device.uid:dataStreamName \n\nThe exact format of the data strea
m ID created by a REST client is: type:dataType.name:developer project number:de
vice.manufacturer:device.model:device.uid:dataStreamName \n\nWhen any of the opt
ional fields that comprise of the data stream ID are blank, they will be omitted
from the data stream ID. The minnimum viable data stream ID would be: type:data
Type.name:developer project number\n\nFinally, the developer project number is o
bfuscated when read by any REST or Android client that did not create the data s
ource. Only the data source creator will see the developer project number in cle
ar and normal form.", |
| 653 "type": "string" |
| 654 }, |
| 655 "dataStreamName": { |
| 656 "description": "The stream name uniquely identifies this par
ticular data source among other data sources of the same type from the same unde
rlying producer. Setting the stream name is optional, but should be done wheneve
r an application exposes two streams for the same data type, or when a device ha
s two equivalent sensors.", |
| 657 "type": "string" |
| 658 }, |
| 659 "dataType": { |
| 660 "$ref": "DataType", |
| 661 "annotations": { |
| 662 "required": [ |
| 663 "fitness.users.dataSources.create", |
| 664 "fitness.users.dataSources.update" |
| 665 ] |
| 666 }, |
| 667 "description": "The data type defines the schema for a strea
m of data being collected by, inserted into, or queried from the Fitness API." |
| 668 }, |
| 669 "device": { |
| 670 "$ref": "Device", |
| 671 "annotations": { |
| 672 "required": [ |
| 673 "fitness.users.dataSources.create", |
| 674 "fitness.users.dataSources.update" |
| 675 ] |
| 676 }, |
| 677 "description": "Representation of an integrated device (such
as a phone or a wearable) that can hold sensors." |
| 678 }, |
| 679 "name": { |
| 680 "description": "An end-user visible name for this data sourc
e.", |
| 681 "type": "string" |
| 682 }, |
| 683 "type": { |
| 684 "annotations": { |
| 685 "required": [ |
| 686 "fitness.users.dataSources.create", |
| 687 "fitness.users.dataSources.update" |
| 688 ] |
| 689 }, |
| 690 "description": "A constant describing the type of this data
source. Indicates whether this data source produces raw or derived data.", |
| 691 "enum": [ |
| 692 "derived", |
| 693 "raw" |
| 694 ], |
| 695 "enumDescriptions": [ |
| 696 "", |
| 697 "" |
| 698 ], |
| 699 "type": "string" |
| 700 } |
| 701 }, |
| 702 "type": "object" |
| 703 }, |
| 704 "DataType": { |
| 705 "description": "See: google3/java/com/google/android/apps/heart/plat
form/api/DataType.java", |
| 706 "id": "DataType", |
| 707 "properties": { |
| 708 "field": { |
| 709 "annotations": { |
| 710 "required": [ |
| 711 "fitness.users.dataSources.create", |
| 712 "fitness.users.dataSources.update" |
| 713 ] |
| 714 }, |
| 715 "description": "A field represents one dimension of a data t
ype.", |
| 716 "items": { |
| 717 "$ref": "DataTypeField" |
| 718 }, |
| 719 "type": "array" |
| 720 }, |
| 721 "name": { |
| 722 "annotations": { |
| 723 "required": [ |
| 724 "fitness.users.dataSources.create", |
| 725 "fitness.users.dataSources.update" |
| 726 ] |
| 727 }, |
| 728 "description": "Each data type has a unique, namespaced, nam
e. All data types in the com.google namespace are shared as part of the platform
.", |
| 729 "type": "string" |
| 730 } |
| 731 }, |
| 732 "type": "object" |
| 733 }, |
| 734 "DataTypeField": { |
| 735 "description": "In case of multi-dimensional data (such as an accele
rometer with x, y, and z axes) each field represents one dimension. Each data ty
pe field has a unique name which identifies it. The field also defines the forma
t of the data (int, float, etc.).\n\nThis message is only instantiated in code a
nd not used for wire comms or stored in any way.", |
| 736 "id": "DataTypeField", |
| 737 "properties": { |
| 738 "format": { |
| 739 "annotations": { |
| 740 "required": [ |
| 741 "fitness.users.dataSources.create", |
| 742 "fitness.users.dataSources.update" |
| 743 ] |
| 744 }, |
| 745 "description": "The different supported formats for each fie
ld in a data type.", |
| 746 "enum": [ |
| 747 "floatPoint", |
| 748 "integer" |
| 749 ], |
| 750 "enumDescriptions": [ |
| 751 "", |
| 752 "" |
| 753 ], |
| 754 "type": "string" |
| 755 }, |
| 756 "name": { |
| 757 "annotations": { |
| 758 "required": [ |
| 759 "fitness.users.dataSources.create", |
| 760 "fitness.users.dataSources.update" |
| 761 ] |
| 762 }, |
| 763 "description": "Defines the name and format of data. Unlike
data type names, field names are not namespaced, and only need to be unique with
in the data type.", |
| 764 "type": "string" |
| 765 } |
| 766 }, |
| 767 "type": "object" |
| 768 }, |
| 769 "Dataset": { |
| 770 "description": "A dataset represents a projection container for data
points. They do not carry any info of their own. Datasets represent a set of da
ta points from a particular data source. A data point can be found in more than
one dataset.", |
| 771 "id": "Dataset", |
| 772 "properties": { |
| 773 "dataSourceId": { |
| 774 "annotations": { |
| 775 "required": [ |
| 776 "fitness.users.dataSources.datasets.patch" |
| 777 ] |
| 778 }, |
| 779 "description": "The data stream ID of the data source that c
reated the points in this dataset.", |
| 780 "type": "string" |
| 781 }, |
| 782 "maxEndTimeNs": { |
| 783 "annotations": { |
| 784 "required": [ |
| 785 "fitness.users.dataSources.datasets.patch" |
| 786 ] |
| 787 }, |
| 788 "description": "The largest end time of all data points in t
his possibly partial representation of the dataset. Time is in nanoseconds from
epoch. This should also match the first part of the dataset identifier.", |
| 789 "format": "int64", |
| 790 "type": "string" |
| 791 }, |
| 792 "minStartTimeNs": { |
| 793 "annotations": { |
| 794 "required": [ |
| 795 "fitness.users.dataSources.datasets.patch" |
| 796 ] |
| 797 }, |
| 798 "description": "The smallest start time of all data points i
n this possibly partial representation of the dataset. Time is in nanoseconds fr
om epoch. This should also match the first part of the dataset identifier.", |
| 799 "format": "int64", |
| 800 "type": "string" |
| 801 }, |
| 802 "point": { |
| 803 "annotations": { |
| 804 "required": [ |
| 805 "fitness.users.dataSources.datasets.patch" |
| 806 ] |
| 807 }, |
| 808 "description": "A partial list of data points contained in t
he dataset. This list is considered complete when retrieving a dataset and parti
al when patching a dataset.", |
| 809 "items": { |
| 810 "$ref": "DataPoint" |
| 811 }, |
| 812 "type": "array" |
| 813 } |
| 814 }, |
| 815 "type": "object" |
| 816 }, |
| 817 "Device": { |
| 818 "description": "Representation of an integrated device (such as a ph
one or a wearable) that can hold sensors. Each sensor is exposed as a data sourc
e.\n\nThe main purpose of the device information contained in this class is to i
dentify the hardware of a particular data source. This can be useful in differen
t ways, including: \n- Distinguishing two similar sensors on different devices
(the step counter on two nexus 5 phones, for instance)\n- Display the source of
data to the user (by using the device make / model)\n- Treat data differently de
pending on sensor type (accelerometers on a watch may give different patterns th
an those on a phone)\n- Build different analysis models for each device/version.
", |
| 819 "id": "Device", |
| 820 "properties": { |
| 821 "manufacturer": { |
| 822 "annotations": { |
| 823 "required": [ |
| 824 "fitness.users.dataSources.create", |
| 825 "fitness.users.dataSources.update" |
| 826 ] |
| 827 }, |
| 828 "description": "Manufacturer of the product/hardware.", |
| 829 "type": "string" |
| 830 }, |
| 831 "model": { |
| 832 "annotations": { |
| 833 "required": [ |
| 834 "fitness.users.dataSources.create", |
| 835 "fitness.users.dataSources.update" |
| 836 ] |
| 837 }, |
| 838 "description": "End-user visible model name for the device."
, |
| 839 "type": "string" |
| 840 }, |
| 841 "type": { |
| 842 "annotations": { |
| 843 "required": [ |
| 844 "fitness.users.dataSources.create", |
| 845 "fitness.users.dataSources.update" |
| 846 ] |
| 847 }, |
| 848 "description": "A constant representing the type of the devi
ce.", |
| 849 "enum": [ |
| 850 "chestStrap", |
| 851 "phone", |
| 852 "scale", |
| 853 "tablet", |
| 854 "unknown", |
| 855 "watch" |
| 856 ], |
| 857 "enumDescriptions": [ |
| 858 "", |
| 859 "", |
| 860 "", |
| 861 "", |
| 862 "", |
| 863 "" |
| 864 ], |
| 865 "type": "string" |
| 866 }, |
| 867 "uid": { |
| 868 "annotations": { |
| 869 "required": [ |
| 870 "fitness.users.dataSources.create", |
| 871 "fitness.users.dataSources.update" |
| 872 ] |
| 873 }, |
| 874 "description": "The serial number or other unique ID for the
hardware. This field is obfuscated when read by any REST or Android client that
did not create the data source. Only the data source creator will see the uid f
ield in clear and normal form.", |
| 875 "type": "string" |
| 876 }, |
| 877 "version": { |
| 878 "annotations": { |
| 879 "required": [ |
| 880 "fitness.users.dataSources.create", |
| 881 "fitness.users.dataSources.update" |
| 882 ] |
| 883 }, |
| 884 "description": "Version string for the device hardware/softw
are.", |
| 885 "type": "string" |
| 886 } |
| 887 }, |
| 888 "type": "object" |
| 889 }, |
| 890 "ListDataSourcesResponse": { |
| 891 "id": "ListDataSourcesResponse", |
| 892 "properties": { |
| 893 "dataSource": { |
| 894 "description": "A previously created data source.", |
| 895 "items": { |
| 896 "$ref": "DataSource" |
| 897 }, |
| 898 "type": "array" |
| 899 } |
| 900 }, |
| 901 "type": "object" |
| 902 }, |
| 903 "ListSessionsResponse": { |
| 904 "id": "ListSessionsResponse", |
| 905 "properties": { |
| 906 "deletedSession": { |
| 907 "description": "If includeDeleted is set to true in the requ
est, this list will contain sessions deleted with original end times that are wi
thin the startTime and endTime frame.", |
| 908 "items": { |
| 909 "$ref": "Session" |
| 910 }, |
| 911 "type": "array" |
| 912 }, |
| 913 "nextPageToken": { |
| 914 "description": "The continuation token, which is used to pag
e through large result sets. Provide this value in a subsequent request to retur
n the next page of results.", |
| 915 "type": "string" |
| 916 }, |
| 917 "session": { |
| 918 "description": "Sessions with an end time that is between st
artTime and endTime of the request.", |
| 919 "items": { |
| 920 "$ref": "Session" |
| 921 }, |
| 922 "type": "array" |
| 923 } |
| 924 }, |
| 925 "type": "object" |
| 926 }, |
| 927 "Session": { |
| 928 "description": "Sessions contain metadata, such as a user-friendly n
ame and time interval information.", |
| 929 "id": "Session", |
| 930 "properties": { |
| 931 "activityType": { |
| 932 "annotations": { |
| 933 "required": [ |
| 934 "fitness.users.sessions.update" |
| 935 ] |
| 936 }, |
| 937 "description": "The type of activity this session represents
.", |
| 938 "format": "int32", |
| 939 "type": "integer" |
| 940 }, |
| 941 "application": { |
| 942 "$ref": "Application", |
| 943 "annotations": { |
| 944 "required": [ |
| 945 "fitness.users.sessions.update" |
| 946 ] |
| 947 }, |
| 948 "description": "The application that created the session." |
| 949 }, |
| 950 "description": { |
| 951 "description": "A description for this session.", |
| 952 "type": "string" |
| 953 }, |
| 954 "endTimeMillis": { |
| 955 "annotations": { |
| 956 "required": [ |
| 957 "fitness.users.sessions.update" |
| 958 ] |
| 959 }, |
| 960 "description": "An end time, in milliseconds since epoch, in
clusive.", |
| 961 "format": "int64", |
| 962 "type": "string" |
| 963 }, |
| 964 "id": { |
| 965 "annotations": { |
| 966 "required": [ |
| 967 "fitness.users.sessions.update" |
| 968 ] |
| 969 }, |
| 970 "description": "A client-generated identifier that is unique
across all sessions owned by this particular user.", |
| 971 "type": "string" |
| 972 }, |
| 973 "modifiedTimeMillis": { |
| 974 "description": "A timestamp that indicates when the session
was last modified.", |
| 975 "format": "int64", |
| 976 "type": "string" |
| 977 }, |
| 978 "name": { |
| 979 "annotations": { |
| 980 "required": [ |
| 981 "fitness.users.sessions.update" |
| 982 ] |
| 983 }, |
| 984 "description": "A human readable name of the session.", |
| 985 "type": "string" |
| 986 }, |
| 987 "startTimeMillis": { |
| 988 "annotations": { |
| 989 "required": [ |
| 990 "fitness.users.sessions.update" |
| 991 ] |
| 992 }, |
| 993 "description": "A start time, in milliseconds since epoch, i
nclusive.", |
| 994 "format": "int64", |
| 995 "type": "string" |
| 996 } |
| 997 }, |
| 998 "type": "object" |
| 999 }, |
| 1000 "Value": { |
| 1001 "description": "Holder object for the value of a single field in a d
ata point.\n\nA field value has a particular format and is only ever set to one
of an integer or a floating point value.", |
| 1002 "id": "Value", |
| 1003 "properties": { |
| 1004 "fpVal": { |
| 1005 "annotations": { |
| 1006 "required": [ |
| 1007 "fitness.users.dataSources.datasets.patch" |
| 1008 ] |
| 1009 }, |
| 1010 "description": "Floating point value.", |
| 1011 "format": "double", |
| 1012 "type": "number" |
| 1013 }, |
| 1014 "intVal": { |
| 1015 "annotations": { |
| 1016 "required": [ |
| 1017 "fitness.users.dataSources.datasets.patch" |
| 1018 ] |
| 1019 }, |
| 1020 "description": "Integer value.", |
| 1021 "format": "int32", |
| 1022 "type": "integer" |
| 1023 } |
| 1024 }, |
| 1025 "type": "object" |
| 1026 } |
| 1027 }, |
| 1028 "servicePath": "fitness/v1/users/", |
| 1029 "title": "Fitness", |
| 1030 "version": "v1" |
| 1031 } |
OLD | NEW |