I have data in a database within Metabase than I am looking to extract through their API.
https://www.metabase.com/learn/administration/metabase-api
As suggested I am using the code below to access it:
import requests
import pandas as pd
response = requests.post('http://localhost:3000/api/session',
json={'username': '*********',
'password': '*******'})
session_id = response.json()['id']
headers = {'X-Metabase-Session': session_id}
However, I cannot get through the localhost getting the error
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
and
HTTPConnectionPool(host='localhost', port=3000): Max retries exceeded with url: /api/session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002310642FE80>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
How do I resolve this?