PUT to change build status no longer works? The following used to work
fine:
curl --user admin:**** -H "Content-Type:application/json" -H
"Accept:application/json" -k https://foreman/api/v2/hosts/testhost -X PUT
-d “{"build":"false"}”
Now I get…
{"status":400,"error":"There was a problem in the JSON you submitted: 784:
unexpected token at
'\ufffd\ufffd\ufffd{"build":"false"}\ufffd\ufffd\ufffd'"}
I am not a JSON guru… so I am kind of lost as to why this is not working?
> -d “{"build":"false"}”
The double quotes here on the outside are "curved" ones, as if from a
word processor, not regular double quotes. These are causing the \ufffd
characters in the error message:
> Now I get…
> {"status":400,"error":"There was a problem in the JSON you submitted:
> 784: unexpected token at
> '\ufffd\ufffd\ufffd{"build":"false"}\ufffd\ufffd\ufffd'"}
Copy/paste this, or re-type them:
-d "{"build":"false"}"
···
On 22/04/15 20:44, Schorschi Decker wrote:
–
Dominic Cleal
Red Hat Engineering