CircleCI Ideas

Approve workflows via API

Right before we hit the approval step in our workflow, we ping Slack with a link to the workflow so that someone can go into CircleCI to approve. We’d love it if we could respond to our chatops bot and it could approve the job without us having to leave Slack. However, there doesn’t seem to be a public API that exposes the functionality of clicking on the Approve button.

  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Mar 13 2018
  • On roadmap
API
  • Attach files
  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    March 26, 2018 16:54

    This is a much needed feature, we really need this functionality in the API as well.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    May 04, 2018 20:05

    It would also be useful if there was a way to prevent users from approving, and only having an API call be able to approve. We'd like to implement some workflows that have an API approval in them, but don't want users to also be able to go in to approve something manually.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    November 03, 2018 12:59

    1. When triggering a job, the workspace context is not available. we can use persist_to_workspace, attach_workspace to share context information between jobs, but this is not possible when using current API.

    2. The workflow steps are broken. Once a approval job is trigger (which later triggers another job through API call), subsequent jobs cannot be configured which restricts us to having approvals as the only last step in workflow.
    We would be able to do Job1->Approve->job2 with context of job2-->approve-->3rd job with the context of job3.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    30 Jan 18:04

    Any update on this? Looking forward to this one, combined with CCI-I-352

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    26 May 08:57

    any update on this?