users_profile
Creates, updates, deletes, gets or lists a users_profile resource.
Overview
| Name | users_profile |
| Type | Resource |
| Id | google.health.users_profile |
Fields
The following fields are returned by SELECT queries:
- get_profile
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The resource name of this Profile resource. Format: users/{user}/profile Example: users/1234567890/profile or users/me/profile The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal me can also be used to refer to the authenticated user. |
age | integer (int32) | Optional. The age in years based on the user's birth date. Updates to this field are currently not supported. |
autoRunningStrideLengthMm | integer (int32) | Output only. The automatically calculated running stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly - https://www.googleapis.com/auth/googlehealth.activity_and_fitness |
autoWalkingStrideLengthMm | integer (int32) | Output only. The automatically calculated walking stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly - https://www.googleapis.com/auth/googlehealth.activity_and_fitness |
membershipStartDate | object | Output only. The date the user created their account. Updates to this field are currently not supported. (id: Date) |
userConfiguredRunningStrideLengthMm | integer (int32) | Optional. The user's user configured running stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly - https://www.googleapis.com/auth/googlehealth.activity_and_fitness |
userConfiguredWalkingStrideLengthMm | integer (int32) | Optional. The user's user configured walking stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly - https://www.googleapis.com/auth/googlehealth.activity_and_fitness |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_profile | select | usersId | Returns user Profile details. | |
update_profile | update | usersId | updateMask | Updates the user's profile details. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
usersId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get_profile
Returns user Profile details.
SELECT
name,
age,
autoRunningStrideLengthMm,
autoWalkingStrideLengthMm,
membershipStartDate,
userConfiguredRunningStrideLengthMm,
userConfiguredWalkingStrideLengthMm
FROM google.health.users_profile
WHERE usersId = '{{ usersId }}' -- required
;
UPDATE examples
- update_profile
Updates the user's profile details.
UPDATE google.health.users_profile
SET
data__userConfiguredWalkingStrideLengthMm = {{ userConfiguredWalkingStrideLengthMm }},
data__age = {{ age }},
data__name = '{{ name }}',
data__userConfiguredRunningStrideLengthMm = {{ userConfiguredRunningStrideLengthMm }}
WHERE
usersId = '{{ usersId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
age,
autoRunningStrideLengthMm,
autoWalkingStrideLengthMm,
membershipStartDate,
userConfiguredRunningStrideLengthMm,
userConfiguredWalkingStrideLengthMm;