blob: 6735c1914a58f75c37a2e905b7d10da93606f920 [file] [log] [blame]
{
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/fitness.activity.read": {
"description": "Use Google Fit to see and store your physical activity data"
},
"https://www.googleapis.com/auth/fitness.activity.write": {
"description": "See and add to your Google Fit physical activity data"
},
"https://www.googleapis.com/auth/fitness.blood_glucose.read": {
"description": "See info about your blood glucose in Google Fit. I consent to Google sharing my blood glucose information with this app."
},
"https://www.googleapis.com/auth/fitness.blood_glucose.write": {
"description": "See and add info about your blood glucose to Google Fit. I consent to Google sharing my blood glucose information with this app."
},
"https://www.googleapis.com/auth/fitness.blood_pressure.read": {
"description": "See info about your blood pressure in Google Fit. I consent to Google sharing my blood pressure information with this app."
},
"https://www.googleapis.com/auth/fitness.blood_pressure.write": {
"description": "See and add info about your blood pressure in Google Fit. I consent to Google sharing my blood pressure information with this app."
},
"https://www.googleapis.com/auth/fitness.body.read": {
"description": "See info about your body measurements and heart rate in Google Fit"
},
"https://www.googleapis.com/auth/fitness.body.write": {
"description": "See and add info about your body measurements and heart rate to Google Fit"
},
"https://www.googleapis.com/auth/fitness.body_temperature.read": {
"description": "See info about your body temperature in Google Fit. I consent to Google sharing my body temperature information with this app."
},
"https://www.googleapis.com/auth/fitness.body_temperature.write": {
"description": "See and add to info about your body temperature in Google Fit. I consent to Google sharing my body temperature information with this app."
},
"https://www.googleapis.com/auth/fitness.location.read": {
"description": "See your Google Fit speed and distance data"
},
"https://www.googleapis.com/auth/fitness.location.write": {
"description": "See and add to your Google Fit location data"
},
"https://www.googleapis.com/auth/fitness.nutrition.read": {
"description": "See info about your nutrition in Google Fit"
},
"https://www.googleapis.com/auth/fitness.nutrition.write": {
"description": "See and add to info about your nutrition in Google Fit"
},
"https://www.googleapis.com/auth/fitness.oxygen_saturation.read": {
"description": "See info about your oxygen saturation in Google Fit. I consent to Google sharing my oxygen saturation information with this app."
},
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write": {
"description": "See and add info about your oxygen saturation in Google Fit. I consent to Google sharing my oxygen saturation information with this app."
},
"https://www.googleapis.com/auth/fitness.reproductive_health.read": {
"description": "See info about your reproductive health in Google Fit. I consent to Google sharing my reporductive health information with this app."
},
"https://www.googleapis.com/auth/fitness.reproductive_health.write": {
"description": "See and add info about your reproductive health in Google Fit. I consent to Google sharing my reporductive health information with this app."
}
}
}
},
"basePath": "",
"baseUrl": "https://www.googleapis.com/",
"batchPath": "batch/fitness/v1",
"description": "The Fitness API for managing users' fitness tracking data.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/fit/rest/v1/get-started",
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"id": "fitness:v1",
"kind": "discovery#restDescription",
"mtlsRootUrl": "https://www.mtls.googleapis.com/",
"name": "fitness",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"$.xgafv": {
"description": "V1 error format.",
"enum": [
"1",
"2"
],
"enumDescriptions": [
"v1 error format",
"v2 error format"
],
"location": "query",
"type": "string"
},
"access_token": {
"description": "OAuth access token.",
"location": "query",
"type": "string"
},
"alt": {
"default": "json",
"description": "Data format for response.",
"enum": [
"json",
"media",
"proto"
],
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query",
"type": "string"
},
"callback": {
"description": "JSONP",
"location": "query",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"key": {
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query",
"type": "string"
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
"location": "query",
"type": "string"
},
"uploadType": {
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"location": "query",
"type": "string"
},
"upload_protocol": {
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
"location": "query",
"type": "string"
}
},
"protocol": "rest",
"resources": {
"users": {
"resources": {
"dataSources": {
"methods": {
"create": {
"description": "Creates a new data source that is unique across all data sources belonging\nto this user.\n\nA data source is a unique source of sensor data. Data sources can expose\nraw data coming from hardware sensors on local or companion devices. They\ncan also expose derived data, created by transforming or merging other data\nsources. Multiple data sources can exist for the same data type. Every data\npoint in every dataset inserted into or read from the Fitness API has an\nassociated data source.\n\nEach data source produces a unique stream of dataset updates, with a\nunique data source identifier. Not all changes to data source affect the\ndata stream ID, so that data collected by updated versions of the same\napplication/device can still be considered to belong to the same data\nsource.\n\nData sources are identified using a string generated by the server, based\non the contents of the source being created. The \u003ccode\u003edataStreamId\u003c/code\u003e\nfield should not be set when invoking this method. It\nwill be automatically generated by the server with the correct format. If\na \u003ccode\u003edataStreamId\u003c/code\u003e is set, it must match the format that the\nserver would generate. This format is a combination of some fields from the\ndata source, and has a specific order. If it doesn't match, the request\nwill fail with an error.\n\nSpecifying a DataType which is not a known type (beginning with\n\"com.google.\") will create a DataSource with a \u003cem\u003ecustom data type\u003c/em\u003e.\nCustom data types are only readable by the application that created them.\nCustom data types are \u003cstrong\u003edeprecated\u003c/strong\u003e; use standard data types\ninstead.\n\nIn addition to the data source fields included in the data source ID, the\ndeveloper project number that is authenticated when creating the data\nsource is included. This developer project number is obfuscated when read\nby any other developer reading public data types.",
"flatPath": "fitness/v1/users/{userId}/dataSources",
"httpMethod": "POST",
"id": "fitness.users.dataSources.create",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"description": "Create the data source for the person identified. Use \u003ccode\u003eme\u003c/code\u003e to\nindicate the authenticated user. Only \u003ccode\u003eme\u003c/code\u003e is supported at this\ntime.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "fitness/v1/users/{userId}/dataSources",
"request": {
"$ref": "DataSource"
},
"response": {
"$ref": "DataSource"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.blood_glucose.write",
"https://www.googleapis.com/auth/fitness.blood_pressure.write",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.body_temperature.write",
"https://www.googleapis.com/auth/fitness.location.write",
"https://www.googleapis.com/auth/fitness.nutrition.write",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
"https://www.googleapis.com/auth/fitness.reproductive_health.write"
]
},
"delete": {
"description": "Deletes the specified data source. The request will fail if the data\nsource contains any data points.",
"flatPath": "fitness/v1/users/{userId}/dataSources/{dataSourceId}",
"httpMethod": "DELETE",
"id": "fitness.users.dataSources.delete",
"parameterOrder": [
"userId",
"dataSourceId"
],
"parameters": {
"dataSourceId": {
"description": "The data stream ID of the data source to delete.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"description": "Retrieve a data source for the person identified. Use \u003ccode\u003eme\u003c/code\u003e to\nindicate the authenticated user. Only \u003ccode\u003eme\u003c/code\u003e is supported at this\ntime.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "fitness/v1/users/{userId}/dataSources/{dataSourceId}",
"response": {
"$ref": "DataSource"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.blood_glucose.write",
"https://www.googleapis.com/auth/fitness.blood_pressure.write",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.body_temperature.write",
"https://www.googleapis.com/auth/fitness.location.write",
"https://www.googleapis.com/auth/fitness.nutrition.write",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
"https://www.googleapis.com/auth/fitness.reproductive_health.write"
]
},
"get": {
"description": "Returns the specified data source.",
"flatPath": "fitness/v1/users/{userId}/dataSources/{dataSourceId}",
"httpMethod": "GET",
"id": "fitness.users.dataSources.get",
"parameterOrder": [
"userId",
"dataSourceId"
],
"parameters": {
"dataSourceId": {
"description": "The data stream ID of the data source to retrieve.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"description": "Retrieve a data source for the person identified. Use \u003ccode\u003eme\u003c/code\u003e to\nindicate the authenticated user. Only \u003ccode\u003eme\u003c/code\u003e is supported at this\ntime.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "fitness/v1/users/{userId}/dataSources/{dataSourceId}",
"response": {
"$ref": "DataSource"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.read",
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.blood_glucose.read",
"https://www.googleapis.com/auth/fitness.blood_glucose.write",
"https://www.googleapis.com/auth/fitness.blood_pressure.read",
"https://www.googleapis.com/auth/fitness.blood_pressure.write",
"https://www.googleapis.com/auth/fitness.body.read",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.body_temperature.read",
"https://www.googleapis.com/auth/fitness.body_temperature.write",
"https://www.googleapis.com/auth/fitness.location.read",
"https://www.googleapis.com/auth/fitness.location.write",
"https://www.googleapis.com/auth/fitness.nutrition.read",
"https://www.googleapis.com/auth/fitness.nutrition.write",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.read",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
"https://www.googleapis.com/auth/fitness.reproductive_health.read",
"https://www.googleapis.com/auth/fitness.reproductive_health.write"
]
},
"list": {
"description": "Lists all data sources that are visible to the developer, using the OAuth\nscopes provided. The list is not exhaustive; the user may have private\ndata sources that are only visible to other developers, or calls using\nother scopes.",
"flatPath": "fitness/v1/users/{userId}/dataSources",
"httpMethod": "GET",
"id": "fitness.users.dataSources.list",
"parameterOrder": [
"userId"
],
"parameters": {
"dataTypeName": {
"description": "The names of data types to include in the list. If not specified, all\ndata sources will be returned.",
"location": "query",
"repeated": true,
"type": "string"
},
"userId": {
"description": "List data sources for the person identified. Use \u003ccode\u003eme\u003c/code\u003e to\nindicate the authenticated user. Only \u003ccode\u003eme\u003c/code\u003e is supported at this\ntime.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "fitness/v1/users/{userId}/dataSources",
"response": {
"$ref": "ListDataSourcesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.read",
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.blood_glucose.read",
"https://www.googleapis.com/auth/fitness.blood_glucose.write",
"https://www.googleapis.com/auth/fitness.blood_pressure.read",
"https://www.googleapis.com/auth/fitness.blood_pressure.write",
"https://www.googleapis.com/auth/fitness.body.read",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.body_temperature.read",
"https://www.googleapis.com/auth/fitness.body_temperature.write",
"https://www.googleapis.com/auth/fitness.location.read",
"https://www.googleapis.com/auth/fitness.location.write",
"https://www.googleapis.com/auth/fitness.nutrition.read",
"https://www.googleapis.com/auth/fitness.nutrition.write",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.read",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
"https://www.googleapis.com/auth/fitness.reproductive_health.read",
"https://www.googleapis.com/auth/fitness.reproductive_health.write"
]
},
"update": {
"description": "Updates the specified data source. The \u003ccode\u003edataStreamId\u003c/code\u003e,\n\u003ccode\u003edataType\u003c/code\u003e, \u003ccode\u003etype\u003c/code\u003e, \u003ccode\u003edataStreamName\u003c/code\u003e, and\n\u003ccode\u003edevice\u003c/code\u003e properties with the exception of \u003ccode\u003eversion\u003c/code\u003e,\ncannot be modified.\n\nData sources are identified by their \u003ccode\u003edataStreamId\u003c/code\u003e.",
"flatPath": "fitness/v1/users/{userId}/dataSources/{dataSourceId}",
"httpMethod": "PUT",
"id": "fitness.users.dataSources.update",
"parameterOrder": [
"userId",
"dataSourceId"
],
"parameters": {
"dataSourceId": {
"description": "The data stream ID of the data source to update.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"description": "Update the data source for the person identified. Use \u003ccode\u003eme\u003c/code\u003e to\nindicate the authenticated user. Only \u003ccode\u003eme\u003c/code\u003e is supported at this\ntime.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "fitness/v1/users/{userId}/dataSources/{dataSourceId}",
"request": {
"$ref": "DataSource"
},
"response": {
"$ref": "DataSource"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.blood_glucose.write",
"https://www.googleapis.com/auth/fitness.blood_pressure.write",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.body_temperature.write",
"https://www.googleapis.com/auth/fitness.location.write",
"https://www.googleapis.com/auth/fitness.nutrition.write",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
"https://www.googleapis.com/auth/fitness.reproductive_health.write"
]
}
},
"resources": {
"dataPointChanges": {
"methods": {
"list": {
"description": "Queries for user's data point changes for a particular data source.",
"flatPath": "fitness/v1/users/{userId}/dataSources/{dataSourceId}/dataPointChanges",
"httpMethod": "GET",
"id": "fitness.users.dataSources.dataPointChanges.list",
"parameterOrder": [
"userId",
"dataSourceId"
],
"parameters": {
"dataSourceId": {
"description": "The data stream ID of the data source that created the dataset.",
"location": "path",
"required": true,
"type": "string"
},
"limit": {
"description": "If specified, no more than this many data point changes will be included\nin the response.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n\u003ccode\u003enextPageToken\u003c/code\u003e from the previous response.",
"location": "query",
"type": "string"
},
"userId": {
"description": "List data points for the person identified. Use \u003ccode\u003eme\u003c/code\u003e to indicate\nthe authenticated user. Only \u003ccode\u003eme\u003c/code\u003e is supported at this time.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "fitness/v1/users/{userId}/dataSources/{dataSourceId}/dataPointChanges",
"response": {
"$ref": "ListDataPointChangesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.read",
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.blood_glucose.read",
"https://www.googleapis.com/auth/fitness.blood_glucose.write",
"https://www.googleapis.com/auth/fitness.blood_pressure.read",
"https://www.googleapis.com/auth/fitness.blood_pressure.write",
"https://www.googleapis.com/auth/fitness.body.read",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.body_temperature.read",
"https://www.googleapis.com/auth/fitness.body_temperature.write",
"https://www.googleapis.com/auth/fitness.location.read",
"https://www.googleapis.com/auth/fitness.location.write",
"https://www.googleapis.com/auth/fitness.nutrition.read",
"https://www.googleapis.com/auth/fitness.nutrition.write",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.read",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
"https://www.googleapis.com/auth/fitness.reproductive_health.read",
"https://www.googleapis.com/auth/fitness.reproductive_health.write"
]
}
}
},
"datasets": {
"methods": {
"delete": {
"description": "Performs an inclusive delete of all data points whose start and end times\nhave any overlap with the time range specified by the dataset ID. For most\ndata types, the entire data point will be deleted. For data types where the\ntime span represents a consistent value (such as\n\u003ccode\u003ecom.google.activity.segment\u003c/code\u003e), and a data point straddles\neither end point of the dataset, only the overlapping portion of the data\npoint will be deleted.",
"flatPath": "fitness/v1/users/{userId}/dataSources/{dataSourceId}/datasets/{datasetId}",
"httpMethod": "DELETE",
"id": "fitness.users.dataSources.datasets.delete",
"parameterOrder": [
"userId",
"dataSourceId",
"datasetId"
],
"parameters": {
"currentTimeMillis": {
"description": "The client's current time in milliseconds since epoch.",
"format": "int64",
"location": "query",
"type": "string"
},
"dataSourceId": {
"description": "The data stream ID of the data source that created the dataset.",
"location": "path",
"required": true,
"type": "string"
},
"datasetId": {
"description": "Dataset identifier that is a composite of the minimum data point start time\nand maximum data point end time represented as nanoseconds from the epoch.\nThe ID is formatted like: \"\u003cvar\u003estartTime\u003c/var\u003e-\u003cvar\u003eendTime\u003c/var\u003e\"\nwhere \u003cvar\u003estartTime\u003c/var\u003e and \u003cvar\u003eendTime\u003c/var\u003e are 64 bit integers.",
"location": "path",
"required": true,
"type": "string"
},
"modifiedTimeMillis": {
"description": "When the operation was performed on the client.",
"format": "int64",
"location": "query",
"type": "string"
},
"userId": {
"description": "Delete a dataset for the person identified. Use \u003ccode\u003eme\u003c/code\u003e to indicate\nthe authenticated user. Only \u003ccode\u003eme\u003c/code\u003e is supported at this time.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "fitness/v1/users/{userId}/dataSources/{dataSourceId}/datasets/{datasetId}",
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.blood_glucose.write",
"https://www.googleapis.com/auth/fitness.blood_pressure.write",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.body_temperature.write",
"https://www.googleapis.com/auth/fitness.location.write",
"https://www.googleapis.com/auth/fitness.nutrition.write",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
"https://www.googleapis.com/auth/fitness.reproductive_health.write"
]
},
"get": {
"description": "Returns a dataset containing all data points whose start and end times\noverlap with the specified range of the dataset minimum start time and\nmaximum end time. Specifically, any data point whose start time is less\nthan or equal to the dataset end time and whose end time is greater than or\nequal to the dataset start time.",
"flatPath": "fitness/v1/users/{userId}/dataSources/{dataSourceId}/datasets/{datasetId}",
"httpMethod": "GET",
"id": "fitness.users.dataSources.datasets.get",
"parameterOrder": [
"userId",
"dataSourceId",
"datasetId"
],
"parameters": {
"dataSourceId": {
"description": "The data stream ID of the data source that created the dataset.",
"location": "path",
"required": true,
"type": "string"
},
"datasetId": {
"description": "Dataset identifier that is a composite of the minimum data point start time\nand maximum data point end time represented as nanoseconds from the epoch.\nThe ID is formatted like: \"\u003cvar\u003estartTime\u003c/var\u003e-\u003cvar\u003eendTime\u003c/var\u003e\"\nwhere \u003cvar\u003estartTime\u003c/var\u003e and \u003cvar\u003eendTime\u003c/var\u003e are 64 bit integers.",
"location": "path",
"required": true,
"type": "string"
},
"limit": {
"description": "If specified, no more than this many data points will be included in the\ndataset. If there are more data points in the dataset, nextPageToken\nwill be set in the dataset response.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "The continuation token, which is used to page through large datasets.\nTo get the next page of a dataset, set this parameter to the value of\n\u003ccode\u003enextPageToken\u003c/code\u003e from the previous response. Each subsequent\ncall will yield a partial dataset with data point end timestamps that are\nstrictly smaller than those in the previous partial response.",
"location": "query",
"type": "string"
},
"userId": {
"description": "Retrieve a dataset for the person identified. Use \u003ccode\u003eme\u003c/code\u003e to\nindicate the authenticated user. Only \u003ccode\u003eme\u003c/code\u003e is supported at this\ntime.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "fitness/v1/users/{userId}/dataSources/{dataSourceId}/datasets/{datasetId}",
"response": {
"$ref": "Dataset"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.read",
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.blood_glucose.read",
"https://www.googleapis.com/auth/fitness.blood_glucose.write",
"https://www.googleapis.com/auth/fitness.blood_pressure.read",
"https://www.googleapis.com/auth/fitness.blood_pressure.write",
"https://www.googleapis.com/auth/fitness.body.read",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.body_temperature.read",
"https://www.googleapis.com/auth/fitness.body_temperature.write",
"https://www.googleapis.com/auth/fitness.location.read",
"https://www.googleapis.com/auth/fitness.location.write",
"https://www.googleapis.com/auth/fitness.nutrition.read",
"https://www.googleapis.com/auth/fitness.nutrition.write",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.read",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
"https://www.googleapis.com/auth/fitness.reproductive_health.read",
"https://www.googleapis.com/auth/fitness.reproductive_health.write"
]
},
"patch": {
"description": "Adds data points to a dataset. The dataset need not be previously created.\nAll points within the given dataset will be returned with subsquent calls\nto retrieve this dataset. Data points can belong to more than one dataset.\nThis method does not use patch semantics.",
"flatPath": "fitness/v1/users/{userId}/dataSources/{dataSourceId}/datasets/{datasetId}",
"httpMethod": "PATCH",
"id": "fitness.users.dataSources.datasets.patch",
"parameterOrder": [
"userId",
"dataSourceId",
"datasetId"
],
"parameters": {
"currentTimeMillis": {
"description": "The client's current time in milliseconds since epoch. Note that the\n\u003ccode\u003eminStartTimeNs\u003c/code\u003e and \u003ccode\u003emaxEndTimeNs\u003c/code\u003e properties in\nthe request body are in nanoseconds instead of milliseconds.",
"format": "int64",
"location": "query",
"type": "string"
},
"dataSourceId": {
"description": "The data stream ID of the data source that created the dataset.",
"location": "path",
"required": true,
"type": "string"
},
"datasetId": {
"description": "Dataset identifier that is a composite of the minimum data point start time\nand maximum data point end time represented as nanoseconds from the epoch.\nThe ID is formatted like: \"\u003cvar\u003estartTime\u003c/var\u003e-\u003cvar\u003eendTime\u003c/var\u003e\"\nwhere \u003cvar\u003estartTime\u003c/var\u003e and \u003cvar\u003eendTime\u003c/var\u003e are 64 bit integers.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"description": "Patch a dataset for the person identified. Use \u003ccode\u003eme\u003c/code\u003e to indicate\nthe authenticated user. Only \u003ccode\u003eme\u003c/code\u003e is supported at this time.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "fitness/v1/users/{userId}/dataSources/{dataSourceId}/datasets/{datasetId}",
"request": {
"$ref": "Dataset"
},
"response": {
"$ref": "Dataset"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.blood_glucose.write",
"https://www.googleapis.com/auth/fitness.blood_pressure.write",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.body_temperature.write",
"https://www.googleapis.com/auth/fitness.location.write",
"https://www.googleapis.com/auth/fitness.nutrition.write",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
"https://www.googleapis.com/auth/fitness.reproductive_health.write"
]
}
}
}
}
},
"dataset": {
"methods": {
"aggregate": {
"description": "Aggregates data of a certain type or stream into buckets divided by a given\ntype of boundary. Multiple data sets of multiple types and from multiple\nsources can be aggregated into exactly one bucket type per request.",
"flatPath": "fitness/v1/users/{userId}/dataset:aggregate",
"httpMethod": "POST",
"id": "fitness.users.dataset.aggregate",
"parameterOrder": [
"userId"
],
"parameters": {
"userId": {
"description": "Aggregate data for the person identified. Use \u003ccode\u003eme\u003c/code\u003e to indicate\nthe authenticated user. Only \u003ccode\u003eme\u003c/code\u003e is supported at this time.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "fitness/v1/users/{userId}/dataset:aggregate",
"request": {
"$ref": "AggregateRequest"
},
"response": {
"$ref": "AggregateResponse"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.read",
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.blood_glucose.read",
"https://www.googleapis.com/auth/fitness.blood_glucose.write",
"https://www.googleapis.com/auth/fitness.blood_pressure.read",
"https://www.googleapis.com/auth/fitness.blood_pressure.write",
"https://www.googleapis.com/auth/fitness.body.read",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.body_temperature.read",
"https://www.googleapis.com/auth/fitness.body_temperature.write",
"https://www.googleapis.com/auth/fitness.location.read",
"https://www.googleapis.com/auth/fitness.location.write",
"https://www.googleapis.com/auth/fitness.nutrition.read",
"https://www.googleapis.com/auth/fitness.nutrition.write",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.read",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
"https://www.googleapis.com/auth/fitness.reproductive_health.read",
"https://www.googleapis.com/auth/fitness.reproductive_health.write"
]
}
}
},
"sessions": {
"methods": {
"delete": {
"description": "Deletes a session specified by the given session ID.",
"flatPath": "fitness/v1/users/{userId}/sessions/{sessionId}",
"httpMethod": "DELETE",
"id": "fitness.users.sessions.delete",
"parameterOrder": [
"userId",
"sessionId"
],
"parameters": {
"currentTimeMillis": {
"description": "The client's current time in milliseconds since epoch.",
"format": "int64",
"location": "query",
"type": "string"
},
"sessionId": {
"description": "The ID of the session to be deleted.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"description": "Delete a session for the person identified. Use \u003ccode\u003eme\u003c/code\u003e to indicate\nthe authenticated user. Only \u003ccode\u003eme\u003c/code\u003e is supported at this time.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "fitness/v1/users/{userId}/sessions/{sessionId}",
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.write"
]
},
"list": {
"description": "Lists sessions previously created.",
"flatPath": "fitness/v1/users/{userId}/sessions",
"httpMethod": "GET",
"id": "fitness.users.sessions.list",
"parameterOrder": [
"userId"
],
"parameters": {
"activityType": {
"description": "If non-empty, only sessions with these activity types should be returned.",
"format": "int32",
"location": "query",
"repeated": true,
"type": "integer"
},
"endTime": {
"description": "An \u003ca href=\"https://www.ietf.org/rfc/rfc3339.txt\"\u003eRFC3339\u003c/a\u003e timestamp.\nOnly sessions ending between the start and end times will be included in\nthe response. If this time is omitted but \u003cvar\u003estartTime\u003c/var\u003e is\nspecified, all sessions from \u003cvar\u003estartTime\u003c/var\u003e to the end of time will\nbe returned.",
"location": "query",
"type": "string"
},
"includeDeleted": {
"description": "If true, and if both \u003cvar\u003estartTime\u003c/var\u003e and \u003cvar\u003eendTime\u003c/var\u003e are\nomitted, session deletions will be returned.",
"location": "query",
"type": "boolean"
},
"pageToken": {
"description": "The continuation token, which is used for incremental syncing.\nTo get the next batch of changes, set this parameter to the value of\n\u003ccode\u003enextPageToken\u003c/code\u003e from the previous response. The page token is\nignored if either start or end time is specified. If none of start time,\nend time, and the page token is specified, sessions modified in the last\n30 days are returned.",
"location": "query",
"type": "string"
},
"startTime": {
"description": "An \u003ca href=\"https://www.ietf.org/rfc/rfc3339.txt\"\u003eRFC3339\u003c/a\u003e timestamp.\nOnly sessions ending between the start and end times will be included in\nthe response. If this time is omitted but \u003cvar\u003eendTime\u003c/var\u003e is specified,\nall sessions from the start of time up to \u003cvar\u003eendTime\u003c/var\u003e will be\nreturned.",
"location": "query",
"type": "string"
},
"userId": {
"description": "List sessions for the person identified. Use \u003ccode\u003eme\u003c/code\u003e to indicate\nthe authenticated user. Only \u003ccode\u003eme\u003c/code\u003e is supported at this time.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "fitness/v1/users/{userId}/sessions",
"response": {
"$ref": "ListSessionsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.read",
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.blood_glucose.read",
"https://www.googleapis.com/auth/fitness.blood_glucose.write",
"https://www.googleapis.com/auth/fitness.blood_pressure.read",
"https://www.googleapis.com/auth/fitness.blood_pressure.write",
"https://www.googleapis.com/auth/fitness.body.read",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.body_temperature.read",
"https://www.googleapis.com/auth/fitness.body_temperature.write",
"https://www.googleapis.com/auth/fitness.location.read",
"https://www.googleapis.com/auth/fitness.location.write",
"https://www.googleapis.com/auth/fitness.nutrition.read",
"https://www.googleapis.com/auth/fitness.nutrition.write",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.read",
"https://www.googleapis.com/auth/fitness.oxygen_saturation.write",
"https://www.googleapis.com/auth/fitness.reproductive_health.read",
"https://www.googleapis.com/auth/fitness.reproductive_health.write"
]
},
"update": {
"description": "Updates or insert a given session.",
"flatPath": "fitness/v1/users/{userId}/sessions/{sessionId}",
"httpMethod": "PUT",
"id": "fitness.users.sessions.update",
"parameterOrder": [
"userId",
"sessionId"
],
"parameters": {
"currentTimeMillis": {
"description": "The client's current time in milliseconds since epoch.",
"format": "int64",
"location": "query",
"type": "string"
},
"sessionId": {
"description": "The ID of the session to be created.",
"location": "path",
"required": true,
"type": "string"
},
"userId": {
"description": "Create sessions for the person identified. Use \u003ccode\u003eme\u003c/code\u003e to indicate\nthe authenticated user. Only \u003ccode\u003eme\u003c/code\u003e is supported at this time.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "fitness/v1/users/{userId}/sessions/{sessionId}",
"request": {
"$ref": "Session"
},
"response": {
"$ref": "Session"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.write"
]
}
}
}
}
}
},
"revision": "20200601",
"rootUrl": "https://www.googleapis.com/",
"schemas": {
"AggregateBucket": {
"id": "AggregateBucket",
"properties": {
"activity": {
"description": "Available for Bucket.Type.ACTIVITY_TYPE, Bucket.Type.ACTIVITY_SEGMENT",
"format": "int32",
"type": "integer"
},
"dataset": {
"description": "There will be one dataset per AggregateBy in the request.",
"items": {
"$ref": "Dataset"
},
"type": "array"
},
"endTimeMillis": {
"description": "The end time for the aggregated data, in milliseconds since epoch,\ninclusive.",
"format": "int64",
"type": "string"
},
"session": {
"$ref": "Session",
"description": "Available for Bucket.Type.SESSION"
},
"startTimeMillis": {
"description": "The start time for the aggregated data, in milliseconds since epoch,\ninclusive.",
"format": "int64",
"type": "string"
},
"type": {
"description": "The type of a bucket signifies how the data aggregation is performed in the\nbucket.",
"enum": [
"unknown",
"time",
"session",
"activityType",
"activitySegment"
],
"enumDescriptions": [
"",
"Denotes that bucketing by time is requested. When this is specified, the\ntimeBucketDurationMillis field is used to determine how many buckets will\nbe returned.",
"Denotes that bucketing by session is requested. When this is specified,\nonly data that occurs within sessions that begin and end within the\ndataset time frame, is included in the results.",
"Denotes that bucketing by activity type is requested. When this is\nspecified, there will be one bucket for each unique activity type that\na user participated in, during the dataset time frame of interest.",
"Denotes that bucketing by individual activity segment is requested. This\nwill aggregate data by the time boundaries specified by each activity\nsegment occurring within the dataset time frame of interest."
],
"type": "string"
}
},
"type": "object"
},
"AggregateBy": {
"description": "The specification of which data to aggregate.",
"id": "AggregateBy",
"properties": {
"dataSourceId": {
"description": "A data source ID to aggregate. Only data from the specified data source ID\nwill be included in the aggregation. If specified, this data source must\nexist; the OAuth scopes in the supplied credentials must grant read access\nto this data type. The dataset in the response will have the same data\nsource ID. Note: Data can be aggregated by either the dataTypeName or the\ndataSourceId, not both.",
"type": "string"
},
"dataTypeName": {
"description": "The data type to aggregate. All data sources providing this data type will\ncontribute data to the aggregation. The response will contain a single\ndataset for this data type name. The dataset will have a data source ID of\nderived:\u003coutput data type name\u003e:com.google.android.gms:aggregated.\nIf the user has no data for this data type, an empty data set will be\nreturned. Note: Data can be aggregated by either the dataTypeName or the\ndataSourceId, not both.",
"type": "string"
}
},
"type": "object"
},
"AggregateRequest": {
"description": "Next id: 10",
"id": "AggregateRequest",
"properties": {
"aggregateBy": {
"annotations": {
"required": [
"fitness.users.dataset.aggregate"
]
},
"description": "The specification of data to be aggregated. At least one aggregateBy spec\nmust be provided. All data that is specified will be aggregated using the\nsame bucketing criteria. There will be one dataset in the response for\nevery aggregateBy spec.",
"items": {
"$ref": "AggregateBy"
},
"type": "array"
},
"bucketByActivitySegment": {
"$ref": "BucketByActivity",
"description": "Specifies that data be aggregated each activity segment recored for a user.\nSimilar to bucketByActivitySegment, but bucketing is done for each activity\nsegment rather than all segments of the same type. Mutually exclusive of\nother bucketing specifications."
},
"bucketByActivityType": {
"$ref": "BucketByActivity",
"description": "Specifies that data be aggregated by the type of activity being performed\nwhen the data was recorded. All data that was recorded during a certain\nactivity type (.for the given time range) will be aggregated into the same\nbucket. Data that was recorded while the user was not active will not be\nincluded in the response. Mutually exclusive of other bucketing\nspecifications."
},
"bucketBySession": {
"$ref": "BucketBySession",
"description": "Specifies that data be aggregated by user sessions. Data that does not fall\nwithin the time range of a session will not be included in the response.\nMutually exclusive of other bucketing specifications."
},
"bucketByTime": {
"$ref": "BucketByTime",
"description": "Specifies that data be aggregated by a single time interval. Mutually\nexclusive of other bucketing specifications."
},
"endTimeMillis": {
"annotations": {
"required": [
"fitness.users.dataset.aggregate"
]
},
"description": "The end of a window of time. Data that intersects with this time\nwindow will be aggregated. The time is in milliseconds since epoch,\ninclusive.",
"format": "int64",
"type": "string"
},
"filteredDataQualityStandard": {
"description": "DO NOT POPULATE THIS FIELD. It is ignored.",
"enumDescriptions": [
"",
"",
"",
"",
"",
"",
"",
"",
"",
""
],
"items": {
"enum": [
"dataQualityUnknown",
"dataQualityBloodPressureEsh2002",
"dataQualityBloodPressureEsh2010",
"dataQualityBloodPressureAami",
"dataQualityBloodPressureBhsAA",
"dataQualityBloodPressureBhsAB",
"dataQualityBloodPressureBhsBA",
"dataQualityBloodPressureBhsBB",
"dataQualityBloodGlucoseIso151972003",
"dataQualityBloodGlucoseIso151972013"
],
"type": "string"
},
"type": "array"
},
"startTimeMillis": {
"annotations": {
"required": [
"fitness.users.dataset.aggregate"
]
},
"description": "The start of a window of time. Data that intersects with this time\nwindow will be aggregated. The time is in milliseconds since epoch,\ninclusive.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"AggregateResponse": {
"id": "AggregateResponse",
"properties": {
"bucket": {
"description": "A list of buckets containing the aggregated data.",
"items": {
"$ref": "AggregateBucket"
},
"type": "array"
}
},
"type": "object"
},
"Application": {
"id": "Application",
"properties": {
"detailsUrl": {
"description": "An optional URI that can be used to link back to the application.",
"type": "string"
},
"name": {
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update",
"fitness.users.sessions.update"
]
},
"description": "The name of this application. This is required for REST clients, but we\ndo not enforce uniqueness of this name. It is provided as a matter of\nconvenience for other developers who would like to identify which REST\ncreated an Application or Data Source.",
"type": "string"
},
"packageName": {
"description": "Package name for this application. This is used as a unique\nidentifier when created by Android applications, but cannot be specified\nby REST clients. REST clients will have their developer project number\nreflected into the Data Source data stream IDs, instead of the packageName.",
"type": "string"
},
"version": {
"description": "Version of the application. You should update this field whenever the\napplication changes in a way that affects the computation of the data.",
"type": "string"
}
},
"type": "object"
},
"BucketByActivity": {
"id": "BucketByActivity",
"properties": {
"activityDataSourceId": {
"description": "The default activity stream will be used if a specific activityDataSourceId\nis not specified.",
"type": "string"
},
"minDurationMillis": {
"description": "Specifies that only activity segments of duration longer than\nminDurationMillis are considered and used as a container for aggregated\ndata.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"BucketBySession": {
"id": "BucketBySession",
"properties": {
"minDurationMillis": {
"description": "Specifies that only sessions of duration longer than minDurationMillis are\nconsidered and used as a container for aggregated data.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"BucketByTime": {
"id": "BucketByTime",
"properties": {
"durationMillis": {
"description": "Specifies that result buckets aggregate data by exactly durationMillis time\nframes. Time frames that contain no data will be included in the response\nwith an empty dataset.",
"format": "int64",
"type": "string"
},
"period": {
"$ref": "BucketByTimePeriod"
}
},
"type": "object"
},
"BucketByTimePeriod": {
"id": "BucketByTimePeriod",
"properties": {
"timeZoneId": {
"description": "org.joda.timezone.DateTimeZone",
"type": "string"
},
"type": {
"enum": [
"day",
"week",
"month"
],
"enumDescriptions": [
"",
"",
""
],
"type": "string"
},
"value": {
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"DataPoint": {
"description": "Represents a single data point, generated by a particular data source. A\ndata point holds a value for each field, an end timestamp and an optional\nstart time. The exact semantics of each of these attributes are specified in\nthe documentation for the particular data type.\n\nA data point can represent an instantaneous measurement, reading or input\nobservation, as well as averages or aggregates over a time interval. Check\nthe data type documentation to determine which is the case for a particular\ndata type.\n\nData points always contain one value for each field of the data type.",
"id": "DataPoint",
"properties": {
"computationTimeMillis": {
"description": "DO NOT USE THIS FIELD. It is ignored, and not stored.",
"format": "int64",
"type": "string"
},
"dataTypeName": {
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
},
"description": "The data type defining the format of the values in this data point.",
"type": "string"
},
"endTimeNanos": {
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
},
"description": "The end time of the interval represented by this data point, in\nnanoseconds since epoch.",
"format": "int64",
"type": "string"
},
"modifiedTimeMillis": {
"description": "Indicates the last time this data point was modified. Useful only in\ncontexts where we are listing the data changes, rather than representing\nthe current state of the data.",
"format": "int64",
"type": "string"
},
"originDataSourceId": {
"description": "If the data point is contained in a dataset for a derived data source,\nthis field will be populated with the data source stream ID that created\nthe data point originally.\n\nWARNING: do not rely on this field for anything other than debugging. The\nvalue of this field, if it is set at all, is an implementation detail and\nis not guaranteed to remain consistent.",
"type": "string"
},
"rawTimestampNanos": {
"description": "The raw timestamp from the original SensorEvent.",
"format": "int64",
"type": "string"
},
"startTimeNanos": {
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
},
"description": "The start time of the interval represented by this data point, in\nnanoseconds since epoch.",
"format": "int64",
"type": "string"
},
"value": {
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
},
"description": "Values of each data type field for the data point. It is expected that each\nvalue corresponding to a data type field will occur in the same order that\nthe field is listed with in the data type specified in a data source.\n\nOnly one of integer and floating point fields will be populated, depending\non the format enum value within data source's type field.",
"items": {
"$ref": "Value"
},
"type": "array"
}
},
"type": "object"
},
"DataSource": {
"description": "Definition of a unique source of sensor data. Data sources can expose raw\ndata coming from hardware sensors on local or companion devices. They can\nalso expose derived data, created by transforming or merging other data\nsources. Multiple data sources can exist for the same data type. Every data\npoint inserted into or read from this service has an associated data\nsource.\n\nThe data source contains enough information to uniquely identify its data,\nincluding the hardware device and the application that collected and/or\ntransformed the data. It also holds useful metadata, such as the hardware and\napplication versions, and the device type.\n\nEach data source produces a unique stream of data, with a unique identifier.\nNot all changes to data source affect the stream identifier, so that data\ncollected by updated versions of the same application/device can still be\nconsidered to belong to the same data stream.",
"id": "DataSource",
"properties": {
"application": {
"$ref": "Application",
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
},
"description": "Information about an application which feeds sensor data into the platform."
},
"dataQualityStandard": {
"description": "DO NOT POPULATE THIS FIELD. It is never populated in responses from the\nplatform, and is ignored in queries. It will be removed in a future version\nentirely.",
"enumDescriptions": [
"",
"",
"",
"",
"",
"",
"",
"",
"",
""
],
"items": {
"enum": [
"dataQualityUnknown",
"dataQualityBloodPressureEsh2002",
"dataQualityBloodPressureEsh2010",
"dataQualityBloodPressureAami",
"dataQualityBloodPressureBhsAA",
"dataQualityBloodPressureBhsAB",
"dataQualityBloodPressureBhsBA",
"dataQualityBloodPressureBhsBB",
"dataQualityBloodGlucoseIso151972003",
"dataQualityBloodGlucoseIso151972013"
],
"type": "string"
},
"type": "array"
},
"dataStreamId": {
"annotations": {
"required": [
"fitness.users.dataSources.update"
]
},
"description": "A unique identifier for the data stream produced by this data source. The\nidentifier includes:\u003cbr/\u003e\u003cbr/\u003e\n\u003cul\u003e\n\u003cli\u003eThe physical device's manufacturer, model, and serial number\n(UID).\u003c/li\u003e\n\u003cli\u003eThe application's package name or name. Package name is used when the\ndata source was created by an Android application. The developer project\nnumber is used when the data source was created by a REST client.\u003c/li\u003e\n\u003cli\u003eThe data source's type.\u003c/li\u003e\n\u003cli\u003eThe data source's stream name.\u003c/li\u003e\n\u003c/ul\u003e\nNote that not all attributes of the data source are used as part of the\nstream identifier. In particular, the version of the hardware/the\napplication isn't used. This allows us to preserve the same stream through\nversion updates. This also means that two DataSource objects may represent\nthe same data stream even if they're not equal.\n\nThe exact format of the data stream ID created by an Android application\nis:\n\u003cvar\u003etype:dataType.name\u003cwbr/\u003e:application.packageName\u003cwbr/\u003e:device.manufacturer\u003cwbr/\u003e:device.model\u003cwbr/\u003e:device.uid\u003cwbr/\u003e:dataStreamName\u003c/var\u003e\n\nThe exact format of the data stream ID created by a REST client is:\n\u003cvar\u003etype:dataType.name\u003cwbr/\u003e:developer project\nnumber\u003cwbr/\u003e:device.manufacturer\u003cwbr/\u003e:device.model:device.uid\u003cwbr/\u003e:dataStreamName\u003c/var\u003e\n\nWhen any of the optional fields that make up the data stream ID are absent,\nthey will be omitted from the data stream ID. The minimum viable data\nstream ID would be:\ntype:dataType.name:developer project number\n\nFinally, the developer project number and device UID are obfuscated when\nread by any REST or Android client that did not create the data source.\nOnly the data source creator will see the developer project number in clear\nand normal form. This means a client will see a different set of\ndata_stream_ids than another client with different credentials.",
"type": "string"
},
"dataStreamName": {
"description": "The stream name uniquely identifies this particular data source among\nother data sources of the same type from the same underlying producer.\nSetting the stream name is optional, but should be done whenever an\napplication exposes two streams for the same data type, or when a device\nhas two equivalent sensors.",
"type": "string"
},
"dataType": {
"$ref": "DataType",
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
},
"description": "The data type defines the schema for a stream of data being collected by,\ninserted into, or queried from the Fitness API."
},
"device": {
"$ref": "Device",
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
},
"description": "Representation of an integrated device (such as a phone or a wearable) that\ncan hold sensors."
},
"name": {
"description": "An end-user visible name for this data source.",
"type": "string"
},
"type": {
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
},
"description": "A constant describing the type of this data source. Indicates whether this\ndata source produces raw or derived data.",
"enum": [
"raw",
"derived"
],
"enumDescriptions": [
"",
""
],
"type": "string"
}
},
"type": "object"
},
"DataType": {
"id": "DataType",
"properties": {
"field": {
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
},
"description": "A field represents one dimension of a data type.",
"items": {
"$ref": "DataTypeField"
},
"type": "array"
},
"name": {
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
},
"description": "Each data type has a unique, namespaced, name. All data types in the\ncom.google namespace are shared as part of the platform.",
"type": "string"
}
},
"type": "object"
},
"DataTypeField": {
"description": "In case of multi-dimensional data (such as an accelerometer with x, y, and z\naxes) each field represents one dimension. Each data type field has a unique\nname which identifies it. The field also defines the format of the data (int,\nfloat, etc.).\n\nThis message is only instantiated in code and not used for wire comms or\nstored in any way.",
"id": "DataTypeField",
"properties": {
"format": {
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
},
"description": "The different supported formats for each field in a data type.",
"enum": [
"integer",
"floatPoint",
"string",
"map",
"integerList",
"floatList",
"blob"
],
"enumDescriptions": [
"",
"",
"",
"",
"",
"",
""
],
"type": "string"
},
"name": {
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
},
"description": "Defines the name and format of data. Unlike data type names, field names\nare not namespaced, and only need to be unique within the data type.",
"type": "string"
},
"optional": {
"type": "boolean"
}
},
"type": "object"
},
"Dataset": {
"description": "A dataset represents a projection container for data points. They do not\ncarry any info of their own. Datasets represent a set of data points from a\nparticular data source. A data point can be found in more than one dataset.",
"id": "Dataset",
"properties": {
"dataSourceId": {
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
},
"description": "The data stream ID of the data source that created the points in this\ndataset.",
"type": "string"
},
"maxEndTimeNs": {
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
},
"description": "The largest end time of all data points in this possibly partial\nrepresentation of the dataset. Time is in nanoseconds from epoch. This\nshould also match the second part of the dataset identifier.",
"format": "int64",
"type": "string"
},
"minStartTimeNs": {
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
},
"description": "The smallest start time of all data points in this possibly partial\nrepresentation of the dataset. Time is in nanoseconds from epoch. This\nshould also match the first part of the dataset identifier.",
"format": "int64",
"type": "string"
},
"nextPageToken": {
"description": "This token will be set when a dataset is received in response to a GET\nrequest and the dataset is too large to be included in a single response.\nProvide this value in a subsequent GET request to return the next page of\ndata points within this dataset.",
"type": "string"
},
"point": {
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
},
"description": "A partial list of data points contained in the dataset, ordered by largest\nendTimeNanos first. This list is considered complete when retrieving a\nsmall dataset and partial when patching a dataset or retrieving a dataset\nthat is too large to include in a single response.",
"items": {
"$ref": "DataPoint"
},
"type": "array"
}
},
"type": "object"
},
"Device": {
"description": "Representation of an integrated device (such as a phone or a wearable) that\ncan hold sensors. Each sensor is exposed as a data source.\n\nThe main purpose of the device information contained in this class is to\nidentify the hardware of a particular data source. This can be useful in\ndifferent ways, including:\n\u003cul\u003e\n \u003cli\u003eDistinguishing two similar sensors on different devices (the step\n counter on two nexus 5 phones, for instance)\n \u003cli\u003eDisplay the source of data to the user (by using the device make /\n model)\n \u003cli\u003eTreat data differently depending on sensor type (accelerometers on a\n watch may give different patterns than those on a phone)\n \u003cli\u003eBuild different analysis models for each device/version.\n\u003c/ul\u003e",
"id": "Device",
"properties": {
"manufacturer": {
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
},
"description": "Manufacturer of the product/hardware.",
"type": "string"
},
"model": {
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
},
"description": "End-user visible model name for the device.",
"type": "string"
},
"type": {
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
},
"description": "A constant representing the type of the device.",
"enum": [
"unknown",
"phone",
"tablet",
"watch",
"chestStrap",
"scale",
"headMounted"
],
"enumDescriptions": [
"Device type is not known.",
"An Android phone.",
"An Android tablet.",
"A watch or other wrist-mounted band.",
"A chest strap.",
"A scale.",
"Glass or other head-mounted device."
],
"type": "string"
},
"uid": {
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
},
"description": "The serial number or other unique ID for the hardware. This field is\nobfuscated when read by any REST or Android client that did not create\nthe data source. Only the data source creator will see the uid field in\nclear and normal form.\n\nThe obfuscation preserves equality; that is, given two IDs, if id1 == id2,\nobfuscated(id1) == obfuscated(id2).",
"type": "string"
},
"version": {
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
},
"description": "Version string for the device hardware/software.",
"type": "string"
}
},
"type": "object"
},
"ListDataPointChangesResponse": {
"id": "ListDataPointChangesResponse",
"properties": {
"dataSourceId": {
"description": "The data stream ID of the data source with data point changes.",
"type": "string"
},
"deletedDataPoint": {
"description": "Deleted data points for the user. Note, for modifications this should be\nparsed before handling insertions.",
"items": {
"$ref": "DataPoint"
},
"type": "array"
},
"insertedDataPoint": {
"description": "Inserted data points for the user.",
"items": {
"$ref": "DataPoint"
},
"type": "array"
},
"nextPageToken": {
"description": "The continuation token, which is used to page through large result sets.\nProvide this value in a subsequent request to return the next page of\nresults.",
"type": "string"
}
},
"type": "object"
},
"ListDataSourcesResponse": {
"id": "ListDataSourcesResponse",
"properties": {
"dataSource": {
"description": "A previously created data source.",
"items": {
"$ref": "DataSource"
},
"type": "array"
}
},
"type": "object"
},
"ListSessionsResponse": {
"id": "ListSessionsResponse",
"properties": {
"deletedSession": {
"description": "If \u003ccode\u003eincludeDeleted\u003c/code\u003e is set to true in the request, and\n\u003cvar\u003estartTime\u003c/var\u003e and \u003cvar\u003eendTime\u003c/var\u003e are omitted, this will include\nsessions which were deleted since the last sync.",
"items": {
"$ref": "Session"
},
"type": "array"
},
"hasMoreData": {
"description": "Flag to indicate server has more data to transfer.\nDO NOT USE THIS FIELD. It is never populated in responses from the server.",
"type": "boolean"
},
"nextPageToken": {
"description": "The sync token which is used to sync further changes. This will only be\nprovided if both \u003cvar\u003estartTime\u003c/var\u003e and \u003cvar\u003eendTime\u003c/var\u003e are omitted\nfrom the request.",
"type": "string"
},
"session": {
"description": "Sessions with an end time that is between \u003cvar\u003estartTime\u003c/var\u003e and\n\u003cvar\u003eendTime\u003c/var\u003e of the request.",
"items": {
"$ref": "Session"
},
"type": "array"
}
},
"type": "object"
},
"MapValue": {
"description": "Holder object for the value of an entry in a map field of a data point.\n\nA map value supports a subset of the formats that the regular Value supports.",
"id": "MapValue",
"properties": {
"fpVal": {
"description": "Floating point value.",
"format": "double",
"type": "number"
}
},
"type": "object"
},
"Session": {
"description": "Sessions contain metadata, such as a user-friendly name and time interval\ninformation.",
"id": "Session",
"properties": {
"activeTimeMillis": {
"description": "Session active time. While start_time_millis and end_time_millis define\nthe full session time, the active time can be shorter and specified by\nactive_time_millis.\nIf the inactive time during the session is known, it should also be\ninserted via a com.google.activity.segment data point with a STILL\nactivity value",
"format": "int64",
"type": "string"
},
"activityType": {
"annotations": {
"required": [
"fitness.users.sessions.update"
]
},
"description": "The type of activity this session represents.",
"format": "int32",
"type": "integer"
},
"application": {
"$ref": "Application",
"annotations": {
"required": [
"fitness.users.sessions.update"
]
},
"description": "The application that created the session."
},
"description": {
"description": "A description for this session.",
"type": "string"
},
"endTimeMillis": {
"annotations": {
"required": [
"fitness.users.sessions.update"
]
},
"description": "An end time, in milliseconds since epoch, inclusive.",
"format": "int64",
"type": "string"
},
"id": {
"annotations": {
"required": [
"fitness.users.sessions.update"
]
},
"description": "A client-generated identifier that is unique across all sessions owned by\nthis particular user.",
"type": "string"
},
"modifiedTimeMillis": {
"description": "A timestamp that indicates when the session was last modified.",
"format": "int64",
"type": "string"
},
"name": {
"annotations": {
"required": [
"fitness.users.sessions.update"
]
},
"description": "A human readable name of the session.",
"type": "string"
},
"startTimeMillis": {
"annotations": {
"required": [
"fitness.users.sessions.update"
]
},
"description": "A start time, in milliseconds since epoch, inclusive.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"Value": {
"description": "Holder object for the value of a single field in a data point.\n\nA field value has a particular format and is only ever set to one of an\ninteger or a floating point value.",
"id": "Value",
"properties": {
"fpVal": {
"description": "Floating point value. When this is set, other values must not be set.",
"format": "double",
"type": "number"
},
"intVal": {
"description": "Integer value. When this is set, other values must not be set.",
"format": "int32",
"type": "integer"
},
"mapVal": {
"description": "Map value. The valid key space and units for the corresponding value\nof each entry should be documented as part of the data type definition.\nKeys should be kept small whenever possible. Data streams with large keys\nand high data frequency may be down sampled.",
"items": {
"$ref": "ValueMapValEntry"
},
"type": "array"
},
"stringVal": {
"description": "String value. When this is set, other values must not be set.\nStrings should be kept small whenever possible. Data streams with large\nstring values and high data frequency may be down sampled.",
"type": "string"
}
},
"type": "object"
},
"ValueMapValEntry": {
"id": "ValueMapValEntry",
"properties": {
"key": {
"type": "string"
},
"value": {
"$ref": "MapValue"
}
},
"type": "object"
}
},
"servicePath": "",
"title": "Fitness API",
"version": "v1"
}