Hello, we’ve made a major version upgrade (from 4.3.4 to 5.5.2), and everything went well, but we’re encountering a blocking problem. when we make an API call to launch a script
We use POST /api/v1/script/{id} to launch our scripts, so if the script has no parameters, it works fine without a problem.
But if it does have parameters, we’re obliged to put the parameters in the body, in which case we get the following error:
Data at the root level is invalid. Line 1, position 1.
curl -X 'POST' \
'https://xxxxxxxxxxx/api/v1/script/xx' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"jobParameters": [
{
"name": "GroupName",
"Type": "System.String",
"Value": "ADG-Toto"
},
{
"name": "Action",
"Type": "System.String",
"Value": "Create"
}
]
}'
I’ve also tested this method: the api call works without a problem, but the variables appear empty in the job.
curl -X 'POST' \
'https://xxxxxxxxxxx/api/v1/script/xx' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"jobParameters": [
{
"name": "GroupName",
"Type": "System.String",
"stringValue": "ADG-Toto"
},
{
"name": "Action",
"Type": "System.String",
"stringValue": "Create"
}
]
}'
I’m reproducing the problem with a new instance.
Is there a change I’ve missed?
Regards
Nicolas
Product: PowerShell Universal
Version: 5.5.2