aditya
01-16-2025Data Storage
Use dashboard API to get data in python dataframe
I have a widget which displays users with points and I want to fetch top 10 users from that widget.Also I need to select current month "01/2025" from the filter.Let me know how this can be done
But I'm getting weired error.Please help!
I'm an admin so I have a token from my profile section.
import requests
url = "https://bp.sisense.com/api/v1/dashboards/4577fc4415dd7d003339bfdc/widgets/4577c7716dd7d554441bjae"
# authentication
headers = {
"Content-Type": "application/json",
"Authorization": "" }
# Send the request
response = requests.get(url, headers=headers)
response
# Check if the request was successful
data = response.json()
data
Error:
{'error': {'code': 5002, 'message': 'Invalid token.', 'status': 401, 'httpMessage': 'unauthorized'}}