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.

  • Andrew Haines
  • Mar 13 2018
  • Shipped
API
  • Attach files
  • Admin
    Alexey Klochay commented
    12 May 14:30

    Thanks everyone for your feedback! The job approval endpoint is now available:

    https://circleci.com/changelog/#new-api-v2-job-approval-endpoint

  • dokig e commented
    07 Jan 15:26

    What is the timeline that "On roadmap" represents? quarters/years/centuries?

  • Nathan Evans commented
    October 31, 2019 13:49

    What is the timeline that "On roadmap" represents? Weeks/months/quarters?

  • Jiteshkumar Sojitra commented
    September 07, 2019 04:39

    Any update on this? We desperately need this API for handling big workflow!

  • Nathan Evans commented
    August 07, 2019 16:06

    Same, this is desperately needed

  • Nadeem Shabir commented
    July 11, 2019 07:46

    I think this would be a good idea too.

     

    For the person who raised the ticket, how are you pinging the workflow into slack?

  • Dan Ofir commented
    May 26, 2019 08:57

    any update on this? 

  • Dana Cleveland commented
    January 30, 2019 18:04

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

  • Saj Janin 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.

  • Martin Smith 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.

  • Matt Brutsche commented
    March 26, 2018 16:54

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