Setting Project API Features

Overview

The teams at CircleCI have heard feedback across several channels regarding Project Features that require opening a support request to make changes.

To empower our userbase, we have started the process of releasing previously private endpoints for users to leverage the ability to configure these features without requiring help from a Support Engineer. 

 

Available Features

Feature Description
disable-ssh Disable SSH capability for any future builds on this project
write-settings-requires-admin Only admins will be allowed to modify(write permissions) project settings
build-prs-only Enable the Only Build PRs toggle seen in the Advanced Settings of a project

 

Note: These feature flags are only at the Project Level and default to false

 

Using the API to toggle these features

To toggle these features, please use the following cURL command:

curl -X PUT \
--header
"Circle-Token: <token>" \
--header
"Accept: application/json" \
--header
"Content-Type: application/json" \
--data
'{"feature_flags":{"disable-ssh": true, "write-settings-requires-admin": true}}' 'https://circleci.com/api/v1.1/project/vcs-type/org-slug/project-slug/settings'
  • For the project URL under the --data payload, replace vcs-type/org-slug/project-slug with the project that you wish to apply these feature flags to.
  • Replace the <token> with a Personal API Token.
    • This can also be authenticated using Basic authentication after encoding your Personal API Token
  • The expected response from our API for a successful application of these feature flags is ""%

Please share any feedback with your account team or with the Support Engineering team here at CircleCI!

 

Additional Resources:

 

Was this article helpful?
1 out of 2 found this helpful

Comments

0 comments

Article is closed for comments.