Skip to main content

users_profile

Creates, updates, deletes, gets or lists a users_profile resource.

Overview

Nameusers_profile
TypeResource
Idgoogle.health.users_profile

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. 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.
ageinteger (int32)Optional. The age in years based on the user's birth date. Updates to this field are currently not supported.
autoRunningStrideLengthMminteger (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
autoWalkingStrideLengthMminteger (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
membershipStartDateobjectOutput only. The date the user created their account. Updates to this field are currently not supported. (id: Date)
userConfiguredRunningStrideLengthMminteger (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
userConfiguredWalkingStrideLengthMminteger (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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_profileselectusersIdReturns user Profile details.
update_profileupdateusersIdupdateMaskUpdates 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.

NameDatatypeDescription
usersIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Returns user Profile details.

SELECT
name,
age,
autoRunningStrideLengthMm,
autoWalkingStrideLengthMm,
membershipStartDate,
userConfiguredRunningStrideLengthMm,
userConfiguredWalkingStrideLengthMm
FROM google.health.users_profile
WHERE usersId = '{{ usersId }}' -- required
;

UPDATE examples

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;