posting custom message to event grid via logicapps

957 Views Asked by At

I'm using the Publish Event in logicapp

{
  "error": {
    "code": "BadRequest",
    "message": "Unexpected token when reading JSON. Expected: StartObject, actual: StartArray. Report '01a24d3c-7588-4580-b650-52aa4f25b805:9/8/2018 7:17:33 AM (UTC)' to our forums for assistance or raise a support ticket.",
    "details": [
      {
        "code": "InputJsonInvalid",
        "message": "Unexpected token when reading JSON. Expected: StartObject, actual: StartArray. Report '01a24d3c-7588-4580-b650-52aa4f25b805:9/8/2018 7:17:33 AM (UTC)' to our forums for assistance or raise a support ticket."
      }
    ]
  }
}

So I tried to send the sample message

[
  {
    "id": "1807",
    "eventType": "recordInserted",
    "subject": "myapp/vehicles/motorcycles",
    "eventTime": "2017-08-10T21:03:07+00:00",
    "data": {
      "make": "Ducati",
      "model": "Monster"
    },
    "dataVersion": "1.0"
  }
]

but still getting the same result.

1

There are 1 best solutions below

0
On

for the CloudEvent schema, try the following sample message:

    {
      "cloudEventsVersion": "0.1",
      "eventTypeVersion": "",
      "eventId": "12345",
      "source": "#/myapp/vehicles/motorcycles",
      "eventType": "recordInserted",
      "eventTime": "2018-09-08T13:05:47.6120424Z",
      "data": {
        "make": "Ducati",
        "model": "Monster"
       }
    }