Farm job submission with custom arguments

Hi all,

I am currently trying to submit a job to Farm using the api http://localhost:8222/queue/management/tasks/submit.

In that job I want to pass an environment variable that would be used WITHIN the job (in my kit app running in the job).
Using the documentation provided, I have tried a lot of different syntaxes on the “env” value in the body of my request. However I can’t make it work, the environment variable doesn’t exist within the job as I expected. The documentation doesn’t have any actual example of a Job working using custom environment variables.

FYI: The current job is only a python script trying to read the “TEST” environment variable and printing it. I plan to use a full kit app, using those environments variables once I have resolved this issue.

Anyone has an idea to help me?

Some syntaxes I have tried in my request body:

"env": [
    {
     "name": "TEST",
      "valueFrom": {
        "secretKeyRef": {
          "key": "TEST",
          "name": "this_is_a_test"
        }
      }
    }
]
"env": {
	"TEST":"this_is_a_test"
}
"env": [
	"TEST=this_is_a_test"
]

Thanks !