Hi, the Kudu WebJobs API doesn’t forward the POST body to your job. The only data you can send is a single arguments string, either in the query-string or as a JSON property named arguments:
curl -u user:pwd \
-H "Content-Type: application/json" \
-d '{"arguments":"{\"orderId\":123,\"action\":\"ship\"}"}' \
https://<site>.scm.azurewebsites.net/api/triggeredwebjobs/<job>/run
At run-time that string is exposed to the job as:
the environment variable WEBJOBS_COMMAND_ARGUMENTS
, and
the first command-line argument ($argv[1]
) for console apps.
So—wrap your JSON inside the arguments string and parse it in your PHP code:
$payload = json_decode(getenv('WEBJOBS_COMMAND_ARGUMENTS') ?: $argv[1], true);