users_identity
Creates, updates, deletes, gets or lists a users_identity resource.
Overview
| Name | users_identity |
| Type | Resource |
| Id | google.health.users_identity |
Fields
The following fields are returned by SELECT queries:
- get_identity
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The resource name of this Identity resource. Format: users/me/identity |
healthUserId | string | Output only. The Google User Identifier in the Google Health APIs. It matches the {user} resource ID segment in the resource name paths, e.g. users/{user}/dataTypes/steps. Valid values are strings of 1-63 characters, and valid characters are lowercase and uppercase letters, numbers, and hyphens. |
legacyUserId | string | Output only. The legacy Fitbit User identifier. This is the Fitbit ID used in the legacy Fitbit APIs (v1-v3). It can be referenced by clients migrating from the legacy Fitbit APIs to map their existing identifiers to the new Google user ID. It must not be used for any other purpose. It is not of any use for new clients using only the Google Health APIs. Valid values are strings of 1-63 characters, and valid characters are lowercase and uppercase letters, numbers, and hyphens. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_identity | select | usersId | Gets the user's identity. It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems. |
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 |
SELECT examples
- get_identity
Gets the user's identity. It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.
SELECT
name,
healthUserId,
legacyUserId
FROM google.health.users_identity
WHERE usersId = '{{ usersId }}' -- required
;