Just trying to add a test task, and the task gets created, but only contains the name and code. I’m trying to get it to add the content, and the remote host, but those are always blank. This code doesn’t contain the Bearer header, but it’s there. Any ideas?
curl --request POST \
--url https://changeme/api/tasks \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"task": {
"taskType": {
"taskOptions": {
"host": "pu1cldutil1001",
"username": "username",
"password": "password"
},
"retryable": false,
"file": {
"sourceType": "local",
"content": "test"
},
"credential": {
"type": "local"
},
"code": "script",
"executeTarget": "remote"
},
"name": "Log: Add CMDB User 1",
"code": "logaddcmdbuser1"
}
}
'