Closed joschrew closed 2 years ago
not totally correct what I wrote. I think implementation and api-description have both to be changed
Agree that the API description should be changed. POST /workflow/{workflow-id}
(reference) should get an additional parameter workspace_id
. What should be changed in the implementation part?
I see two suitable options
POST workflow/{workflow-id}/{workspace-id}
, so that workspace-id is provided in the request-pathI created a Pull Request to extend the api. If this is accepted the method signature of the start_workflow Method should look like this:
async def start_workflow(workflow_id: str, workspace_id: str = Body(), parameters: dict = Body()):
(alternatively, maybe better: https://fastapi.tiangolo.com/tutorial/body/)
A curl request would be like this:
curl -X 'POST' 'http://localhost:8000/workflow/the-workflow-id' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{ "workspace_id": "test", "parameters": { "test": 10 }}'
closed because mentioned pull request was merged a while a go and functionality is implemented
change/think about execute workflow endpoint. currently the workspace_id is provided as query-parameter. This is working, but this is not described in the api description. So either one has to be changed, api-description or implementation