2

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.

Dan Kohn
  • 33,811
  • 9
  • 84
  • 100
John Liu
  • 1,334
  • 1
  • 11
  • 16
  • Hmm I created the event with CloudEvent schema, but the Flow connector only does EventGrid schema. May be that's related. – John Liu Sep 08 '18 at 07:55
  • I think that might be it. I re-created a new event grid with the EventGrid schema and now the publish event works from Flow & LogicApps. – John Liu Sep 08 '18 at 08:02

1 Answers1

0

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"
       }
    }
Roman Kiss
  • 7,925
  • 1
  • 8
  • 21