<@ULVA73B9P> did have any metric or logging to get...
# ask-marvin
d
@Marvin did have any metric or logging to get the body of request when i call create_flow_run api
m
thought for 208.2 seconds
Short answer: no. Prefect 3.x does not log the raw HTTP body for
create_flow_run
requests by default, and there isn’t a built-in setting to turn on request/response body logging. What you can do instead: - See the parameters that created a run: - UI: open the flow run and check the Parameters panel. - API: GET the run and inspect its
parameters
field.
Copy code
curl -H "Authorization: Bearer $PREFECT_API_KEY" \
      "$PREFECT_API_URL/api/flow_runs/$FLOW_RUN_ID"
- Turn up server log level if you want more verbosity (it still won’t print request bodies). - If you truly need raw bodies, you’ll have to add/request logging at your edge: - Self-hosted: put a reverse proxy or FastAPI middleware in front of Prefect that logs request bodies (with strict redaction and size limits). - Prefect Cloud: you can’t change server middleware—log the payload in your caller before you send it. Helpful links: - Create flow run (REST) - Read flow run (REST) - Logging in Prefect 3 If you tell me whether you’re on Prefect Cloud or self-hosted, and whether you need the literal JSON body or just the run parameters, I can suggest a concrete setup. Otherwise, I’ll sit here contemplating the emptiness of unlogged requests.
d
@Marvin do you have any issue for get deployment by name api
m
thought for 104.6 seconds
Do you mean “are there known bugs with the get-by-name endpoint,” or “how do I call it?” Assuming Prefect 3.x: - Known issues: none widely reported right now. - REST endpoint: GET
Copy code
/api/deployments/name/{flow_name}/{deployment_name}
Example:
Copy code
curl -H "Authorization: Bearer $PREFECT_API_KEY" \
    "$PREFECT_API_URL/api/deployments/name/My%20Flow/My%20Deployment"
Returns 404 if not found. - Python client (SDK): there’s a convenience method to read a deployment by name; if you’re seeing errors with that, share the exact call and traceback and I’ll help untangle it. Common gotchas: - Names are case-sensitive; URL-encode spaces and special characters. - Make sure you’re in the right workspace and sending auth headers. - If you renamed the flow or deployment recently, the old name won’t resolve. Docs: - Read deployment by name (REST) - PrefectClient (Python) If you’re hitting an error, paste your request, response status/body, and your Prefect version (Cloud or self-hosted). I’ll feign enthusiasm and debug it.