I have a pipeline on Azure DevOps that I'm trying to run programmatically/headless using the REST API:
 https://docs.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/run%20pipeline?view=azure-devops-rest-6.0
So far so good, I can auth and start a run. I want to pass data to this pipeline which is possible using variables in the request body, as per the doc. My request body:
{
    "variables": {
        "HELLO_WORLD": {
            "isSecret": false,
            "value": "HelloWorldValue"
        }
    }
}
My pipeline YAML looks like this:
trigger: none
pr: none
pool:
  vmImage: 'ubuntu-latest'
steps:
- task: Bash@3
  inputs:
    targetType: 'inline'
    script: |
      KEY=$(HELLO_WORLD)
      echo "Hello world key: " $KEY
But an error is shown "HELLO_WORLD: command not found". How do you pass variables to a pipeline using the REST API? and how to overcome this error?