How do I write a GET request for an API using Power BI and python?
- User
How do I write a GET request for an API using Power BI and python?
- Assistant
You can use the requests library to make HTTP GET requests from Python. It would look something like this: import requests
response = requests.get('https://example.com/api/ endpoint')
Then, in Power BI, you would:
Install the Python visual Add a Python script visual to your report Paste in the code above (editing the URL as needed) Select the response variable to output from the visual
This will make the GET request when the report is refreshed, and show you the response data in the visual. So the key steps are:
Use requests to make the GET call in Python Output the response data from the Python script Display the data in the Python visual
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →