How to read the data from tables in wdata using API's in python?
Con risposta-
Hi Mukthiyar, the Wdata API developers documentation located at https://developers.workiva.com/workiva-wdata/reference contains code examples for Python in the right hand blue column. For example, the following sample code is for downloading a file from a Wdata Table.
import requests headers = { 'Accept': '*/*', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/download', headers = headers) print(r.json())
Further details on the particular request can be found here https://developers.workiva.com/workiva-wdata/reference#wdata-downloadfileusingget.
0Hi Jeff, I am getting the metadata of the table.. I am not getting the data in the table..
headers = {
'Accept': '*/*',
'Authorization': 'Bearer {access-token}'
}r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/table/{table_id}', headers = headers).
0You are using the Retrieve a single table endpoint which returns information about the table. To get data from a table, you need to specify the file ID that the data is in and use the endpoint in my previous post. You could also build a Query and run it to pull data from a table. See the example workflow Querying table data for more information.
0Accedi per aggiungere un commento.
Commenti
3 commenti