REST API for managing environments

I can’t seem to find information on a REST API for working with the new GitHub Actions Environments. Can they be managed by an API?

Ref: GitHub Actions: Environments, environment protection rules and environment secrets (beta) - GitHub Changelog

1 Like

The API was not quite ready and that is part of the reason the feature is in Beta. We are working on the API and expect to publish the docs soon.

1 Like

Hi @chrispat is there an open preview to an environments API? I don’t see anything on the GitHub public roadmap suggesting an upcoming feature to address this. Without this capability, the migration of our on-prem repos is made more difficult because of the configuration-by-click we’ll have to do.

hey @hartman-michael-PFG I’m very interested in this. I was playing with the deployments API today (octokit nodejs) and found createDeployment if you pass an environment that doesn’t exist it is created. this surprised me but very useful! however there is no way to delete an environment programmatically (that I know of) this is fine for my use case. nothing in the docs of course. try it out.

Hi, I wanted to follow up on this. I came across Using environments for deployment - GitHub Docs which has a link at the bottom to Repositories - GitHub Docs but the repos API appears to have never been updated with information on environments.

Is there an update on when this API would be available? Or am I looking in the wrong place? Thank you.

I guess the API is documented here

1 Like