blob: c86bd67f514914247e364a02b5f4db3fc763e38a [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070075<h1><a href="fitness_v1.html">Fitness API</a> . <a href="fitness_v1.users.html">users</a> . <a href="fitness_v1.users.dataSources.html">dataSources</a></h1>
Craig Citroe633be12015-03-02 13:40:36 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="fitness_v1.users.dataSources.dataPointChanges.html">dataPointChanges()</a></code>
79</p>
80<p class="firstline">Returns the dataPointChanges Resource.</p>
81
82<p class="toc_element">
Craig Citroe633be12015-03-02 13:40:36 -080083 <code><a href="fitness_v1.users.dataSources.datasets.html">datasets()</a></code>
84</p>
85<p class="firstline">Returns the datasets Resource.</p>
86
87<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070088 <code><a href="#create">create(userId, body=None, x__xgafv=None)</a></code></p>
89<p class="firstline">Creates a new data source that is unique across all data sources belonging</p>
Craig Citroe633be12015-03-02 13:40:36 -080090<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070091 <code><a href="#delete">delete(userId, dataSourceId, x__xgafv=None)</a></code></p>
92<p class="firstline">Deletes the specified data source. The request will fail if the data</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000093<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070094 <code><a href="#get">get(userId, dataSourceId, x__xgafv=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070095<p class="firstline">Returns the specified data source.</p>
Craig Citroe633be12015-03-02 13:40:36 -080096<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070097 <code><a href="#list">list(userId, dataTypeName=None, x__xgafv=None)</a></code></p>
98<p class="firstline">Lists all data sources that are visible to the developer, using the OAuth</p>
Craig Citroe633be12015-03-02 13:40:36 -080099<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700100 <code><a href="#update">update(userId, dataSourceId, body=None, x__xgafv=None)</a></code></p>
101<p class="firstline">Updates the specified data source. The <code>dataStreamId</code>,</p>
Craig Citroe633be12015-03-02 13:40:36 -0800102<h3>Method Details</h3>
103<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700104 <code class="details" id="create">create(userId, body=None, x__xgafv=None)</code>
105 <pre>Creates a new data source that is unique across all data sources belonging
106to this user.
Dan O'Mearadd494642020-05-01 07:42:23 -0700107
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700108A data source is a unique source of sensor data. Data sources can expose
109raw data coming from hardware sensors on local or companion devices. They
110can also expose derived data, created by transforming or merging other data
111sources. Multiple data sources can exist for the same data type. Every data
112point in every dataset inserted into or read from the Fitness API has an
113associated data source.
Dan O'Mearadd494642020-05-01 07:42:23 -0700114
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700115Each data source produces a unique stream of dataset updates, with a
116unique data source identifier. Not all changes to data source affect the
117data stream ID, so that data collected by updated versions of the same
118application/device can still be considered to belong to the same data
119source.
Dan O'Mearadd494642020-05-01 07:42:23 -0700120
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700121Data sources are identified using a string generated by the server, based
122on the contents of the source being created. The &lt;code&gt;dataStreamId&lt;/code&gt;
123field should not be set when invoking this method. It
124will be automatically generated by the server with the correct format. If
125a &lt;code&gt;dataStreamId&lt;/code&gt; is set, it must match the format that the
126server would generate. This format is a combination of some fields from the
127data source, and has a specific order. If it doesn&#x27;t match, the request
128will fail with an error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700129
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700130Specifying a DataType which is not a known type (beginning with
131&quot;com.google.&quot;) will create a DataSource with a &lt;em&gt;custom data type&lt;/em&gt;.
132Custom data types are only readable by the application that created them.
133Custom data types are &lt;strong&gt;deprecated&lt;/strong&gt;; use standard data types
134instead.
Dan O'Mearadd494642020-05-01 07:42:23 -0700135
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700136In addition to the data source fields included in the data source ID, the
137developer project number that is authenticated when creating the data
138source is included. This developer project number is obfuscated when read
139by any other developer reading public data types.
Craig Citroe633be12015-03-02 13:40:36 -0800140
141Args:
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700142 userId: string, Create the data source for the person identified. Use &lt;code&gt;me&lt;/code&gt; to
143indicate the authenticated user. Only &lt;code&gt;me&lt;/code&gt; is supported at this
144time. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700145 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800146 The object takes the form of:
147
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700148{ # Definition of a unique source of sensor data. Data sources can expose raw
149 # data coming from hardware sensors on local or companion devices. They can
150 # also expose derived data, created by transforming or merging other data
151 # sources. Multiple data sources can exist for the same data type. Every data
152 # point inserted into or read from this service has an associated data
153 # source.
Craig Citroe633be12015-03-02 13:40:36 -0800154 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700155 # The data source contains enough information to uniquely identify its data,
156 # including the hardware device and the application that collected and/or
157 # transformed the data. It also holds useful metadata, such as the hardware and
158 # application versions, and the device type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700159 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700160 # Each data source produces a unique stream of data, with a unique identifier.
161 # Not all changes to data source affect the stream identifier, so that data
162 # collected by updated versions of the same application/device can still be
163 # considered to belong to the same data stream.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700164 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the
165 # platform, and is ignored in queries. It will be removed in a future version
166 # entirely.
167 &quot;A String&quot;,
168 ],
169 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this
170 # data source produces raw or derived data.
171 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among
172 # other data sources of the same type from the same underlying producer.
173 # Setting the stream name is optional, but should be done whenever an
174 # application exposes two streams for the same data type, or when a device
175 # has two equivalent sensors.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700176 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The
177 # identifier includes:&lt;br/&gt;&lt;br/&gt;
178 # &lt;ul&gt;
179 # &lt;li&gt;The physical device&#x27;s manufacturer, model, and serial number
180 # (UID).&lt;/li&gt;
181 # &lt;li&gt;The application&#x27;s package name or name. Package name is used when the
182 # data source was created by an Android application. The developer project
183 # number is used when the data source was created by a REST client.&lt;/li&gt;
184 # &lt;li&gt;The data source&#x27;s type.&lt;/li&gt;
185 # &lt;li&gt;The data source&#x27;s stream name.&lt;/li&gt;
186 # &lt;/ul&gt;
187 # Note that not all attributes of the data source are used as part of the
188 # stream identifier. In particular, the version of the hardware/the
189 # application isn&#x27;t used. This allows us to preserve the same stream through
190 # version updates. This also means that two DataSource objects may represent
191 # the same data stream even if they&#x27;re not equal.
192 #
193 # The exact format of the data stream ID created by an Android application
194 # is:
195 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:application.packageName&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model&lt;wbr/&gt;:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
196 #
197 # The exact format of the data stream ID created by a REST client is:
198 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:developer project
199 # number&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
200 #
201 # When any of the optional fields that make up the data stream ID are absent,
202 # they will be omitted from the data stream ID. The minimum viable data
203 # stream ID would be:
204 # type:dataType.name:developer project number
205 #
206 # Finally, the developer project number and device UID are obfuscated when
207 # read by any REST or Android client that did not create the data source.
208 # Only the data source creator will see the developer project number in clear
209 # and normal form. This means a client will see a different set of
210 # data_stream_ids than another client with different credentials.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700211 &quot;device&quot;: { # Representation of an integrated device (such as a phone or a wearable) that # Representation of an integrated device (such as a phone or a wearable) that
212 # can hold sensors.
213 # can hold sensors. Each sensor is exposed as a data source.
214 #
215 # The main purpose of the device information contained in this class is to
216 # identify the hardware of a particular data source. This can be useful in
217 # different ways, including:
218 # &lt;ul&gt;
219 # &lt;li&gt;Distinguishing two similar sensors on different devices (the step
220 # counter on two nexus 5 phones, for instance)
221 # &lt;li&gt;Display the source of data to the user (by using the device make /
222 # model)
223 # &lt;li&gt;Treat data differently depending on sensor type (accelerometers on a
224 # watch may give different patterns than those on a phone)
225 # &lt;li&gt;Build different analysis models for each device/version.
226 # &lt;/ul&gt;
227 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is
228 # obfuscated when read by any REST or Android client that did not create
229 # the data source. Only the data source creator will see the uid field in
230 # clear and normal form.
231 #
232 # The obfuscation preserves equality; that is, given two IDs, if id1 == id2,
233 # obfuscated(id1) == obfuscated(id2).
234 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
235 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
236 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
237 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
238 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700239 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
240 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
241 # identifier when created by Android applications, but cannot be specified
242 # by REST clients. REST clients will have their developer project number
243 # reflected into the Data Source data stream IDs, instead of the packageName.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700244 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
245 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
246 # application changes in a way that affects the computation of the data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700247 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
248 # do not enforce uniqueness of this name. It is provided as a matter of
249 # convenience for other developers who would like to identify which REST
250 # created an Application or Data Source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700251 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700252 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by,
253 # inserted into, or queried from the Fitness API.
254 &quot;field&quot;: [ # A field represents one dimension of a data type.
255 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z
256 # axes) each field represents one dimension. Each data type field has a unique
257 # name which identifies it. The field also defines the format of the data (int,
258 # float, etc.).
259 #
260 # This message is only instantiated in code and not used for wire comms or
261 # stored in any way.
262 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
263 &quot;optional&quot;: True or False,
264 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names
265 # are not namespaced, and only need to be unique within the data type.
266 },
267 ],
268 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the
269 # com.google namespace are shared as part of the platform.
270 },
271 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700272 }
273
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700274 x__xgafv: string, V1 error format.
275 Allowed values
276 1 - v1 error format
277 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700278
279Returns:
280 An object of the form:
281
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700282 { # Definition of a unique source of sensor data. Data sources can expose raw
283 # data coming from hardware sensors on local or companion devices. They can
284 # also expose derived data, created by transforming or merging other data
285 # sources. Multiple data sources can exist for the same data type. Every data
286 # point inserted into or read from this service has an associated data
287 # source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700289 # The data source contains enough information to uniquely identify its data,
290 # including the hardware device and the application that collected and/or
291 # transformed the data. It also holds useful metadata, such as the hardware and
292 # application versions, and the device type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700293 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700294 # Each data source produces a unique stream of data, with a unique identifier.
295 # Not all changes to data source affect the stream identifier, so that data
296 # collected by updated versions of the same application/device can still be
297 # considered to belong to the same data stream.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700298 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the
299 # platform, and is ignored in queries. It will be removed in a future version
300 # entirely.
301 &quot;A String&quot;,
302 ],
303 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this
304 # data source produces raw or derived data.
305 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among
306 # other data sources of the same type from the same underlying producer.
307 # Setting the stream name is optional, but should be done whenever an
308 # application exposes two streams for the same data type, or when a device
309 # has two equivalent sensors.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700310 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The
311 # identifier includes:&lt;br/&gt;&lt;br/&gt;
312 # &lt;ul&gt;
313 # &lt;li&gt;The physical device&#x27;s manufacturer, model, and serial number
314 # (UID).&lt;/li&gt;
315 # &lt;li&gt;The application&#x27;s package name or name. Package name is used when the
316 # data source was created by an Android application. The developer project
317 # number is used when the data source was created by a REST client.&lt;/li&gt;
318 # &lt;li&gt;The data source&#x27;s type.&lt;/li&gt;
319 # &lt;li&gt;The data source&#x27;s stream name.&lt;/li&gt;
320 # &lt;/ul&gt;
321 # Note that not all attributes of the data source are used as part of the
322 # stream identifier. In particular, the version of the hardware/the
323 # application isn&#x27;t used. This allows us to preserve the same stream through
324 # version updates. This also means that two DataSource objects may represent
325 # the same data stream even if they&#x27;re not equal.
326 #
327 # The exact format of the data stream ID created by an Android application
328 # is:
329 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:application.packageName&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model&lt;wbr/&gt;:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
330 #
331 # The exact format of the data stream ID created by a REST client is:
332 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:developer project
333 # number&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
334 #
335 # When any of the optional fields that make up the data stream ID are absent,
336 # they will be omitted from the data stream ID. The minimum viable data
337 # stream ID would be:
338 # type:dataType.name:developer project number
339 #
340 # Finally, the developer project number and device UID are obfuscated when
341 # read by any REST or Android client that did not create the data source.
342 # Only the data source creator will see the developer project number in clear
343 # and normal form. This means a client will see a different set of
344 # data_stream_ids than another client with different credentials.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700345 &quot;device&quot;: { # Representation of an integrated device (such as a phone or a wearable) that # Representation of an integrated device (such as a phone or a wearable) that
346 # can hold sensors.
347 # can hold sensors. Each sensor is exposed as a data source.
348 #
349 # The main purpose of the device information contained in this class is to
350 # identify the hardware of a particular data source. This can be useful in
351 # different ways, including:
352 # &lt;ul&gt;
353 # &lt;li&gt;Distinguishing two similar sensors on different devices (the step
354 # counter on two nexus 5 phones, for instance)
355 # &lt;li&gt;Display the source of data to the user (by using the device make /
356 # model)
357 # &lt;li&gt;Treat data differently depending on sensor type (accelerometers on a
358 # watch may give different patterns than those on a phone)
359 # &lt;li&gt;Build different analysis models for each device/version.
360 # &lt;/ul&gt;
361 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is
362 # obfuscated when read by any REST or Android client that did not create
363 # the data source. Only the data source creator will see the uid field in
364 # clear and normal form.
365 #
366 # The obfuscation preserves equality; that is, given two IDs, if id1 == id2,
367 # obfuscated(id1) == obfuscated(id2).
368 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
369 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
370 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
371 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
372 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700373 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
374 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
375 # identifier when created by Android applications, but cannot be specified
376 # by REST clients. REST clients will have their developer project number
377 # reflected into the Data Source data stream IDs, instead of the packageName.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700378 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
379 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
380 # application changes in a way that affects the computation of the data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700381 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
382 # do not enforce uniqueness of this name. It is provided as a matter of
383 # convenience for other developers who would like to identify which REST
384 # created an Application or Data Source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700385 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700386 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by,
387 # inserted into, or queried from the Fitness API.
388 &quot;field&quot;: [ # A field represents one dimension of a data type.
389 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z
390 # axes) each field represents one dimension. Each data type field has a unique
391 # name which identifies it. The field also defines the format of the data (int,
392 # float, etc.).
393 #
394 # This message is only instantiated in code and not used for wire comms or
395 # stored in any way.
396 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
397 &quot;optional&quot;: True or False,
398 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names
399 # are not namespaced, and only need to be unique within the data type.
400 },
401 ],
402 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the
403 # com.google namespace are shared as part of the platform.
404 },
405 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700406 }</pre>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000407</div>
Craig Citroe633be12015-03-02 13:40:36 -0800408
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000409<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700410 <code class="details" id="delete">delete(userId, dataSourceId, x__xgafv=None)</code>
411 <pre>Deletes the specified data source. The request will fail if the data
412source contains any data points.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000413
414Args:
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700415 userId: string, Retrieve a data source for the person identified. Use &lt;code&gt;me&lt;/code&gt; to
416indicate the authenticated user. Only &lt;code&gt;me&lt;/code&gt; is supported at this
417time. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000418 dataSourceId: string, The data stream ID of the data source to delete. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700419 x__xgafv: string, V1 error format.
420 Allowed values
421 1 - v1 error format
422 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800423
424Returns:
425 An object of the form:
426
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700427 { # Definition of a unique source of sensor data. Data sources can expose raw
428 # data coming from hardware sensors on local or companion devices. They can
429 # also expose derived data, created by transforming or merging other data
430 # sources. Multiple data sources can exist for the same data type. Every data
431 # point inserted into or read from this service has an associated data
432 # source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700433 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700434 # The data source contains enough information to uniquely identify its data,
435 # including the hardware device and the application that collected and/or
436 # transformed the data. It also holds useful metadata, such as the hardware and
437 # application versions, and the device type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700439 # Each data source produces a unique stream of data, with a unique identifier.
440 # Not all changes to data source affect the stream identifier, so that data
441 # collected by updated versions of the same application/device can still be
442 # considered to belong to the same data stream.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700443 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the
444 # platform, and is ignored in queries. It will be removed in a future version
445 # entirely.
446 &quot;A String&quot;,
447 ],
448 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this
449 # data source produces raw or derived data.
450 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among
451 # other data sources of the same type from the same underlying producer.
452 # Setting the stream name is optional, but should be done whenever an
453 # application exposes two streams for the same data type, or when a device
454 # has two equivalent sensors.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700455 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The
456 # identifier includes:&lt;br/&gt;&lt;br/&gt;
457 # &lt;ul&gt;
458 # &lt;li&gt;The physical device&#x27;s manufacturer, model, and serial number
459 # (UID).&lt;/li&gt;
460 # &lt;li&gt;The application&#x27;s package name or name. Package name is used when the
461 # data source was created by an Android application. The developer project
462 # number is used when the data source was created by a REST client.&lt;/li&gt;
463 # &lt;li&gt;The data source&#x27;s type.&lt;/li&gt;
464 # &lt;li&gt;The data source&#x27;s stream name.&lt;/li&gt;
465 # &lt;/ul&gt;
466 # Note that not all attributes of the data source are used as part of the
467 # stream identifier. In particular, the version of the hardware/the
468 # application isn&#x27;t used. This allows us to preserve the same stream through
469 # version updates. This also means that two DataSource objects may represent
470 # the same data stream even if they&#x27;re not equal.
471 #
472 # The exact format of the data stream ID created by an Android application
473 # is:
474 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:application.packageName&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model&lt;wbr/&gt;:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
475 #
476 # The exact format of the data stream ID created by a REST client is:
477 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:developer project
478 # number&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
479 #
480 # When any of the optional fields that make up the data stream ID are absent,
481 # they will be omitted from the data stream ID. The minimum viable data
482 # stream ID would be:
483 # type:dataType.name:developer project number
484 #
485 # Finally, the developer project number and device UID are obfuscated when
486 # read by any REST or Android client that did not create the data source.
487 # Only the data source creator will see the developer project number in clear
488 # and normal form. This means a client will see a different set of
489 # data_stream_ids than another client with different credentials.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700490 &quot;device&quot;: { # Representation of an integrated device (such as a phone or a wearable) that # Representation of an integrated device (such as a phone or a wearable) that
491 # can hold sensors.
492 # can hold sensors. Each sensor is exposed as a data source.
493 #
494 # The main purpose of the device information contained in this class is to
495 # identify the hardware of a particular data source. This can be useful in
496 # different ways, including:
497 # &lt;ul&gt;
498 # &lt;li&gt;Distinguishing two similar sensors on different devices (the step
499 # counter on two nexus 5 phones, for instance)
500 # &lt;li&gt;Display the source of data to the user (by using the device make /
501 # model)
502 # &lt;li&gt;Treat data differently depending on sensor type (accelerometers on a
503 # watch may give different patterns than those on a phone)
504 # &lt;li&gt;Build different analysis models for each device/version.
505 # &lt;/ul&gt;
506 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is
507 # obfuscated when read by any REST or Android client that did not create
508 # the data source. Only the data source creator will see the uid field in
509 # clear and normal form.
510 #
511 # The obfuscation preserves equality; that is, given two IDs, if id1 == id2,
512 # obfuscated(id1) == obfuscated(id2).
513 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
514 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
515 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
516 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
517 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700518 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
519 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
520 # identifier when created by Android applications, but cannot be specified
521 # by REST clients. REST clients will have their developer project number
522 # reflected into the Data Source data stream IDs, instead of the packageName.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700523 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
524 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
525 # application changes in a way that affects the computation of the data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700526 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
527 # do not enforce uniqueness of this name. It is provided as a matter of
528 # convenience for other developers who would like to identify which REST
529 # created an Application or Data Source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700530 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700531 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by,
532 # inserted into, or queried from the Fitness API.
533 &quot;field&quot;: [ # A field represents one dimension of a data type.
534 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z
535 # axes) each field represents one dimension. Each data type field has a unique
536 # name which identifies it. The field also defines the format of the data (int,
537 # float, etc.).
538 #
539 # This message is only instantiated in code and not used for wire comms or
540 # stored in any way.
541 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
542 &quot;optional&quot;: True or False,
543 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names
544 # are not namespaced, and only need to be unique within the data type.
545 },
546 ],
547 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the
548 # com.google namespace are shared as part of the platform.
549 },
550 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 }</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800552</div>
553
554<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700555 <code class="details" id="get">get(userId, dataSourceId, x__xgafv=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700556 <pre>Returns the specified data source.
Craig Citroe633be12015-03-02 13:40:36 -0800557
558Args:
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700559 userId: string, Retrieve a data source for the person identified. Use &lt;code&gt;me&lt;/code&gt; to
560indicate the authenticated user. Only &lt;code&gt;me&lt;/code&gt; is supported at this
561time. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800562 dataSourceId: string, The data stream ID of the data source to retrieve. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700563 x__xgafv: string, V1 error format.
564 Allowed values
565 1 - v1 error format
566 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800567
568Returns:
569 An object of the form:
570
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700571 { # Definition of a unique source of sensor data. Data sources can expose raw
572 # data coming from hardware sensors on local or companion devices. They can
573 # also expose derived data, created by transforming or merging other data
574 # sources. Multiple data sources can exist for the same data type. Every data
575 # point inserted into or read from this service has an associated data
576 # source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700577 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700578 # The data source contains enough information to uniquely identify its data,
579 # including the hardware device and the application that collected and/or
580 # transformed the data. It also holds useful metadata, such as the hardware and
581 # application versions, and the device type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700582 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700583 # Each data source produces a unique stream of data, with a unique identifier.
584 # Not all changes to data source affect the stream identifier, so that data
585 # collected by updated versions of the same application/device can still be
586 # considered to belong to the same data stream.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700587 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the
588 # platform, and is ignored in queries. It will be removed in a future version
589 # entirely.
590 &quot;A String&quot;,
591 ],
592 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this
593 # data source produces raw or derived data.
594 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among
595 # other data sources of the same type from the same underlying producer.
596 # Setting the stream name is optional, but should be done whenever an
597 # application exposes two streams for the same data type, or when a device
598 # has two equivalent sensors.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700599 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The
600 # identifier includes:&lt;br/&gt;&lt;br/&gt;
601 # &lt;ul&gt;
602 # &lt;li&gt;The physical device&#x27;s manufacturer, model, and serial number
603 # (UID).&lt;/li&gt;
604 # &lt;li&gt;The application&#x27;s package name or name. Package name is used when the
605 # data source was created by an Android application. The developer project
606 # number is used when the data source was created by a REST client.&lt;/li&gt;
607 # &lt;li&gt;The data source&#x27;s type.&lt;/li&gt;
608 # &lt;li&gt;The data source&#x27;s stream name.&lt;/li&gt;
609 # &lt;/ul&gt;
610 # Note that not all attributes of the data source are used as part of the
611 # stream identifier. In particular, the version of the hardware/the
612 # application isn&#x27;t used. This allows us to preserve the same stream through
613 # version updates. This also means that two DataSource objects may represent
614 # the same data stream even if they&#x27;re not equal.
615 #
616 # The exact format of the data stream ID created by an Android application
617 # is:
618 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:application.packageName&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model&lt;wbr/&gt;:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
619 #
620 # The exact format of the data stream ID created by a REST client is:
621 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:developer project
622 # number&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
623 #
624 # When any of the optional fields that make up the data stream ID are absent,
625 # they will be omitted from the data stream ID. The minimum viable data
626 # stream ID would be:
627 # type:dataType.name:developer project number
628 #
629 # Finally, the developer project number and device UID are obfuscated when
630 # read by any REST or Android client that did not create the data source.
631 # Only the data source creator will see the developer project number in clear
632 # and normal form. This means a client will see a different set of
633 # data_stream_ids than another client with different credentials.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700634 &quot;device&quot;: { # Representation of an integrated device (such as a phone or a wearable) that # Representation of an integrated device (such as a phone or a wearable) that
635 # can hold sensors.
636 # can hold sensors. Each sensor is exposed as a data source.
637 #
638 # The main purpose of the device information contained in this class is to
639 # identify the hardware of a particular data source. This can be useful in
640 # different ways, including:
641 # &lt;ul&gt;
642 # &lt;li&gt;Distinguishing two similar sensors on different devices (the step
643 # counter on two nexus 5 phones, for instance)
644 # &lt;li&gt;Display the source of data to the user (by using the device make /
645 # model)
646 # &lt;li&gt;Treat data differently depending on sensor type (accelerometers on a
647 # watch may give different patterns than those on a phone)
648 # &lt;li&gt;Build different analysis models for each device/version.
649 # &lt;/ul&gt;
650 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is
651 # obfuscated when read by any REST or Android client that did not create
652 # the data source. Only the data source creator will see the uid field in
653 # clear and normal form.
654 #
655 # The obfuscation preserves equality; that is, given two IDs, if id1 == id2,
656 # obfuscated(id1) == obfuscated(id2).
657 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
658 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
659 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
660 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
661 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700662 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
663 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
664 # identifier when created by Android applications, but cannot be specified
665 # by REST clients. REST clients will have their developer project number
666 # reflected into the Data Source data stream IDs, instead of the packageName.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700667 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
668 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
669 # application changes in a way that affects the computation of the data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700670 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
671 # do not enforce uniqueness of this name. It is provided as a matter of
672 # convenience for other developers who would like to identify which REST
673 # created an Application or Data Source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700674 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700675 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by,
676 # inserted into, or queried from the Fitness API.
677 &quot;field&quot;: [ # A field represents one dimension of a data type.
678 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z
679 # axes) each field represents one dimension. Each data type field has a unique
680 # name which identifies it. The field also defines the format of the data (int,
681 # float, etc.).
682 #
683 # This message is only instantiated in code and not used for wire comms or
684 # stored in any way.
685 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
686 &quot;optional&quot;: True or False,
687 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names
688 # are not namespaced, and only need to be unique within the data type.
689 },
690 ],
691 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the
692 # com.google namespace are shared as part of the platform.
693 },
694 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700695 }</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800696</div>
697
698<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700699 <code class="details" id="list">list(userId, dataTypeName=None, x__xgafv=None)</code>
700 <pre>Lists all data sources that are visible to the developer, using the OAuth
701scopes provided. The list is not exhaustive; the user may have private
702data sources that are only visible to other developers, or calls using
703other scopes.
Craig Citroe633be12015-03-02 13:40:36 -0800704
705Args:
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700706 userId: string, List data sources for the person identified. Use &lt;code&gt;me&lt;/code&gt; to
707indicate the authenticated user. Only &lt;code&gt;me&lt;/code&gt; is supported at this
708time. (required)
709 dataTypeName: string, The names of data types to include in the list. If not specified, all
710data sources will be returned. (repeated)
711 x__xgafv: string, V1 error format.
712 Allowed values
713 1 - v1 error format
714 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800715
716Returns:
717 An object of the form:
718
719 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 &quot;dataSource&quot;: [ # A previously created data source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700721 { # Definition of a unique source of sensor data. Data sources can expose raw
722 # data coming from hardware sensors on local or companion devices. They can
723 # also expose derived data, created by transforming or merging other data
724 # sources. Multiple data sources can exist for the same data type. Every data
725 # point inserted into or read from this service has an associated data
726 # source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700727 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700728 # The data source contains enough information to uniquely identify its data,
729 # including the hardware device and the application that collected and/or
730 # transformed the data. It also holds useful metadata, such as the hardware and
731 # application versions, and the device type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700732 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700733 # Each data source produces a unique stream of data, with a unique identifier.
734 # Not all changes to data source affect the stream identifier, so that data
735 # collected by updated versions of the same application/device can still be
736 # considered to belong to the same data stream.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700737 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the
738 # platform, and is ignored in queries. It will be removed in a future version
739 # entirely.
740 &quot;A String&quot;,
741 ],
742 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this
743 # data source produces raw or derived data.
744 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among
745 # other data sources of the same type from the same underlying producer.
746 # Setting the stream name is optional, but should be done whenever an
747 # application exposes two streams for the same data type, or when a device
748 # has two equivalent sensors.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700749 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The
750 # identifier includes:&lt;br/&gt;&lt;br/&gt;
751 # &lt;ul&gt;
752 # &lt;li&gt;The physical device&#x27;s manufacturer, model, and serial number
753 # (UID).&lt;/li&gt;
754 # &lt;li&gt;The application&#x27;s package name or name. Package name is used when the
755 # data source was created by an Android application. The developer project
756 # number is used when the data source was created by a REST client.&lt;/li&gt;
757 # &lt;li&gt;The data source&#x27;s type.&lt;/li&gt;
758 # &lt;li&gt;The data source&#x27;s stream name.&lt;/li&gt;
759 # &lt;/ul&gt;
760 # Note that not all attributes of the data source are used as part of the
761 # stream identifier. In particular, the version of the hardware/the
762 # application isn&#x27;t used. This allows us to preserve the same stream through
763 # version updates. This also means that two DataSource objects may represent
764 # the same data stream even if they&#x27;re not equal.
765 #
766 # The exact format of the data stream ID created by an Android application
767 # is:
768 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:application.packageName&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model&lt;wbr/&gt;:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
769 #
770 # The exact format of the data stream ID created by a REST client is:
771 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:developer project
772 # number&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
773 #
774 # When any of the optional fields that make up the data stream ID are absent,
775 # they will be omitted from the data stream ID. The minimum viable data
776 # stream ID would be:
777 # type:dataType.name:developer project number
778 #
779 # Finally, the developer project number and device UID are obfuscated when
780 # read by any REST or Android client that did not create the data source.
781 # Only the data source creator will see the developer project number in clear
782 # and normal form. This means a client will see a different set of
783 # data_stream_ids than another client with different credentials.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700784 &quot;device&quot;: { # Representation of an integrated device (such as a phone or a wearable) that # Representation of an integrated device (such as a phone or a wearable) that
785 # can hold sensors.
786 # can hold sensors. Each sensor is exposed as a data source.
787 #
788 # The main purpose of the device information contained in this class is to
789 # identify the hardware of a particular data source. This can be useful in
790 # different ways, including:
791 # &lt;ul&gt;
792 # &lt;li&gt;Distinguishing two similar sensors on different devices (the step
793 # counter on two nexus 5 phones, for instance)
794 # &lt;li&gt;Display the source of data to the user (by using the device make /
795 # model)
796 # &lt;li&gt;Treat data differently depending on sensor type (accelerometers on a
797 # watch may give different patterns than those on a phone)
798 # &lt;li&gt;Build different analysis models for each device/version.
799 # &lt;/ul&gt;
800 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is
801 # obfuscated when read by any REST or Android client that did not create
802 # the data source. Only the data source creator will see the uid field in
803 # clear and normal form.
804 #
805 # The obfuscation preserves equality; that is, given two IDs, if id1 == id2,
806 # obfuscated(id1) == obfuscated(id2).
807 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
808 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
809 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
810 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
811 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700812 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
813 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
814 # identifier when created by Android applications, but cannot be specified
815 # by REST clients. REST clients will have their developer project number
816 # reflected into the Data Source data stream IDs, instead of the packageName.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700817 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
818 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
819 # application changes in a way that affects the computation of the data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700820 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
821 # do not enforce uniqueness of this name. It is provided as a matter of
822 # convenience for other developers who would like to identify which REST
823 # created an Application or Data Source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700824 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700825 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by,
826 # inserted into, or queried from the Fitness API.
827 &quot;field&quot;: [ # A field represents one dimension of a data type.
828 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z
829 # axes) each field represents one dimension. Each data type field has a unique
830 # name which identifies it. The field also defines the format of the data (int,
831 # float, etc.).
832 #
833 # This message is only instantiated in code and not used for wire comms or
834 # stored in any way.
835 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
836 &quot;optional&quot;: True or False,
837 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names
838 # are not namespaced, and only need to be unique within the data type.
839 },
840 ],
841 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the
842 # com.google namespace are shared as part of the platform.
843 },
844 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
Craig Citroe633be12015-03-02 13:40:36 -0800845 },
846 ],
847 }</pre>
848</div>
849
850<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700851 <code class="details" id="update">update(userId, dataSourceId, body=None, x__xgafv=None)</code>
852 <pre>Updates the specified data source. The &lt;code&gt;dataStreamId&lt;/code&gt;,
853&lt;code&gt;dataType&lt;/code&gt;, &lt;code&gt;type&lt;/code&gt;, &lt;code&gt;dataStreamName&lt;/code&gt;, and
854&lt;code&gt;device&lt;/code&gt; properties with the exception of &lt;code&gt;version&lt;/code&gt;,
855cannot be modified.
Craig Citroe633be12015-03-02 13:40:36 -0800856
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700857Data sources are identified by their &lt;code&gt;dataStreamId&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800858
859Args:
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700860 userId: string, Update the data source for the person identified. Use &lt;code&gt;me&lt;/code&gt; to
861indicate the authenticated user. Only &lt;code&gt;me&lt;/code&gt; is supported at this
862time. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800863 dataSourceId: string, The data stream ID of the data source to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700864 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800865 The object takes the form of:
866
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700867{ # Definition of a unique source of sensor data. Data sources can expose raw
868 # data coming from hardware sensors on local or companion devices. They can
869 # also expose derived data, created by transforming or merging other data
870 # sources. Multiple data sources can exist for the same data type. Every data
871 # point inserted into or read from this service has an associated data
872 # source.
Craig Citroe633be12015-03-02 13:40:36 -0800873 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700874 # The data source contains enough information to uniquely identify its data,
875 # including the hardware device and the application that collected and/or
876 # transformed the data. It also holds useful metadata, such as the hardware and
877 # application versions, and the device type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700878 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700879 # Each data source produces a unique stream of data, with a unique identifier.
880 # Not all changes to data source affect the stream identifier, so that data
881 # collected by updated versions of the same application/device can still be
882 # considered to belong to the same data stream.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700883 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the
884 # platform, and is ignored in queries. It will be removed in a future version
885 # entirely.
886 &quot;A String&quot;,
887 ],
888 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this
889 # data source produces raw or derived data.
890 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among
891 # other data sources of the same type from the same underlying producer.
892 # Setting the stream name is optional, but should be done whenever an
893 # application exposes two streams for the same data type, or when a device
894 # has two equivalent sensors.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700895 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The
896 # identifier includes:&lt;br/&gt;&lt;br/&gt;
897 # &lt;ul&gt;
898 # &lt;li&gt;The physical device&#x27;s manufacturer, model, and serial number
899 # (UID).&lt;/li&gt;
900 # &lt;li&gt;The application&#x27;s package name or name. Package name is used when the
901 # data source was created by an Android application. The developer project
902 # number is used when the data source was created by a REST client.&lt;/li&gt;
903 # &lt;li&gt;The data source&#x27;s type.&lt;/li&gt;
904 # &lt;li&gt;The data source&#x27;s stream name.&lt;/li&gt;
905 # &lt;/ul&gt;
906 # Note that not all attributes of the data source are used as part of the
907 # stream identifier. In particular, the version of the hardware/the
908 # application isn&#x27;t used. This allows us to preserve the same stream through
909 # version updates. This also means that two DataSource objects may represent
910 # the same data stream even if they&#x27;re not equal.
911 #
912 # The exact format of the data stream ID created by an Android application
913 # is:
914 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:application.packageName&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model&lt;wbr/&gt;:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
915 #
916 # The exact format of the data stream ID created by a REST client is:
917 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:developer project
918 # number&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
919 #
920 # When any of the optional fields that make up the data stream ID are absent,
921 # they will be omitted from the data stream ID. The minimum viable data
922 # stream ID would be:
923 # type:dataType.name:developer project number
924 #
925 # Finally, the developer project number and device UID are obfuscated when
926 # read by any REST or Android client that did not create the data source.
927 # Only the data source creator will see the developer project number in clear
928 # and normal form. This means a client will see a different set of
929 # data_stream_ids than another client with different credentials.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700930 &quot;device&quot;: { # Representation of an integrated device (such as a phone or a wearable) that # Representation of an integrated device (such as a phone or a wearable) that
931 # can hold sensors.
932 # can hold sensors. Each sensor is exposed as a data source.
933 #
934 # The main purpose of the device information contained in this class is to
935 # identify the hardware of a particular data source. This can be useful in
936 # different ways, including:
937 # &lt;ul&gt;
938 # &lt;li&gt;Distinguishing two similar sensors on different devices (the step
939 # counter on two nexus 5 phones, for instance)
940 # &lt;li&gt;Display the source of data to the user (by using the device make /
941 # model)
942 # &lt;li&gt;Treat data differently depending on sensor type (accelerometers on a
943 # watch may give different patterns than those on a phone)
944 # &lt;li&gt;Build different analysis models for each device/version.
945 # &lt;/ul&gt;
946 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is
947 # obfuscated when read by any REST or Android client that did not create
948 # the data source. Only the data source creator will see the uid field in
949 # clear and normal form.
950 #
951 # The obfuscation preserves equality; that is, given two IDs, if id1 == id2,
952 # obfuscated(id1) == obfuscated(id2).
953 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
954 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
955 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
956 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
957 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700958 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
959 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
960 # identifier when created by Android applications, but cannot be specified
961 # by REST clients. REST clients will have their developer project number
962 # reflected into the Data Source data stream IDs, instead of the packageName.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700963 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
964 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
965 # application changes in a way that affects the computation of the data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700966 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
967 # do not enforce uniqueness of this name. It is provided as a matter of
968 # convenience for other developers who would like to identify which REST
969 # created an Application or Data Source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700970 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700971 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by,
972 # inserted into, or queried from the Fitness API.
973 &quot;field&quot;: [ # A field represents one dimension of a data type.
974 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z
975 # axes) each field represents one dimension. Each data type field has a unique
976 # name which identifies it. The field also defines the format of the data (int,
977 # float, etc.).
978 #
979 # This message is only instantiated in code and not used for wire comms or
980 # stored in any way.
981 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
982 &quot;optional&quot;: True or False,
983 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names
984 # are not namespaced, and only need to be unique within the data type.
985 },
986 ],
987 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the
988 # com.google namespace are shared as part of the platform.
989 },
990 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700991 }
992
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700993 x__xgafv: string, V1 error format.
994 Allowed values
995 1 - v1 error format
996 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700997
998Returns:
999 An object of the form:
1000
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001001 { # Definition of a unique source of sensor data. Data sources can expose raw
1002 # data coming from hardware sensors on local or companion devices. They can
1003 # also expose derived data, created by transforming or merging other data
1004 # sources. Multiple data sources can exist for the same data type. Every data
1005 # point inserted into or read from this service has an associated data
1006 # source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001007 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001008 # The data source contains enough information to uniquely identify its data,
1009 # including the hardware device and the application that collected and/or
1010 # transformed the data. It also holds useful metadata, such as the hardware and
1011 # application versions, and the device type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001012 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001013 # Each data source produces a unique stream of data, with a unique identifier.
1014 # Not all changes to data source affect the stream identifier, so that data
1015 # collected by updated versions of the same application/device can still be
1016 # considered to belong to the same data stream.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001017 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the
1018 # platform, and is ignored in queries. It will be removed in a future version
1019 # entirely.
1020 &quot;A String&quot;,
1021 ],
1022 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this
1023 # data source produces raw or derived data.
1024 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among
1025 # other data sources of the same type from the same underlying producer.
1026 # Setting the stream name is optional, but should be done whenever an
1027 # application exposes two streams for the same data type, or when a device
1028 # has two equivalent sensors.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001029 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The
1030 # identifier includes:&lt;br/&gt;&lt;br/&gt;
1031 # &lt;ul&gt;
1032 # &lt;li&gt;The physical device&#x27;s manufacturer, model, and serial number
1033 # (UID).&lt;/li&gt;
1034 # &lt;li&gt;The application&#x27;s package name or name. Package name is used when the
1035 # data source was created by an Android application. The developer project
1036 # number is used when the data source was created by a REST client.&lt;/li&gt;
1037 # &lt;li&gt;The data source&#x27;s type.&lt;/li&gt;
1038 # &lt;li&gt;The data source&#x27;s stream name.&lt;/li&gt;
1039 # &lt;/ul&gt;
1040 # Note that not all attributes of the data source are used as part of the
1041 # stream identifier. In particular, the version of the hardware/the
1042 # application isn&#x27;t used. This allows us to preserve the same stream through
1043 # version updates. This also means that two DataSource objects may represent
1044 # the same data stream even if they&#x27;re not equal.
1045 #
1046 # The exact format of the data stream ID created by an Android application
1047 # is:
1048 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:application.packageName&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model&lt;wbr/&gt;:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
1049 #
1050 # The exact format of the data stream ID created by a REST client is:
1051 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:developer project
1052 # number&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
1053 #
1054 # When any of the optional fields that make up the data stream ID are absent,
1055 # they will be omitted from the data stream ID. The minimum viable data
1056 # stream ID would be:
1057 # type:dataType.name:developer project number
1058 #
1059 # Finally, the developer project number and device UID are obfuscated when
1060 # read by any REST or Android client that did not create the data source.
1061 # Only the data source creator will see the developer project number in clear
1062 # and normal form. This means a client will see a different set of
1063 # data_stream_ids than another client with different credentials.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001064 &quot;device&quot;: { # Representation of an integrated device (such as a phone or a wearable) that # Representation of an integrated device (such as a phone or a wearable) that
1065 # can hold sensors.
1066 # can hold sensors. Each sensor is exposed as a data source.
1067 #
1068 # The main purpose of the device information contained in this class is to
1069 # identify the hardware of a particular data source. This can be useful in
1070 # different ways, including:
1071 # &lt;ul&gt;
1072 # &lt;li&gt;Distinguishing two similar sensors on different devices (the step
1073 # counter on two nexus 5 phones, for instance)
1074 # &lt;li&gt;Display the source of data to the user (by using the device make /
1075 # model)
1076 # &lt;li&gt;Treat data differently depending on sensor type (accelerometers on a
1077 # watch may give different patterns than those on a phone)
1078 # &lt;li&gt;Build different analysis models for each device/version.
1079 # &lt;/ul&gt;
1080 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is
1081 # obfuscated when read by any REST or Android client that did not create
1082 # the data source. Only the data source creator will see the uid field in
1083 # clear and normal form.
1084 #
1085 # The obfuscation preserves equality; that is, given two IDs, if id1 == id2,
1086 # obfuscated(id1) == obfuscated(id2).
1087 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
1088 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
1089 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
1090 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
1091 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001092 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
1093 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
1094 # identifier when created by Android applications, but cannot be specified
1095 # by REST clients. REST clients will have their developer project number
1096 # reflected into the Data Source data stream IDs, instead of the packageName.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001097 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
1098 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
1099 # application changes in a way that affects the computation of the data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001100 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
1101 # do not enforce uniqueness of this name. It is provided as a matter of
1102 # convenience for other developers who would like to identify which REST
1103 # created an Application or Data Source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001104 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001105 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by,
1106 # inserted into, or queried from the Fitness API.
1107 &quot;field&quot;: [ # A field represents one dimension of a data type.
1108 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z
1109 # axes) each field represents one dimension. Each data type field has a unique
1110 # name which identifies it. The field also defines the format of the data (int,
1111 # float, etc.).
1112 #
1113 # This message is only instantiated in code and not used for wire comms or
1114 # stored in any way.
1115 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
1116 &quot;optional&quot;: True or False,
1117 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names
1118 # are not namespaced, and only need to be unique within the data type.
1119 },
1120 ],
1121 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the
1122 # com.google namespace are shared as part of the platform.
1123 },
1124 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001125 }</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001126</div>
1127
1128</body></html>