使用RESTAPI更新kaa配置

使用RESTAPI更新kaa配置,rest,api,kaa,Rest,Api,Kaa,我使用kaa rest api更改配置,如下所示: 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\":{\"

我使用kaa rest api更改配置,如下所示:

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

但是我得到了
HTTP/1.1400错误的请求。我的post参数看起来正常吗?任何建议都将不胜感激。

我终于找到了问题所在。kaarestapi工作得非常完美。这是关于schemaID和endpointgroupId不匹配的问题。我从kaa web界面获得了正确的值:
http://localhost:8080/kaaAdmin/#config:appId=2&endGroupId=32768&create=false&active=true&random=0.19035219790078206&schemaId=65539

. 由于Rest文档中不存在
400错误代码,因此我不知道问题出在哪里。

最后我找到了问题。kaarestapi工作得非常完美。这是关于schemaID和endpointgroupId不匹配的问题。我从kaa web界面获得了正确的值:
http://localhost:8080/kaaAdmin/#config:appId=2&endGroupId=32768&create=false&active=true&random=0.19035219790078206&schemaId=65539
. 由于Rest文档中不存在
400错误代码
,因此我不知道问题出在哪里