Aleksandr Liadov
01/19/2023, 4:41 PM'{"exception_message":"Invalid request received.","exception_detail":[{"loc":["body","name"],"msg":"extra fields not permitted","type":"value_error.extra"}],"request_body":{"name":"d3f199ee-8bd5-4fbf-9424-a9a7f39c9d3b"}}'
Request in threadprefect_cloud_url = "<https://api.prefect.cloud/api/accounts/59a5b0f5-ba8e-4872-b5fe-5f528372e5a1/workspaces/e5f460f4-9eab-441a-b280-d78c05b6fc97>"
# "https: // api.prefect.cloud / api / accounts / {account_id} / workspaces / {workspace_id} / flows / {id}"
flow_id = str(prefect.context.get_run_context().flow_run.dict()["id"])
response = requests.patch(
f"{prefect_cloud_url}/flows/{flow_id}",
headers={
"Content-Type": "application/json",
"Authorization": f"Bearer My_super_secret_api_key",
},
data=json.dumps({"name": new_name}),
allow_redirects=False,
)
{
"detail": "Flow not found"
}
How It could be possible?