Is a 503 response expected when requesting the flo...
# prefect-cloud
j
Is a 503 response expected when requesting the flow_runs/history endpoint without including a filter?
Copy code
import httpx
import json

api_key = ""
account_id = ""
workspace_id = ""
headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json",
}
url = f"<https://api.prefect.cloud/api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/history>"
body = {
    "history_start": "2024-06-01T00:00:00Z",
    "history_end": "2024-06-02T00:00:00Z",
    "history_interval_seconds": 60,
}

with httpx.Client(timeout=10, headers=headers) as client:
    response = <http://client.post|client.post>(url, data=json.dumps(body))

response
# <Response [503 Service Unavailable]>
Adding, for example, a deployment filter returns an expected 200. Also, changing the history_interval_seconds to 3600*24 returns an expected 200. Perhaps it is the appropriate response, just caught me off guard this morning.
s
Thanks, Jeremy for the MRE! I was unable to reproduce this as it returned a 200 for me 🤔 If you want to send more details via DM, I can look into it more.