Users.dataSources: list
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Elenca tutte le origini dati visibili allo sviluppatore, utilizzando il protocollo OAuth
gli ambiti forniti. L'elenco non è completo; l'utente potrebbe avere delle informazioni
origini dati visibili soltanto ad altri sviluppatori oppure chiamate tramite
altri ambiti.
Prova subito.
Richiesta
Richiesta HTTP
GET https://www.googleapis.com/fitness/v1/users/userId/dataSources
Parametri
Nome del parametro |
Valore |
Descrizione |
Parametri percorso |
userId |
string |
Elenca le origini dati per la persona identificata. Usa me per
indicare l'utente autenticato. Al momento è supportato solo me
nel tempo.
|
Parametri di query facoltativi |
dataTypeName |
string |
I nomi dei tipi di dati da includere nell'elenco. Se non specificato, tutti
le origini dati.
|
Autorizzazione
Questa richiesta richiede l'autorizzazione con almeno uno dei seguenti ambiti:
Ambito |
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 |
Per ulteriori informazioni, consulta la pagina Autenticazione e autorizzazione.
Corpo della richiesta
Non fornire un corpo della richiesta con questo metodo.
Risposta
In caso di esito positivo, questo metodo restituisce un corpo della risposta con la seguente struttura:
{
"dataSource": [
users.dataSources Resource
]
}
Nome proprietà |
Valore |
Descrizione |
Note |
dataSource[] |
list |
Un'origine dati creata in precedenza. |
|
Prova
Usa Explorer API in basso per chiamare questo metodo sui dati in tempo reale e visualizzare la risposta.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 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."]]