I am currently using a web service to process requests one at a time. However I’d like to use jobs so I can queue them since its possible more than one can be requested at the same time. I understand how to create jobs but I fail to understand how to create a job and pass along custom POST data to run the script.
As far as I can tell, when creating a job the only variable I can pass is the startCommand? How do I pass additional data?
For reference, this is the data I need to pass to each job request. My current web service request looks similar to this using PHP and Guzzle:
$response = $client->request('POST','.....onrender.com',[
'json' => [
//Pass credentials
'user' => $usr,
'pass' => $pswd,
'webparm' => $webparm
'userid' => $userid
],
]);
The following is an example does not work when attempting to test this:
curl --request POST 'https://api.render.com/v1/services/crn-1111/jobs' \
--header 'Authorization: Bearer API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"startCommand": "echo hi",
"user" : "examplename",
}'