https://prefect.io logo
o

owolabi akintan

09/12/2023, 11:18 AM
def get_all_flow_deployment(): PREFECT_API_URL = "https://app.prefect.cloud/accounts/*****************/workspaces/*******************/deployments/873668bf-3b09-4b99-b7a4-57c479ec5d27" PREFECT_API_KEY="***************" headers = { "Content-Type": "application/json", "Authorization": f"Bearer {PREFECT_API_KEY}" } response = requests.get(url=PREFECT_API_URL,headers=headers) if response.status_code == 200: print(response.json()) else: print("no data ") hello community am getting this error when trying to fetch my deployment detail am get this error from all the api endpoint raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0) pls i really need help with this its urgent
👀 1
j

Jack P

09/12/2023, 11:39 AM
weird, it works for me as is (plugged in my env vars though). Could you print
response.text
by chance? And just redact any sensitive info if it shows
oh i see
Copy code
<https://app.prefect.cloud/accounts/*****************/workspaces/*******************/deployments/873668bf-3b09-4b99-b7a4-57c479ec5d27>
needs to be
Copy code
<https://api.prefect.cloud/accounts/*****************/workspaces/*******************/deployments/873668bf-3b09-4b99-b7a4-57c479ec5d27>
app
=>
api
in beginning, does that fix it?