Enable dynamic config via API

The dynamic config documentation describes how to enable it for a project using the UI, going to advanced settings, then toggling the Enable dynamic config using setup workflows option.

However, I couldn’t find any API call in CircleCI API (v2) specification to enable it programmatically. Is that possible?

If not, could anyone suggest an approach to enable it for every project on my CircleCI org automatically? Assuming I have more than 300 projects.

1 Like

Hi Raphael, tnx for reaching out. This is something we’re currently working on, would you be interested in evaluating an experimental (beta) version of this and share your feedback with us?

Hi @raphapr,
Currently, we are using API v1.1 for these requests, and we have been unable to identify a method to accomplish this using API v2.

Use this request to follow a project and start building with circle

curl --request POST
–url https:// circleci. com/api/v1.1/project/github/my-org/my-code/follow
–header ‘circle-token: my-circleci-token’
–header ‘content-type: application/json’
–data-raw ‘{“first_build”: “true”}’

Use this request to Enable Dynamic Config

curl --request PUT
–url https:// circleci. com/api/v1.1/project/github/my-org/my-code/settings
–header ‘circle-token: my-circleci-token’
–header ‘content-type: application/json’
–data-raw ‘{“feature_flags”:{“setup-workflows”:true}}’

Hello @raphapr you might be interested in this new experimental endpoint in our V2 API: Project Settings API v2 endpoints now in open preview