Ibm mobilefirst MFP 8-使用MobileFirst Push API解析JSON对象时出错

Ibm mobilefirst MFP 8-使用MobileFirst Push API解析JSON对象时出错,ibm-mobilefirst,Ibm Mobilefirst,当我尝试使用推送API发送通知时,我遇到以下错误。JSON对象在V7.1版本中工作 { "code": "FPWSE0011E", "message": "Bad Request - The JSON validation failed at 'target'.", "productVersion": "8.0.0.00-20161122-1902" } 这是我的JSON对象 { "message": { "alert": "hello" }, "setting

当我尝试使用推送API发送通知时,我遇到以下错误。JSON对象在V7.1版本中工作

{
  "code": "FPWSE0011E",
  "message": "Bad Request - The JSON validation failed at 'target'.",
  "productVersion": "8.0.0.00-20161122-1902"
}
这是我的JSON对象

{
  "message": {
    "alert": "hello"
  },
  "settings": {
    "apns": {
      "badge": 1,
      "iosActionKey": "Ok",
      "payload": {
          "messageType": "HELLO",
            "detail": "Here's your message details."
      },
      "sound": "song.mp3"
    },
    "gcm": {
      "payload": {},
      "sound": "song.mp3"
    }
  },
  "target": {
    "consumerIds": [],
    "deviceIds": ["4A1086CF-873A-4404-BE2D-200EA6BDA8AD"],
    "platforms": [
      "A","G"
    ]
  }
}
我正在使用admin RestAPi接口

https://myserver/mfpadmin/management-apis/2.0/runtimes/mfp/notifications/applications/com.myjobs/messages
我遵循文档中的格式


感谢您的帮助

根据v8.0文档,
目标
中只允许1个属性。在JSON中,我看到定义了几个属性

请参见此处的JSON示例:

可以看出:

target" : {
    // The list below is for demonstration purposes only - per the documentation only 1 target is allowed to be used at a time.
    "deviceIds" : [ "MyDeviceId1", ... ],
    "platforms" : [ "A,G", ... ],
    "tagNames" : [ "Gold", ... ],
    "userIds" : [ "MyUserId", ... ],
},