Rails endpoints to update workflow status
What does this MR do and why?
This MR adds an endpoint which will be used to mark a workflow as failed or finished.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Example below:
- Enable feature flag
duo_workflow - Create a workflow
curl POST --verbose \ --header "Authorization: Bearer [YOUR_TOKEN]" \ --header 'Content-Type: application/json' \ --data '{ "project_id": "[namespace/project]" }' \ http://gdk.test:3000/api/v4/ai/duo_workflows/workflows - Get the
idfrom the returnedjson - Make a request to mark the workflow as failed
curl --request PATCH --verbose \ --header "Authorization: Bearer [YOUR_TOKEN]" \ --header 'Content-Type: application/json' \ --data '{"status_event": "drop"}' \ http://gdk.test:3000/api/v4/ai/duo_workflows/workflows/[id from above] - You should receive a success response. The
statusin the json body should be 4 (enum for failed)
Closes #482003 (closed)
Edited by Halil Coban