blob: df11b3750ad58bd9ef245ce2bed0ffa3d5f1b588 [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.
164 &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
165 # can hold sensors.
166 # can hold sensors. Each sensor is exposed as a data source.
167 #
168 # The main purpose of the device information contained in this class is to
169 # identify the hardware of a particular data source. This can be useful in
170 # different ways, including:
171 # &lt;ul&gt;
172 # &lt;li&gt;Distinguishing two similar sensors on different devices (the step
173 # counter on two nexus 5 phones, for instance)
174 # &lt;li&gt;Display the source of data to the user (by using the device make /
175 # model)
176 # &lt;li&gt;Treat data differently depending on sensor type (accelerometers on a
177 # watch may give different patterns than those on a phone)
178 # &lt;li&gt;Build different analysis models for each device/version.
179 # &lt;/ul&gt;
180 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
181 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
182 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is
183 # obfuscated when read by any REST or Android client that did not create
184 # the data source. Only the data source creator will see the uid field in
185 # clear and normal form.
186 #
187 # The obfuscation preserves equality; that is, given two IDs, if id1 == id2,
188 # obfuscated(id1) == obfuscated(id2).
189 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
190 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
Craig Citroe633be12015-03-02 13:40:36 -0800191 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700192 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by,
193 # inserted into, or queried from the Fitness API.
194 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the
195 # com.google namespace are shared as part of the platform.
Bu Sun Kim65020912020-05-20 12:08:20 -0700196 &quot;field&quot;: [ # A field represents one dimension of a data type.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700197 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z
198 # axes) each field represents one dimension. Each data type field has a unique
199 # name which identifies it. The field also defines the format of the data (int,
200 # float, etc.).
Bu Sun Kim65020912020-05-20 12:08:20 -0700201 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700202 # This message is only instantiated in code and not used for wire comms or
203 # stored in any way.
204 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names
205 # are not namespaced, and only need to be unique within the data type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700207 &quot;optional&quot;: True or False,
208 },
209 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700210 },
211 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700212 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The
213 # identifier includes:&lt;br/&gt;&lt;br/&gt;
214 # &lt;ul&gt;
215 # &lt;li&gt;The physical device&#x27;s manufacturer, model, and serial number
216 # (UID).&lt;/li&gt;
217 # &lt;li&gt;The application&#x27;s package name or name. Package name is used when the
218 # data source was created by an Android application. The developer project
219 # number is used when the data source was created by a REST client.&lt;/li&gt;
220 # &lt;li&gt;The data source&#x27;s type.&lt;/li&gt;
221 # &lt;li&gt;The data source&#x27;s stream name.&lt;/li&gt;
222 # &lt;/ul&gt;
223 # Note that not all attributes of the data source are used as part of the
224 # stream identifier. In particular, the version of the hardware/the
225 # application isn&#x27;t used. This allows us to preserve the same stream through
226 # version updates. This also means that two DataSource objects may represent
227 # the same data stream even if they&#x27;re not equal.
228 #
229 # The exact format of the data stream ID created by an Android application
230 # is:
231 # &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;
232 #
233 # The exact format of the data stream ID created by a REST client is:
234 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:developer project
235 # number&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
236 #
237 # When any of the optional fields that make up the data stream ID are absent,
238 # they will be omitted from the data stream ID. The minimum viable data
239 # stream ID would be:
240 # type:dataType.name:developer project number
241 #
242 # Finally, the developer project number and device UID are obfuscated when
243 # read by any REST or Android client that did not create the data source.
244 # Only the data source creator will see the developer project number in clear
245 # and normal form. This means a client will see a different set of
246 # data_stream_ids than another client with different credentials.
247 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this
248 # data source produces raw or derived data.
249 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the
250 # platform, and is ignored in queries. It will be removed in a future version
251 # entirely.
252 &quot;A String&quot;,
253 ],
254 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among
255 # other data sources of the same type from the same underlying producer.
256 # Setting the stream name is optional, but should be done whenever an
257 # application exposes two streams for the same data type, or when a device
258 # has two equivalent sensors.
259 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
260 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
261 # identifier when created by Android applications, but cannot be specified
262 # by REST clients. REST clients will have their developer project number
263 # reflected into the Data Source data stream IDs, instead of the packageName.
264 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
265 # do not enforce uniqueness of this name. It is provided as a matter of
266 # convenience for other developers who would like to identify which REST
267 # created an Application or Data Source.
268 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
269 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
270 # application changes in a way that affects the computation of the data.
271 },
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.
298 &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
299 # can hold sensors.
300 # can hold sensors. Each sensor is exposed as a data source.
301 #
302 # The main purpose of the device information contained in this class is to
303 # identify the hardware of a particular data source. This can be useful in
304 # different ways, including:
305 # &lt;ul&gt;
306 # &lt;li&gt;Distinguishing two similar sensors on different devices (the step
307 # counter on two nexus 5 phones, for instance)
308 # &lt;li&gt;Display the source of data to the user (by using the device make /
309 # model)
310 # &lt;li&gt;Treat data differently depending on sensor type (accelerometers on a
311 # watch may give different patterns than those on a phone)
312 # &lt;li&gt;Build different analysis models for each device/version.
313 # &lt;/ul&gt;
314 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
315 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
316 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is
317 # obfuscated when read by any REST or Android client that did not create
318 # the data source. Only the data source creator will see the uid field in
319 # clear and normal form.
320 #
321 # The obfuscation preserves equality; that is, given two IDs, if id1 == id2,
322 # obfuscated(id1) == obfuscated(id2).
323 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
324 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700325 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700326 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by,
327 # inserted into, or queried from the Fitness API.
328 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the
329 # com.google namespace are shared as part of the platform.
Bu Sun Kim65020912020-05-20 12:08:20 -0700330 &quot;field&quot;: [ # A field represents one dimension of a data type.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700331 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z
332 # axes) each field represents one dimension. Each data type field has a unique
333 # name which identifies it. The field also defines the format of the data (int,
334 # float, etc.).
Bu Sun Kim65020912020-05-20 12:08:20 -0700335 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700336 # This message is only instantiated in code and not used for wire comms or
337 # stored in any way.
338 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names
339 # are not namespaced, and only need to be unique within the data type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700340 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700341 &quot;optional&quot;: True or False,
342 },
343 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700344 },
345 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700346 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The
347 # identifier includes:&lt;br/&gt;&lt;br/&gt;
348 # &lt;ul&gt;
349 # &lt;li&gt;The physical device&#x27;s manufacturer, model, and serial number
350 # (UID).&lt;/li&gt;
351 # &lt;li&gt;The application&#x27;s package name or name. Package name is used when the
352 # data source was created by an Android application. The developer project
353 # number is used when the data source was created by a REST client.&lt;/li&gt;
354 # &lt;li&gt;The data source&#x27;s type.&lt;/li&gt;
355 # &lt;li&gt;The data source&#x27;s stream name.&lt;/li&gt;
356 # &lt;/ul&gt;
357 # Note that not all attributes of the data source are used as part of the
358 # stream identifier. In particular, the version of the hardware/the
359 # application isn&#x27;t used. This allows us to preserve the same stream through
360 # version updates. This also means that two DataSource objects may represent
361 # the same data stream even if they&#x27;re not equal.
362 #
363 # The exact format of the data stream ID created by an Android application
364 # is:
365 # &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;
366 #
367 # The exact format of the data stream ID created by a REST client is:
368 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:developer project
369 # number&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
370 #
371 # When any of the optional fields that make up the data stream ID are absent,
372 # they will be omitted from the data stream ID. The minimum viable data
373 # stream ID would be:
374 # type:dataType.name:developer project number
375 #
376 # Finally, the developer project number and device UID are obfuscated when
377 # read by any REST or Android client that did not create the data source.
378 # Only the data source creator will see the developer project number in clear
379 # and normal form. This means a client will see a different set of
380 # data_stream_ids than another client with different credentials.
381 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this
382 # data source produces raw or derived data.
383 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the
384 # platform, and is ignored in queries. It will be removed in a future version
385 # entirely.
386 &quot;A String&quot;,
387 ],
388 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among
389 # other data sources of the same type from the same underlying producer.
390 # Setting the stream name is optional, but should be done whenever an
391 # application exposes two streams for the same data type, or when a device
392 # has two equivalent sensors.
393 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
394 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
395 # identifier when created by Android applications, but cannot be specified
396 # by REST clients. REST clients will have their developer project number
397 # reflected into the Data Source data stream IDs, instead of the packageName.
398 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
399 # do not enforce uniqueness of this name. It is provided as a matter of
400 # convenience for other developers who would like to identify which REST
401 # created an Application or Data Source.
402 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
403 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
404 # application changes in a way that affects the computation of the data.
405 },
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.
443 &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
444 # can hold sensors.
445 # can hold sensors. Each sensor is exposed as a data source.
446 #
447 # The main purpose of the device information contained in this class is to
448 # identify the hardware of a particular data source. This can be useful in
449 # different ways, including:
450 # &lt;ul&gt;
451 # &lt;li&gt;Distinguishing two similar sensors on different devices (the step
452 # counter on two nexus 5 phones, for instance)
453 # &lt;li&gt;Display the source of data to the user (by using the device make /
454 # model)
455 # &lt;li&gt;Treat data differently depending on sensor type (accelerometers on a
456 # watch may give different patterns than those on a phone)
457 # &lt;li&gt;Build different analysis models for each device/version.
458 # &lt;/ul&gt;
459 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
460 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
461 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is
462 # obfuscated when read by any REST or Android client that did not create
463 # the data source. Only the data source creator will see the uid field in
464 # clear and normal form.
465 #
466 # The obfuscation preserves equality; that is, given two IDs, if id1 == id2,
467 # obfuscated(id1) == obfuscated(id2).
468 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
469 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700470 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700471 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by,
472 # inserted into, or queried from the Fitness API.
473 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the
474 # com.google namespace are shared as part of the platform.
Bu Sun Kim65020912020-05-20 12:08:20 -0700475 &quot;field&quot;: [ # A field represents one dimension of a data type.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700476 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z
477 # axes) each field represents one dimension. Each data type field has a unique
478 # name which identifies it. The field also defines the format of the data (int,
479 # float, etc.).
Bu Sun Kim65020912020-05-20 12:08:20 -0700480 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700481 # This message is only instantiated in code and not used for wire comms or
482 # stored in any way.
483 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names
484 # are not namespaced, and only need to be unique within the data type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700485 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700486 &quot;optional&quot;: True or False,
487 },
488 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 },
490 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700491 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The
492 # identifier includes:&lt;br/&gt;&lt;br/&gt;
493 # &lt;ul&gt;
494 # &lt;li&gt;The physical device&#x27;s manufacturer, model, and serial number
495 # (UID).&lt;/li&gt;
496 # &lt;li&gt;The application&#x27;s package name or name. Package name is used when the
497 # data source was created by an Android application. The developer project
498 # number is used when the data source was created by a REST client.&lt;/li&gt;
499 # &lt;li&gt;The data source&#x27;s type.&lt;/li&gt;
500 # &lt;li&gt;The data source&#x27;s stream name.&lt;/li&gt;
501 # &lt;/ul&gt;
502 # Note that not all attributes of the data source are used as part of the
503 # stream identifier. In particular, the version of the hardware/the
504 # application isn&#x27;t used. This allows us to preserve the same stream through
505 # version updates. This also means that two DataSource objects may represent
506 # the same data stream even if they&#x27;re not equal.
507 #
508 # The exact format of the data stream ID created by an Android application
509 # is:
510 # &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;
511 #
512 # The exact format of the data stream ID created by a REST client is:
513 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:developer project
514 # number&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
515 #
516 # When any of the optional fields that make up the data stream ID are absent,
517 # they will be omitted from the data stream ID. The minimum viable data
518 # stream ID would be:
519 # type:dataType.name:developer project number
520 #
521 # Finally, the developer project number and device UID are obfuscated when
522 # read by any REST or Android client that did not create the data source.
523 # Only the data source creator will see the developer project number in clear
524 # and normal form. This means a client will see a different set of
525 # data_stream_ids than another client with different credentials.
526 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this
527 # data source produces raw or derived data.
528 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the
529 # platform, and is ignored in queries. It will be removed in a future version
530 # entirely.
531 &quot;A String&quot;,
532 ],
533 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among
534 # other data sources of the same type from the same underlying producer.
535 # Setting the stream name is optional, but should be done whenever an
536 # application exposes two streams for the same data type, or when a device
537 # has two equivalent sensors.
538 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
539 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
540 # identifier when created by Android applications, but cannot be specified
541 # by REST clients. REST clients will have their developer project number
542 # reflected into the Data Source data stream IDs, instead of the packageName.
543 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
544 # do not enforce uniqueness of this name. It is provided as a matter of
545 # convenience for other developers who would like to identify which REST
546 # created an Application or Data Source.
547 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
548 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
549 # application changes in a way that affects the computation of the data.
550 },
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.
587 &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
588 # can hold sensors.
589 # can hold sensors. Each sensor is exposed as a data source.
590 #
591 # The main purpose of the device information contained in this class is to
592 # identify the hardware of a particular data source. This can be useful in
593 # different ways, including:
594 # &lt;ul&gt;
595 # &lt;li&gt;Distinguishing two similar sensors on different devices (the step
596 # counter on two nexus 5 phones, for instance)
597 # &lt;li&gt;Display the source of data to the user (by using the device make /
598 # model)
599 # &lt;li&gt;Treat data differently depending on sensor type (accelerometers on a
600 # watch may give different patterns than those on a phone)
601 # &lt;li&gt;Build different analysis models for each device/version.
602 # &lt;/ul&gt;
603 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
604 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
605 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is
606 # obfuscated when read by any REST or Android client that did not create
607 # the data source. Only the data source creator will see the uid field in
608 # clear and normal form.
609 #
610 # The obfuscation preserves equality; that is, given two IDs, if id1 == id2,
611 # obfuscated(id1) == obfuscated(id2).
612 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
613 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700614 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700615 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by,
616 # inserted into, or queried from the Fitness API.
617 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the
618 # com.google namespace are shared as part of the platform.
Bu Sun Kim65020912020-05-20 12:08:20 -0700619 &quot;field&quot;: [ # A field represents one dimension of a data type.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700620 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z
621 # axes) each field represents one dimension. Each data type field has a unique
622 # name which identifies it. The field also defines the format of the data (int,
623 # float, etc.).
Bu Sun Kim65020912020-05-20 12:08:20 -0700624 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700625 # This message is only instantiated in code and not used for wire comms or
626 # stored in any way.
627 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names
628 # are not namespaced, and only need to be unique within the data type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700629 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700630 &quot;optional&quot;: True or False,
631 },
632 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700633 },
634 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700635 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The
636 # identifier includes:&lt;br/&gt;&lt;br/&gt;
637 # &lt;ul&gt;
638 # &lt;li&gt;The physical device&#x27;s manufacturer, model, and serial number
639 # (UID).&lt;/li&gt;
640 # &lt;li&gt;The application&#x27;s package name or name. Package name is used when the
641 # data source was created by an Android application. The developer project
642 # number is used when the data source was created by a REST client.&lt;/li&gt;
643 # &lt;li&gt;The data source&#x27;s type.&lt;/li&gt;
644 # &lt;li&gt;The data source&#x27;s stream name.&lt;/li&gt;
645 # &lt;/ul&gt;
646 # Note that not all attributes of the data source are used as part of the
647 # stream identifier. In particular, the version of the hardware/the
648 # application isn&#x27;t used. This allows us to preserve the same stream through
649 # version updates. This also means that two DataSource objects may represent
650 # the same data stream even if they&#x27;re not equal.
651 #
652 # The exact format of the data stream ID created by an Android application
653 # is:
654 # &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;
655 #
656 # The exact format of the data stream ID created by a REST client is:
657 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:developer project
658 # number&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
659 #
660 # When any of the optional fields that make up the data stream ID are absent,
661 # they will be omitted from the data stream ID. The minimum viable data
662 # stream ID would be:
663 # type:dataType.name:developer project number
664 #
665 # Finally, the developer project number and device UID are obfuscated when
666 # read by any REST or Android client that did not create the data source.
667 # Only the data source creator will see the developer project number in clear
668 # and normal form. This means a client will see a different set of
669 # data_stream_ids than another client with different credentials.
670 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this
671 # data source produces raw or derived data.
672 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the
673 # platform, and is ignored in queries. It will be removed in a future version
674 # entirely.
675 &quot;A String&quot;,
676 ],
677 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among
678 # other data sources of the same type from the same underlying producer.
679 # Setting the stream name is optional, but should be done whenever an
680 # application exposes two streams for the same data type, or when a device
681 # has two equivalent sensors.
682 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
683 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
684 # identifier when created by Android applications, but cannot be specified
685 # by REST clients. REST clients will have their developer project number
686 # reflected into the Data Source data stream IDs, instead of the packageName.
687 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
688 # do not enforce uniqueness of this name. It is provided as a matter of
689 # convenience for other developers who would like to identify which REST
690 # created an Application or Data Source.
691 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
692 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
693 # application changes in a way that affects the computation of the data.
694 },
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.
737 &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
738 # can hold sensors.
739 # can hold sensors. Each sensor is exposed as a data source.
740 #
741 # The main purpose of the device information contained in this class is to
742 # identify the hardware of a particular data source. This can be useful in
743 # different ways, including:
744 # &lt;ul&gt;
745 # &lt;li&gt;Distinguishing two similar sensors on different devices (the step
746 # counter on two nexus 5 phones, for instance)
747 # &lt;li&gt;Display the source of data to the user (by using the device make /
748 # model)
749 # &lt;li&gt;Treat data differently depending on sensor type (accelerometers on a
750 # watch may give different patterns than those on a phone)
751 # &lt;li&gt;Build different analysis models for each device/version.
752 # &lt;/ul&gt;
753 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
754 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
755 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is
756 # obfuscated when read by any REST or Android client that did not create
757 # the data source. Only the data source creator will see the uid field in
758 # clear and normal form.
759 #
760 # The obfuscation preserves equality; that is, given two IDs, if id1 == id2,
761 # obfuscated(id1) == obfuscated(id2).
762 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
763 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700764 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700765 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by,
766 # inserted into, or queried from the Fitness API.
767 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the
768 # com.google namespace are shared as part of the platform.
Bu Sun Kim65020912020-05-20 12:08:20 -0700769 &quot;field&quot;: [ # A field represents one dimension of a data type.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700770 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z
771 # axes) each field represents one dimension. Each data type field has a unique
772 # name which identifies it. The field also defines the format of the data (int,
773 # float, etc.).
Bu Sun Kim65020912020-05-20 12:08:20 -0700774 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700775 # This message is only instantiated in code and not used for wire comms or
776 # stored in any way.
777 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names
778 # are not namespaced, and only need to be unique within the data type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700779 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700780 &quot;optional&quot;: True or False,
781 },
782 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700783 },
784 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700785 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The
786 # identifier includes:&lt;br/&gt;&lt;br/&gt;
787 # &lt;ul&gt;
788 # &lt;li&gt;The physical device&#x27;s manufacturer, model, and serial number
789 # (UID).&lt;/li&gt;
790 # &lt;li&gt;The application&#x27;s package name or name. Package name is used when the
791 # data source was created by an Android application. The developer project
792 # number is used when the data source was created by a REST client.&lt;/li&gt;
793 # &lt;li&gt;The data source&#x27;s type.&lt;/li&gt;
794 # &lt;li&gt;The data source&#x27;s stream name.&lt;/li&gt;
795 # &lt;/ul&gt;
796 # Note that not all attributes of the data source are used as part of the
797 # stream identifier. In particular, the version of the hardware/the
798 # application isn&#x27;t used. This allows us to preserve the same stream through
799 # version updates. This also means that two DataSource objects may represent
800 # the same data stream even if they&#x27;re not equal.
801 #
802 # The exact format of the data stream ID created by an Android application
803 # is:
804 # &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;
805 #
806 # The exact format of the data stream ID created by a REST client is:
807 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:developer project
808 # number&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
809 #
810 # When any of the optional fields that make up the data stream ID are absent,
811 # they will be omitted from the data stream ID. The minimum viable data
812 # stream ID would be:
813 # type:dataType.name:developer project number
814 #
815 # Finally, the developer project number and device UID are obfuscated when
816 # read by any REST or Android client that did not create the data source.
817 # Only the data source creator will see the developer project number in clear
818 # and normal form. This means a client will see a different set of
819 # data_stream_ids than another client with different credentials.
820 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this
821 # data source produces raw or derived data.
822 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the
823 # platform, and is ignored in queries. It will be removed in a future version
824 # entirely.
825 &quot;A String&quot;,
826 ],
827 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among
828 # other data sources of the same type from the same underlying producer.
829 # Setting the stream name is optional, but should be done whenever an
830 # application exposes two streams for the same data type, or when a device
831 # has two equivalent sensors.
832 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
833 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
834 # identifier when created by Android applications, but cannot be specified
835 # by REST clients. REST clients will have their developer project number
836 # reflected into the Data Source data stream IDs, instead of the packageName.
837 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
838 # do not enforce uniqueness of this name. It is provided as a matter of
839 # convenience for other developers who would like to identify which REST
840 # created an Application or Data Source.
841 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
842 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
843 # application changes in a way that affects the computation of the data.
844 },
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.
883 &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
884 # can hold sensors.
885 # can hold sensors. Each sensor is exposed as a data source.
886 #
887 # The main purpose of the device information contained in this class is to
888 # identify the hardware of a particular data source. This can be useful in
889 # different ways, including:
890 # &lt;ul&gt;
891 # &lt;li&gt;Distinguishing two similar sensors on different devices (the step
892 # counter on two nexus 5 phones, for instance)
893 # &lt;li&gt;Display the source of data to the user (by using the device make /
894 # model)
895 # &lt;li&gt;Treat data differently depending on sensor type (accelerometers on a
896 # watch may give different patterns than those on a phone)
897 # &lt;li&gt;Build different analysis models for each device/version.
898 # &lt;/ul&gt;
899 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
900 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
901 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is
902 # obfuscated when read by any REST or Android client that did not create
903 # the data source. Only the data source creator will see the uid field in
904 # clear and normal form.
905 #
906 # The obfuscation preserves equality; that is, given two IDs, if id1 == id2,
907 # obfuscated(id1) == obfuscated(id2).
908 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
909 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
Craig Citroe633be12015-03-02 13:40:36 -0800910 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700911 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by,
912 # inserted into, or queried from the Fitness API.
913 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the
914 # com.google namespace are shared as part of the platform.
Bu Sun Kim65020912020-05-20 12:08:20 -0700915 &quot;field&quot;: [ # A field represents one dimension of a data type.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700916 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z
917 # axes) each field represents one dimension. Each data type field has a unique
918 # name which identifies it. The field also defines the format of the data (int,
919 # float, etc.).
Bu Sun Kim65020912020-05-20 12:08:20 -0700920 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700921 # This message is only instantiated in code and not used for wire comms or
922 # stored in any way.
923 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names
924 # are not namespaced, and only need to be unique within the data type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700925 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700926 &quot;optional&quot;: True or False,
927 },
928 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700929 },
930 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700931 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The
932 # identifier includes:&lt;br/&gt;&lt;br/&gt;
933 # &lt;ul&gt;
934 # &lt;li&gt;The physical device&#x27;s manufacturer, model, and serial number
935 # (UID).&lt;/li&gt;
936 # &lt;li&gt;The application&#x27;s package name or name. Package name is used when the
937 # data source was created by an Android application. The developer project
938 # number is used when the data source was created by a REST client.&lt;/li&gt;
939 # &lt;li&gt;The data source&#x27;s type.&lt;/li&gt;
940 # &lt;li&gt;The data source&#x27;s stream name.&lt;/li&gt;
941 # &lt;/ul&gt;
942 # Note that not all attributes of the data source are used as part of the
943 # stream identifier. In particular, the version of the hardware/the
944 # application isn&#x27;t used. This allows us to preserve the same stream through
945 # version updates. This also means that two DataSource objects may represent
946 # the same data stream even if they&#x27;re not equal.
947 #
948 # The exact format of the data stream ID created by an Android application
949 # is:
950 # &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;
951 #
952 # The exact format of the data stream ID created by a REST client is:
953 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:developer project
954 # number&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
955 #
956 # When any of the optional fields that make up the data stream ID are absent,
957 # they will be omitted from the data stream ID. The minimum viable data
958 # stream ID would be:
959 # type:dataType.name:developer project number
960 #
961 # Finally, the developer project number and device UID are obfuscated when
962 # read by any REST or Android client that did not create the data source.
963 # Only the data source creator will see the developer project number in clear
964 # and normal form. This means a client will see a different set of
965 # data_stream_ids than another client with different credentials.
966 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this
967 # data source produces raw or derived data.
968 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the
969 # platform, and is ignored in queries. It will be removed in a future version
970 # entirely.
971 &quot;A String&quot;,
972 ],
973 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among
974 # other data sources of the same type from the same underlying producer.
975 # Setting the stream name is optional, but should be done whenever an
976 # application exposes two streams for the same data type, or when a device
977 # has two equivalent sensors.
978 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
979 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
980 # identifier when created by Android applications, but cannot be specified
981 # by REST clients. REST clients will have their developer project number
982 # reflected into the Data Source data stream IDs, instead of the packageName.
983 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
984 # do not enforce uniqueness of this name. It is provided as a matter of
985 # convenience for other developers who would like to identify which REST
986 # created an Application or Data Source.
987 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
988 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
989 # application changes in a way that affects the computation of the data.
990 },
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.
1017 &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
1018 # can hold sensors.
1019 # can hold sensors. Each sensor is exposed as a data source.
1020 #
1021 # The main purpose of the device information contained in this class is to
1022 # identify the hardware of a particular data source. This can be useful in
1023 # different ways, including:
1024 # &lt;ul&gt;
1025 # &lt;li&gt;Distinguishing two similar sensors on different devices (the step
1026 # counter on two nexus 5 phones, for instance)
1027 # &lt;li&gt;Display the source of data to the user (by using the device make /
1028 # model)
1029 # &lt;li&gt;Treat data differently depending on sensor type (accelerometers on a
1030 # watch may give different patterns than those on a phone)
1031 # &lt;li&gt;Build different analysis models for each device/version.
1032 # &lt;/ul&gt;
1033 &quot;manufacturer&quot;: &quot;A String&quot;, # Manufacturer of the product/hardware.
1034 &quot;type&quot;: &quot;A String&quot;, # A constant representing the type of the device.
1035 &quot;uid&quot;: &quot;A String&quot;, # The serial number or other unique ID for the hardware. This field is
1036 # obfuscated when read by any REST or Android client that did not create
1037 # the data source. Only the data source creator will see the uid field in
1038 # clear and normal form.
1039 #
1040 # The obfuscation preserves equality; that is, given two IDs, if id1 == id2,
1041 # obfuscated(id1) == obfuscated(id2).
1042 &quot;model&quot;: &quot;A String&quot;, # End-user visible model name for the device.
1043 &quot;version&quot;: &quot;A String&quot;, # Version string for the device hardware/software.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001044 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001045 &quot;dataType&quot;: { # The data type defines the schema for a stream of data being collected by,
1046 # inserted into, or queried from the Fitness API.
1047 &quot;name&quot;: &quot;A String&quot;, # Each data type has a unique, namespaced, name. All data types in the
1048 # com.google namespace are shared as part of the platform.
Bu Sun Kim65020912020-05-20 12:08:20 -07001049 &quot;field&quot;: [ # A field represents one dimension of a data type.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001050 { # In case of multi-dimensional data (such as an accelerometer with x, y, and z
1051 # axes) each field represents one dimension. Each data type field has a unique
1052 # name which identifies it. The field also defines the format of the data (int,
1053 # float, etc.).
Bu Sun Kim65020912020-05-20 12:08:20 -07001054 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001055 # This message is only instantiated in code and not used for wire comms or
1056 # stored in any way.
1057 &quot;name&quot;: &quot;A String&quot;, # Defines the name and format of data. Unlike data type names, field names
1058 # are not namespaced, and only need to be unique within the data type.
Bu Sun Kim65020912020-05-20 12:08:20 -07001059 &quot;format&quot;: &quot;A String&quot;, # The different supported formats for each field in a data type.
Bu Sun Kim65020912020-05-20 12:08:20 -07001060 &quot;optional&quot;: True or False,
1061 },
1062 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001063 },
1064 &quot;name&quot;: &quot;A String&quot;, # An end-user visible name for this data source.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001065 &quot;dataStreamId&quot;: &quot;A String&quot;, # A unique identifier for the data stream produced by this data source. The
1066 # identifier includes:&lt;br/&gt;&lt;br/&gt;
1067 # &lt;ul&gt;
1068 # &lt;li&gt;The physical device&#x27;s manufacturer, model, and serial number
1069 # (UID).&lt;/li&gt;
1070 # &lt;li&gt;The application&#x27;s package name or name. Package name is used when the
1071 # data source was created by an Android application. The developer project
1072 # number is used when the data source was created by a REST client.&lt;/li&gt;
1073 # &lt;li&gt;The data source&#x27;s type.&lt;/li&gt;
1074 # &lt;li&gt;The data source&#x27;s stream name.&lt;/li&gt;
1075 # &lt;/ul&gt;
1076 # Note that not all attributes of the data source are used as part of the
1077 # stream identifier. In particular, the version of the hardware/the
1078 # application isn&#x27;t used. This allows us to preserve the same stream through
1079 # version updates. This also means that two DataSource objects may represent
1080 # the same data stream even if they&#x27;re not equal.
1081 #
1082 # The exact format of the data stream ID created by an Android application
1083 # is:
1084 # &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;
1085 #
1086 # The exact format of the data stream ID created by a REST client is:
1087 # &lt;var&gt;type:dataType.name&lt;wbr/&gt;:developer project
1088 # number&lt;wbr/&gt;:device.manufacturer&lt;wbr/&gt;:device.model:device.uid&lt;wbr/&gt;:dataStreamName&lt;/var&gt;
1089 #
1090 # When any of the optional fields that make up the data stream ID are absent,
1091 # they will be omitted from the data stream ID. The minimum viable data
1092 # stream ID would be:
1093 # type:dataType.name:developer project number
1094 #
1095 # Finally, the developer project number and device UID are obfuscated when
1096 # read by any REST or Android client that did not create the data source.
1097 # Only the data source creator will see the developer project number in clear
1098 # and normal form. This means a client will see a different set of
1099 # data_stream_ids than another client with different credentials.
1100 &quot;type&quot;: &quot;A String&quot;, # A constant describing the type of this data source. Indicates whether this
1101 # data source produces raw or derived data.
1102 &quot;dataQualityStandard&quot;: [ # DO NOT POPULATE THIS FIELD. It is never populated in responses from the
1103 # platform, and is ignored in queries. It will be removed in a future version
1104 # entirely.
1105 &quot;A String&quot;,
1106 ],
1107 &quot;dataStreamName&quot;: &quot;A String&quot;, # The stream name uniquely identifies this particular data source among
1108 # other data sources of the same type from the same underlying producer.
1109 # Setting the stream name is optional, but should be done whenever an
1110 # application exposes two streams for the same data type, or when a device
1111 # has two equivalent sensors.
1112 &quot;application&quot;: { # Information about an application which feeds sensor data into the platform.
1113 &quot;packageName&quot;: &quot;A String&quot;, # Package name for this application. This is used as a unique
1114 # identifier when created by Android applications, but cannot be specified
1115 # by REST clients. REST clients will have their developer project number
1116 # reflected into the Data Source data stream IDs, instead of the packageName.
1117 &quot;name&quot;: &quot;A String&quot;, # The name of this application. This is required for REST clients, but we
1118 # do not enforce uniqueness of this name. It is provided as a matter of
1119 # convenience for other developers who would like to identify which REST
1120 # created an Application or Data Source.
1121 &quot;detailsUrl&quot;: &quot;A String&quot;, # An optional URI that can be used to link back to the application.
1122 &quot;version&quot;: &quot;A String&quot;, # Version of the application. You should update this field whenever the
1123 # application changes in a way that affects the computation of the data.
1124 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001125 }</pre>
Craig Citroe633be12015-03-02 13:40:36 -08001126</div>
1127
1128</body></html>