0
votes

I used kaa rest api for changing my configuration as follow:

curl -v -S -u devuser:devuser123 -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
"applicationId": "2",
"schemaId": "65539",
"endpointGroupId": "32768",
"body": "{\"timeConfig\":{\"org.kaaproject.configuration.unchangedT\":\"unchanged\"},\"dailySchedules\":{\"org.kaaproject.configuration.unchangedT\":\"unchanged\"},\"enabled\":{\"boolean":false},\"relays\":{\"array\":[false,false,false,true,true,false,false,false]},\"samplePeriod\":{\"int\":9}}",
}' 'http://localhost:8080/kaaAdmin/rest/api/configuration' | python -mjson.tool

But I get HTTP/1.1 400 Bad Request. Does my post parameters seems OK? any suggestion will be appreciated.

1

1 Answers

2
votes

Finally I found the problem. Kaa Rest API Works perfect. It was about mismatching schemaID and endpointgroupId. I got the correct values from kaa web interface: http://localhost:8080/kaaAdmin/#config:appId=2&endGroupId=32768&create=false&active=true&random=0.19035219790078206&schemaId=65539 . since the 400 ERROR CODE is not present in Rest documentation, I had no clue that where was the problem.