Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Passing environment variables in API v2? #58

Open
glebsonik opened this issue Sep 27, 2019 · 0 comments
Open

Passing environment variables in API v2? #58

glebsonik opened this issue Sep 27, 2019 · 0 comments

Comments

@glebsonik
Copy link

glebsonik commented Sep 27, 2019

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. Is there any way to pass them? Beacuse, I think that making assignment env_var_name=parameter_name is not good idea.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant