Is it possible to override env variable(s) for a one-off job? The documentation here mentions about potential override in description https://docs.render.com/jobs,
but I cannot find it documented in API spec. Create job
For what its worth, I tried passing envVars array of kv pair in addition to startCmd, but that does not seem to work. Example
curl --request POST 'https://api.render.com/v1/services/srv-xxx/jobs' \
--header 'Authorization: Bearer xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"envVars":[
{
"key": "HELLO",
"value": "Does this work?"
}
],
"startCommand": "echo $HELLO"
}'
I also tried this format of startCmd from another post in the forum, which does not work either.
curl --request POST 'https://api.render.com/v1/services/srv-xxx/jobs' \
--header 'Authorization: Bearer xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"startCommand": "sh -c export HELLO=Render; echo $HELLO"
}'
and also tried
curl --request POST 'https://api.render.com/v1/services/srv-xxx/jobs' \
--header 'Authorization: Bearer xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"startCommand": "HELLO=Render echo $HELLO"
}'
Appreciate any pointers.