Users.dataSources: list
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Listet alle Datenquellen auf, die für den Entwickler mithilfe der OAuth-
Bereiche angegeben. Die Liste ist nicht vollständig. kann der Nutzer private
Datenquellen, die nur für andere Entwickler sichtbar sind, oder Aufrufe über
andere Umfänge.
Jetzt testen
Anfrage
HTTP-Anfrage
GET https://www.googleapis.com/fitness/v1/users/userId/dataSources
Parameter
Parametername |
Wert |
Beschreibung |
Pfadparameter |
userId |
string |
Listen Sie die Datenquellen für die angegebene Person auf. me für Folgendes verwenden:
den authentifizierten Nutzer an. Derzeit wird nur me unterstützt
.
|
Optionale Abfrageparameter |
dataTypeName |
string |
Die Namen der Datentypen, die in die Liste aufgenommen werden sollen. Wenn nicht angegeben, werden alle
Datenquellen zurückgegeben werden.
|
Autorisierung
Für diese Anfrage ist eine Autorisierung in mindestens einem der folgenden Bereiche erforderlich:
Umfang |
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 |
Weitere Informationen finden Sie auf der Seite Authentifizierung und Autorisierung.
Anfragetext
Mit dieser Methode keinen Anfragetext bereitstellen.
Antwort
Bei Erfolg gibt diese Methode einen Antworttext mit der folgenden Struktur zurück:
{
"dataSource": [
users.dataSources Resource
]
}
Name der Eigenschaft |
Wert |
Beschreibung |
Hinweise |
dataSource[] |
list |
Eine zuvor erstellte Datenquelle. |
|
Testen!
Verwenden Sie den unten angegebenen APIs Explorer, um diese Methode für Livedaten aufzurufen und die Antwort einzusehen.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-25 (UTC).
[null,null,["Zuletzt aktualisiert: 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."]]