Passing environment variables in API v2

Is it possible to pass environment variables in JSON body of API v2 call?

Even with pipelines parameters, I want to use environment variables, so I tried to make api v2 call

https://circleci.com/api/v2/project/:vcs-type/:username/:project/pipeline

and tried something like this to send in body:

    {
    	"branch": "circle_ci_api_v2_test",
    	"parameters": 
    	{
        	"my_mystical_param": "Hello from postman mystic",
        	"my_legendary_param": "Hello from postman legendary"
    	},
    	"build_parameters":{
    		"envVar": "kuku iopta",
        	"testVar1": 27
    	}
    }

But circle ci build does not see any variables

1 Like