Dekel R
05/04/2023, 3:49 PMcurl --location --request POST '<https://api.prefect.cloud/api/accounts/0aceff1b-4fdb-4469-adde-197148a98672/workspaces/b7474c31-4033-449b-96b6-f3544e6f9408/flow_runs/>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer api_key' \
--header 'X-PREFECT-API-VERSION: 0.8.4' \
--data-raw '{
"name": "testing_api_1",
"flow_id": "46a211a5-a943-4547-8b4d-8e3c09da68d2",
"deployment_id": "8507e60e-0a93-43c0-81ba-bd050f0ecd53", "infrastructure_document_id": "5ed25162-53fb-4df5-89bc-426afdc83f41", "state": {"type": "SCHEDULED"}
}'
I looked here https://app.prefect.cloud/api/docs#tag/Flow-Runs - create flow run - but I don’t see any queue and pool params.
ThanksZanie
05/04/2023, 4:00 PMDekel R
05/04/2023, 4:05 PMZanie
05/04/2023, 4:12 PM<https://api.prefect.cloud/api/accounts/{account_id}/workspaces/{workspace_id}/deployments/{id}/create_flow_run>
deployment_id
in FlowRunCreate
? It seems like it should not be allowed to avoid this confusion.Zach Angell
05/04/2023, 4:17 PMcreate_flow_run
endpoint for deploymentsDekel R
05/04/2023, 4:25 PMcurl --location --request POST '<https://api.prefect.cloud/api/accounts/0aceff1b-4fdb-4469-adde-197148a98672/workspaces/b7474c31-4033-449b-96b6-f3544e6f9408/deployments/8507e60e-0a93-43c0-81ba-bd050f0ecd53/create_flow_run>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer api_key' \
--header 'X-PREFECT-API-VERSION: 0.8.4' \
--data-raw '{
"name": "testing_api_1",
"infrastructure_document_id": "5ed25162-53fb-4df5-89bc-426afdc83f41", "state": {"type": "SCHEDULED"}
}'
Thanks for the help!!
If you can please offer some more examples for curl or even Python Prefect 2 api usages this could help a lot, I couldn’t find anything in this group/in the forums.Zanie
05/04/2023, 4:34 PMJeff Hale
05/20/2023, 4:35 PM