Users.dataSources: list
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Wyświetla listę wszystkich źródeł danych widocznych dla dewelopera za pomocą protokołu OAuth
dostępnych zakresów. Ta lista nie jest wyczerpująca. użytkownik może mieć prywatny
źródeł danych, które są widoczne tylko dla innych deweloperów, lub połączeń korzystających z
w innych zakresach.
Wypróbuj
Żądanie
Żądanie HTTP
GET https://www.googleapis.com/fitness/v1/users/userId/dataSources
Parametry
Nazwa parametru |
Wartość |
Opis |
Parametry ścieżki |
userId |
string |
Wymień źródła danych zidentyfikowanej osoby. me – do
wskazują uwierzytelnionego użytkownika. Obecnie obsługiwana jest tylko wartość me
obecnie się znajdujesz.
|
Opcjonalne parametry zapytania |
dataTypeName |
string |
Nazwy typów danych do uwzględnienia na liście. Jeśli nie podasz żadnej wartości, wszystkie
.
|
Autoryzacja
To żądanie wymaga autoryzacji z co najmniej jednym z tych zakresów:
Zakres |
https://www.googleapis.com/auth/fitness.activity.read |
https://www.googleapis.com/auth/fitness.activity.write |
https://www.googleapis.com/auth/fitness.location.read |
https://www.googleapis.com/auth/fitness.location.write |
https://www.googleapis.com/auth/fitness.body.read |
https://www.googleapis.com/auth/fitness.body.write |
https://www.googleapis.com/auth/fitness.nutrition.read |
https://www.googleapis.com/auth/fitness.nutrition.write |
https://www.googleapis.com/auth/fitness.blood_pressure.read |
https://www.googleapis.com/auth/fitness.blood_pressure.write |
https://www.googleapis.com/auth/fitness.blood_glucose.read |
https://www.googleapis.com/auth/fitness.blood_glucose.write |
https://www.googleapis.com/auth/fitness.oxygen_saturation.read |
https://www.googleapis.com/auth/fitness.oxygen_saturation.write |
https://www.googleapis.com/auth/fitness.body_temperature.read |
https://www.googleapis.com/auth/fitness.body_temperature.write |
https://www.googleapis.com/auth/fitness.reproductive_health.read |
https://www.googleapis.com/auth/fitness.reproductive_health.write |
Więcej informacji znajdziesz na stronie dotyczącej uwierzytelniania i autoryzacji.
Treść żądania
Nie podawaj treści żądania przy użyciu tej metody.
Odpowiedź
Jeśli operacja się uda, metoda zwróci odpowiedź o następującej strukturze:
{
"dataSource": [
users.dataSources Resource
]
}
Nazwa usługi |
Wartość |
Opis |
Uwagi |
dataSource[] |
list |
Utworzone wcześniej źródło danych. |
|
Wypróbuj
Użyj poniższego eksploratora interfejsów API, aby wywołać tę metodę na bieżących danych i wyświetlić odpowiedź.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-25 UTC."],[[["\u003cp\u003eLists all visible data sources for a user, including those accessible with provided OAuth scopes.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with at least one of the listed scopes related to fitness data (activity, location, body, nutrition, etc.).\u003c/p\u003e\n"],["\u003cp\u003eReturns a list of data sources accessible to the developer for the specified user, which can be filtered by data type.\u003c/p\u003e\n"],["\u003cp\u003eThe request is made using an HTTP GET to a specific endpoint, with the user ID specified as 'me' for the authenticated user.\u003c/p\u003e\n"]]],[],null,["# Users.dataSources: list\n\n| **Note:** Requires [authorization](#auth).\n\nLists all data sources that are visible to the developer, using the OAuth\nscopes provided. The list is not exhaustive; the user may have private\ndata sources that are only visible to other developers, or calls using\nother scopes.\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP request\n\n```\nGET https://www.googleapis.com/fitness/v1/users/userId/dataSources\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|----------|--------------------------------------------------------------------------------------------------------------------------------|\n| **Path parameters** |||\n| `userId` | `string` | List data sources for the person identified. Use `me` to indicate the authenticated user. Only `me` is supported at this time. |\n| **Optional query parameters** |||\n| `dataTypeName` | `string` | The names of data types to include in the list. If not specified, all data sources will be returned. |\n\n### Authorization\n\nThis request requires authorization with at least one of the following scopes:\n\n| Scope |\n|---------------------------------------------------------------------|\n| `https://www.googleapis.com/auth/fitness.activity.read` |\n| `https://www.googleapis.com/auth/fitness.activity.write` |\n| `https://www.googleapis.com/auth/fitness.location.read` |\n| `https://www.googleapis.com/auth/fitness.location.write` |\n| `https://www.googleapis.com/auth/fitness.body.read` |\n| `https://www.googleapis.com/auth/fitness.body.write` |\n| `https://www.googleapis.com/auth/fitness.nutrition.read` |\n| `https://www.googleapis.com/auth/fitness.nutrition.write` |\n| `https://www.googleapis.com/auth/fitness.blood_pressure.read` |\n| `https://www.googleapis.com/auth/fitness.blood_pressure.write` |\n| `https://www.googleapis.com/auth/fitness.blood_glucose.read` |\n| `https://www.googleapis.com/auth/fitness.blood_glucose.write` |\n| `https://www.googleapis.com/auth/fitness.oxygen_saturation.read` |\n| `https://www.googleapis.com/auth/fitness.oxygen_saturation.write` |\n| `https://www.googleapis.com/auth/fitness.body_temperature.read` |\n| `https://www.googleapis.com/auth/fitness.body_temperature.write` |\n| `https://www.googleapis.com/auth/fitness.reproductive_health.read` |\n| `https://www.googleapis.com/auth/fitness.reproductive_health.write` |\n\nFor more information, see the [authentication and authorization](/fit/rest/v1/authorization) page.\n\n### Request body\n\nDo not supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n```text\n{\n \"dataSource\": [\n users.dataSources Resource\n ]\n}\n```\n\n| Property name | Value | Description | Notes |\n|----------------|--------|-----------------------------------|-------|\n| `dataSource[]` | `list` | A previously created data source. | |\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response."]]