We are using the API below to trigger the pipeline. Is it possible to get the parameters that we passed?
curl -X POST --header "Content-Type: application/json" --header "Circle-Token: $CIRCLE_TOKEN" -d '{
"parameters": {
"myparam": "./myspecialdir",
"myspecialversion": "4.8.2"
}
}' https://circleci.com/api/v2/project/{project_slug}/pipeline
See Pipeline values and parameters - CircleCI
I believe you should be able to use, e.g., << pipeline.parameters.myparam >>
for the example above
thank you for your response. I am trying to retrieve the same data through the REST API not in the YAML files.
The parameters you are interested in are right there in your POST request. Please clarify your question. Have you tried a GET request for pipeline values? CircleCI API
Edit:
This does not seem possible at this time. Perhaps there has been a change since these topics:
When I trigger a new pipeline with API v2. How do I see the pipeline parameters passed from triggering code in the CircleCI Workflow UI?
Hi @jefflemos-ezy , here you can find the currently supported trigger parameters for all different types of projects:
circleci.project_id is not supported, but circleci.event_time is supported for Gitlab and Github App type projects.
Hope this helps!
yokoto
December 3, 2024, 3:00am
6
Isn’t there any feature requests about this yet?
I also want to retrieve trigger_parameters via API.