首页 > 解决方案 > 使用服务器 REST API 激活 KAA 配置

问题描述

我使用 kaa rest api 来激活我的配置(使用 Postman),但我不知道如何填充 configurationId 的 Parameter 内容类型。我试过

{
"id" : "98593",
"applicationId": "32769",
"schemaId": "65544" ,
"endpointGroupId": "98308"}

但我收到 HTTP/1.1 400 Bad Request,任何建议将不胜感激。谢谢

标签: kaa

解决方案


最后我可以解决这个问题,您需要将您的内容类型设置为 application/json 和 POST 正文只需填写配置 ID

curl -v -S -u username:password -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '12423' 'http://localhost:8080/kaaAdmin/rest/api/activateConfiguration' | python -mjson.tool

推荐阅读