This repository has been archived on 2022-08-17. You can view files and clone it, but cannot push or open issues or pull requests.
dex/vendor/google.golang.org/api/fitness/v1/fitness-api.json
2016-04-08 11:56:29 -07:00

1042 lines
40 KiB
JSON

{
"kind": "discovery#restDescription",
"etag": "\"l66ggWbucbkBw9Lpos72oziyefE/TfpgqPaBHwKM6ZXQvQNWyFJhjHY\"",
"discoveryVersion": "v1",
"id": "fitness:v1",
"name": "fitness",
"version": "v1",
"revision": "20141030",
"title": "Fitness",
"description": "Google Fit API",
"ownerDomain": "google.com",
"ownerName": "Google",
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"protocol": "rest",
"baseUrl": "https://www.googleapis.com/fitness/v1/users/",
"basePath": "/fitness/v1/users/",
"rootUrl": "https://www.googleapis.com/",
"servicePath": "fitness/v1/users/",
"batchPath": "batch",
"parameters": {
"alt": {
"type": "string",
"description": "Data format for the response.",
"default": "json",
"enum": [
"json"
],
"enumDescriptions": [
"Responses with Content-Type of application/json"
],
"location": "query"
},
"fields": {
"type": "string",
"description": "Selector specifying which fields to include in a partial response.",
"location": "query"
},
"key": {
"type": "string",
"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"
},
"oauth_token": {
"type": "string",
"description": "OAuth 2.0 token for the current user.",
"location": "query"
},
"prettyPrint": {
"type": "boolean",
"description": "Returns response with indentations and line breaks.",
"default": "true",
"location": "query"
},
"quotaUser": {
"type": "string",
"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. Overrides userIp if both are provided.",
"location": "query"
},
"userIp": {
"type": "string",
"description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
"location": "query"
}
},
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/fitness.activity.read": {
"description": "View your activity information in Google Fit"
},
"https://www.googleapis.com/auth/fitness.activity.write": {
"description": "View and store your activity information in Google Fit"
},
"https://www.googleapis.com/auth/fitness.body.read": {
"description": "View body sensor information in Google Fit"
},
"https://www.googleapis.com/auth/fitness.body.write": {
"description": "View and store body sensor data in Google Fit"
},
"https://www.googleapis.com/auth/fitness.location.read": {
"description": "View your stored location data in Google Fit"
},
"https://www.googleapis.com/auth/fitness.location.write": {
"description": "View and store your location data in Google Fit"
}
}
}
},
"schemas": {
"Application": {
"id": "Application",
"type": "object",
"description": "See: google3/java/com/google/android/apps/heart/platform/api/Application.java",
"externalTypeName": "google.android.fitness.Application",
"properties": {
"detailsUrl": {
"type": "string",
"description": "An optional URI that can be used to link back to the application."
},
"name": {
"type": "string",
"description": "The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source.",
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update",
"fitness.users.sessions.update"
]
}
},
"packageName": {
"type": "string",
"description": "Package name for this application. This is used as a unique identifier when creaed by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName."
},
"version": {
"type": "string",
"description": "Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data."
}
}
},
"DataPoint": {
"id": "DataPoint",
"type": "object",
"description": "Represents a single data point, generated by a particular data source. A data point holds a value for each field, an end timestamp and an optional start time. The exact semantics of each of these attributes are specified 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.",
"externalTypeName": "google.android.fitness.DataPoint",
"properties": {
"computationTimeMillis": {
"type": "string",
"description": "Used for version checking during transformation; that is, a datapoint can only replace another datapoint that has an older computation time stamp.",
"format": "int64"
},
"dataTypeName": {
"type": "string",
"description": "The data type defining the format of the values in this data point.",
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
}
},
"endTimeNanos": {
"type": "string",
"description": "The end time of the interval represented by this data point, in nanoseconds since epoch.",
"format": "int64",
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
}
},
"modifiedTimeMillis": {
"type": "string",
"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.",
"format": "int64"
},
"originDataSourceId": {
"type": "string",
"description": "If the data point is contained in a dataset for a derived data source, this field will be populated with the data source stream ID that created the data point originally."
},
"rawTimestampNanos": {
"type": "string",
"description": "The raw timestamp from the original SensorEvent.",
"format": "int64"
},
"startTimeNanos": {
"type": "string",
"description": "The start time of the interval represented by this data point, in nanoseconds since epoch.",
"format": "int64",
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
}
},
"value": {
"type": "array",
"description": "Values of each data type field for the data point. It is expected that each value corresponding to a data type field will occur in the same order that the 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 on the format enum value within data source's type field.",
"items": {
"$ref": "Value"
},
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
}
}
}
},
"DataSource": {
"id": "DataSource",
"type": "object",
"description": "Definition of a unique source of sensor data. Data sources can expose raw data coming from hardware sensors on local or companion devices. They can also expose derived data, created by transforming or merging other data sources. Multiple data sources can exist for the same data type. Every data 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, including the hardware device and the application that collected and/or transformed 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.",
"externalTypeName": "google.android.fitness.DataSource",
"properties": {
"application": {
"$ref": "Application",
"description": "Information about an application which feeds sensor data into the platform.",
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
}
},
"dataStreamId": {
"type": "string",
"description": "A unique identifier for the data stream produced 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 name or name. Package name is used when the data source was created by an Android application. The developer project number is used when the data source was created by a REST client. \n- The data source's type. \n- The data source's stream name. Note that not all attributes of the data source are used as part of the stream 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 also 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 Android application is: type:dataType.name:application.packageName:device.manufacturer:device.model:device.uid:dataStreamName \n\nThe exact format of the data stream ID created by a REST client is: type:dataType.name:developer project number:device.manufacturer:device.model:device.uid:dataStreamName \n\nWhen any of the optional 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:dataType.name:developer project number\n\nFinally, the developer project number 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 developer project number in clear and normal form.",
"annotations": {
"required": [
"fitness.users.dataSources.update"
]
}
},
"dataStreamName": {
"type": "string",
"description": "The stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors."
},
"dataType": {
"$ref": "DataType",
"description": "The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API.",
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
}
},
"device": {
"$ref": "Device",
"description": "Representation of an integrated device (such as a phone or a wearable) that can hold sensors.",
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
}
},
"name": {
"type": "string",
"description": "An end-user visible name for this data source."
},
"type": {
"type": "string",
"description": "A constant describing the type of this data source. Indicates whether this data source produces raw or derived data.",
"enum": [
"derived",
"raw"
],
"enumDescriptions": [
"",
""
],
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
}
}
}
},
"DataType": {
"id": "DataType",
"type": "object",
"description": "See: google3/java/com/google/android/apps/heart/platform/api/DataType.java",
"externalTypeName": "google.android.fitness.DataType",
"properties": {
"field": {
"type": "array",
"description": "A field represents one dimension of a data type.",
"items": {
"$ref": "DataTypeField"
},
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
}
},
"name": {
"type": "string",
"description": "Each data type has a unique, namespaced, name. All data types in the com.google namespace are shared as part of the platform.",
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
}
}
}
},
"DataTypeField": {
"id": "DataTypeField",
"type": "object",
"description": "In case of multi-dimensional data (such as an accelerometer with x, y, and z axes) each field represents one dimension. Each data type field has a unique name which identifies it. The field also defines the format of the data (int, float, etc.).\n\nThis message is only instantiated in code and not used for wire comms or stored in any way.",
"externalTypeName": "google.android.fitness.DataTypeField",
"properties": {
"format": {
"type": "string",
"description": "The different supported formats for each field in a data type.",
"enum": [
"floatPoint",
"integer"
],
"enumDescriptions": [
"",
""
],
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
}
},
"name": {
"type": "string",
"description": "Defines the name and format of data. Unlike data type names, field names are not namespaced, and only need to be unique within the data type.",
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
}
}
}
},
"Dataset": {
"id": "Dataset",
"type": "object",
"description": "A dataset represents a projection container for data points. They do not carry any info of their own. Datasets represent a set of data points from a particular data source. A data point can be found in more than one dataset.",
"externalTypeName": "google.android.fitness.Dataset",
"properties": {
"dataSourceId": {
"type": "string",
"description": "The data stream ID of the data source that created the points in this dataset.",
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
}
},
"maxEndTimeNs": {
"type": "string",
"description": "The largest end time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the first part of the dataset identifier.",
"format": "int64",
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
}
},
"minStartTimeNs": {
"type": "string",
"description": "The smallest start time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the first part of the dataset identifier.",
"format": "int64",
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
}
},
"point": {
"type": "array",
"description": "A partial list of data points contained in the dataset. This list is considered complete when retrieving a dataset and partial when patching a dataset.",
"items": {
"$ref": "DataPoint"
},
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
}
}
}
},
"Device": {
"id": "Device",
"type": "object",
"description": "Representation of an integrated device (such as a phone or a wearable) that can hold sensors. Each sensor is exposed as a data source.\n\nThe main purpose of the device information contained in this class is to identify the hardware of a particular data source. This can be useful in different 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 depending on sensor type (accelerometers on a watch may give different patterns than those on a phone)\n- Build different analysis models for each device/version.",
"externalTypeName": "google.android.fitness.Device",
"properties": {
"manufacturer": {
"type": "string",
"description": "Manufacturer of the product/hardware.",
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
}
},
"model": {
"type": "string",
"description": "End-user visible model name for the device.",
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
}
},
"type": {
"type": "string",
"description": "A constant representing the type of the device.",
"enum": [
"chestStrap",
"phone",
"scale",
"tablet",
"unknown",
"watch"
],
"enumDescriptions": [
"",
"",
"",
"",
"",
""
],
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
}
},
"uid": {
"type": "string",
"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 field in clear and normal form.",
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
}
},
"version": {
"type": "string",
"description": "Version string for the device hardware/software.",
"annotations": {
"required": [
"fitness.users.dataSources.create",
"fitness.users.dataSources.update"
]
}
}
}
},
"ListDataSourcesResponse": {
"id": "ListDataSourcesResponse",
"type": "object",
"externalTypeName": "google.android.fitness.ListDataSourcesResponse",
"properties": {
"dataSource": {
"type": "array",
"description": "A previously created data source.",
"items": {
"$ref": "DataSource"
}
}
}
},
"ListSessionsResponse": {
"id": "ListSessionsResponse",
"type": "object",
"externalTypeName": "google.android.fitness.ListSessionsResponse",
"properties": {
"deletedSession": {
"type": "array",
"description": "If includeDeleted is set to true in the request, this list will contain sessions deleted with original end times that are within the startTime and endTime frame.",
"items": {
"$ref": "Session"
}
},
"nextPageToken": {
"type": "string",
"description": "The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results."
},
"session": {
"type": "array",
"description": "Sessions with an end time that is between startTime and endTime of the request.",
"items": {
"$ref": "Session"
}
}
}
},
"Session": {
"id": "Session",
"type": "object",
"description": "Sessions contain metadata, such as a user-friendly name and time interval information.",
"externalTypeName": "google.android.fitness.Session",
"properties": {
"activityType": {
"type": "integer",
"description": "The type of activity this session represents.",
"format": "int32",
"annotations": {
"required": [
"fitness.users.sessions.update"
]
}
},
"application": {
"$ref": "Application",
"description": "The application that created the session.",
"annotations": {
"required": [
"fitness.users.sessions.update"
]
}
},
"description": {
"type": "string",
"description": "A description for this session."
},
"endTimeMillis": {
"type": "string",
"description": "An end time, in milliseconds since epoch, inclusive.",
"format": "int64",
"annotations": {
"required": [
"fitness.users.sessions.update"
]
}
},
"id": {
"type": "string",
"description": "A client-generated identifier that is unique across all sessions owned by this particular user.",
"annotations": {
"required": [
"fitness.users.sessions.update"
]
}
},
"modifiedTimeMillis": {
"type": "string",
"description": "A timestamp that indicates when the session was last modified.",
"format": "int64"
},
"name": {
"type": "string",
"description": "A human readable name of the session.",
"annotations": {
"required": [
"fitness.users.sessions.update"
]
}
},
"startTimeMillis": {
"type": "string",
"description": "A start time, in milliseconds since epoch, inclusive.",
"format": "int64",
"annotations": {
"required": [
"fitness.users.sessions.update"
]
}
}
}
},
"Value": {
"id": "Value",
"type": "object",
"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 integer or a floating point value.",
"externalTypeName": "google.android.fitness.Value",
"properties": {
"fpVal": {
"type": "number",
"description": "Floating point value.",
"format": "double",
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
}
},
"intVal": {
"type": "integer",
"description": "Integer value.",
"format": "int32",
"annotations": {
"required": [
"fitness.users.dataSources.datasets.patch"
]
}
}
}
}
},
"resources": {
"users": {
"resources": {
"dataSources": {
"methods": {
"create": {
"id": "fitness.users.dataSources.create",
"path": "{userId}/dataSources",
"httpMethod": "POST",
"description": "Creates a new data source that is unique across all data sources belonging to this user. The data stream ID field can be omitted and will be generated by the server with the correct format. The data stream ID is an ordered combination of some fields from the data source. In addition to the data source fields reflected into the data source ID, the developer project number that is authenticated when creating the data source is included. This developer project number is obfuscated when read by any other developer reading public data types.",
"parameters": {
"userId": {
"type": "string",
"description": "Create the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"userId"
],
"request": {
"$ref": "DataSource"
},
"response": {
"$ref": "DataSource"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.location.write"
]
},
"get": {
"id": "fitness.users.dataSources.get",
"path": "{userId}/dataSources/{dataSourceId}",
"httpMethod": "GET",
"description": "Returns a data source identified by a data stream ID.",
"parameters": {
"dataSourceId": {
"type": "string",
"description": "The data stream ID of the data source to retrieve.",
"required": true,
"location": "path"
},
"userId": {
"type": "string",
"description": "Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"userId",
"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.body.read",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.location.read",
"https://www.googleapis.com/auth/fitness.location.write"
]
},
"list": {
"id": "fitness.users.dataSources.list",
"path": "{userId}/dataSources",
"httpMethod": "GET",
"description": "Lists all data sources that are visible to the developer, using the OAuth scopes provided. The list is not exhaustive: the user may have private data sources that are only visible to other developers or calls using other scopes.",
"parameters": {
"dataTypeName": {
"type": "string",
"description": "The names of data types to include in the list. If not specified, all data sources will be returned.",
"repeated": true,
"location": "query"
},
"userId": {
"type": "string",
"description": "List data sources for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"userId"
],
"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.body.read",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.location.read",
"https://www.googleapis.com/auth/fitness.location.write"
]
},
"patch": {
"id": "fitness.users.dataSources.patch",
"path": "{userId}/dataSources/{dataSourceId}",
"httpMethod": "PATCH",
"description": "Updates a given data source. It is an 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 would 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.",
"parameters": {
"dataSourceId": {
"type": "string",
"description": "The data stream ID of the data source to update.",
"required": true,
"location": "path"
},
"userId": {
"type": "string",
"description": "Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"userId",
"dataSourceId"
],
"request": {
"$ref": "DataSource"
},
"response": {
"$ref": "DataSource"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.location.write"
]
},
"update": {
"id": "fitness.users.dataSources.update",
"path": "{userId}/dataSources/{dataSourceId}",
"httpMethod": "PUT",
"description": "Updates a given data source. It is an 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 would require a new unique data stream ID and separate data source.\n\nData sources are identified by their data stream ID.",
"parameters": {
"dataSourceId": {
"type": "string",
"description": "The data stream ID of the data source to update.",
"required": true,
"location": "path"
},
"userId": {
"type": "string",
"description": "Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"userId",
"dataSourceId"
],
"request": {
"$ref": "DataSource"
},
"response": {
"$ref": "DataSource"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.location.write"
]
}
},
"resources": {
"datasets": {
"methods": {
"delete": {
"id": "fitness.users.dataSources.datasets.delete",
"path": "{userId}/dataSources/{dataSourceId}/datasets/{datasetId}",
"httpMethod": "DELETE",
"description": "Performs an inclusive delete of all data points whose start and end times have any overlap with the time range 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 (such 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.",
"parameters": {
"currentTimeMillis": {
"type": "string",
"description": "The client's current time in milliseconds since epoch.",
"format": "int64",
"location": "query"
},
"dataSourceId": {
"type": "string",
"description": "The data stream ID of the data source that created the dataset.",
"required": true,
"location": "path"
},
"datasetId": {
"type": "string",
"description": "Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: \"startTime-endTime\" where startTime and endTime are 64 bit integers.",
"required": true,
"location": "path"
},
"modifiedTimeMillis": {
"type": "string",
"description": "When the operation was performed on the client.",
"format": "int64",
"location": "query"
},
"userId": {
"type": "string",
"description": "Delete a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"userId",
"dataSourceId",
"datasetId"
],
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.location.write"
]
},
"get": {
"id": "fitness.users.dataSources.datasets.get",
"path": "{userId}/dataSources/{dataSourceId}/datasets/{datasetId}",
"httpMethod": "GET",
"description": "Returns a dataset containing all data points whose start and end times overlap with the specified range of the 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 time is greater than or equal to the dataset start time.",
"parameters": {
"dataSourceId": {
"type": "string",
"description": "The data stream ID of the data source that created the dataset.",
"required": true,
"location": "path"
},
"datasetId": {
"type": "string",
"description": "Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: \"startTime-endTime\" where startTime and endTime are 64 bit integers.",
"required": true,
"location": "path"
},
"userId": {
"type": "string",
"description": "Retrieve a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"userId",
"dataSourceId",
"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.body.read",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.location.read",
"https://www.googleapis.com/auth/fitness.location.write"
]
},
"patch": {
"id": "fitness.users.dataSources.datasets.patch",
"path": "{userId}/dataSources/{dataSourceId}/datasets/{datasetId}",
"httpMethod": "PATCH",
"description": "Adds data points to a dataset. The dataset need not be previously created. All points within the given dataset will be returned with subsquent calls to retrieve this dataset. Data points can belong to more than one dataset. This method does not use patch semantics.",
"parameters": {
"currentTimeMillis": {
"type": "string",
"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.",
"format": "int64",
"location": "query"
},
"dataSourceId": {
"type": "string",
"description": "The data stream ID of the data source that created the dataset.",
"required": true,
"location": "path"
},
"datasetId": {
"type": "string",
"description": "Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: \"startTime-endTime\" where startTime and endTime are 64 bit integers.",
"required": true,
"location": "path"
},
"userId": {
"type": "string",
"description": "Patch a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"userId",
"dataSourceId",
"datasetId"
],
"request": {
"$ref": "Dataset"
},
"response": {
"$ref": "Dataset"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.write",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.location.write"
]
}
}
}
}
},
"sessions": {
"methods": {
"delete": {
"id": "fitness.users.sessions.delete",
"path": "{userId}/sessions/{sessionId}",
"httpMethod": "DELETE",
"description": "Deletes a session specified by the given session ID.",
"parameters": {
"currentTimeMillis": {
"type": "string",
"description": "The client's current time in milliseconds since epoch.",
"format": "int64",
"location": "query"
},
"sessionId": {
"type": "string",
"description": "The ID of the session to be deleted.",
"required": true,
"location": "path"
},
"userId": {
"type": "string",
"description": "Delete a session for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"userId",
"sessionId"
],
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.write"
]
},
"list": {
"id": "fitness.users.sessions.list",
"path": "{userId}/sessions",
"httpMethod": "GET",
"description": "Lists sessions previously created.",
"parameters": {
"endTime": {
"type": "string",
"description": "An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response.",
"location": "query"
},
"includeDeleted": {
"type": "boolean",
"description": "If true, deleted sessions will be returned. When set to true, sessions returned in this response will only have an ID and will not have any other fields.",
"location": "query"
},
"pageToken": {
"type": "string",
"description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of nextPageToken from the previous response.",
"location": "query"
},
"startTime": {
"type": "string",
"description": "An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response.",
"location": "query"
},
"userId": {
"type": "string",
"description": "List sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"userId"
],
"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.body.read",
"https://www.googleapis.com/auth/fitness.body.write",
"https://www.googleapis.com/auth/fitness.location.read",
"https://www.googleapis.com/auth/fitness.location.write"
]
},
"update": {
"id": "fitness.users.sessions.update",
"path": "{userId}/sessions/{sessionId}",
"httpMethod": "PUT",
"description": "Updates or insert a given session.",
"parameters": {
"currentTimeMillis": {
"type": "string",
"description": "The client's current time in milliseconds since epoch.",
"format": "int64",
"location": "query"
},
"sessionId": {
"type": "string",
"description": "The ID of the session to be created.",
"required": true,
"location": "path"
},
"userId": {
"type": "string",
"description": "Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"userId",
"sessionId"
],
"request": {
"$ref": "Session"
},
"response": {
"$ref": "Session"
},
"scopes": [
"https://www.googleapis.com/auth/fitness.activity.write"
]
}
}
}
}
}
}
}