Using a local config file on triggering a new pipeline with API V2

Hello,

Is it possible to use a local config file for triggering a new pipeline with API V2
curl -X POST https://circleci.com/api/v2/project/{project-slug}/pipeline
?

Similar functionality was implemented in V1.1 by passing
–form config=@config.yml

Hi there!

There is not a similar feature in the v2 API that allows the passing in of a local config value. I can see how that might be useful, but there might be some alternatives in the v2 API that might be able solve the issue in a different way.

For example, if you are hoping to validate your config without consuming credits, you can do so by using the CircleCI CLI and running circleci config validate.

Or you can trigger a pipeline by passing pipeline parameters with the V2 API. Here is a link to a great article with some example snippets.

If you wanted to share a bit more about your use-case, we would be happy to help with a different approach.