Device.sendEvent

Description

Notifies that the event named eventName has been generated by the device with the given uuid. Each event may have a string payload that will be sent to all the receivers of the events (i. e., the performers of the actions defined in the rules corresponding to this event).

Request specification

  • Method: POST
  • URL: /devices/{uuid}/events/{eventName}

Example Request

  • Request URL: https://www.lhings.com/laas/api/v1/devices/11111111-2222-3333-4444-555555555555/events/event1
  • Request headers: X-Api-Key: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
  • Request method: POST
  • Request body: any UTF-8 encoded string to be sent as payload of the event.

Example Response

  • HTTP status: 200 OK
  • Response body:
    {"responseStatus":200,"message":"OK"}

Error summary

  • 200: success.
  • 401: Api key not provided or invalid.
  • 404: device does not exist or is currently offline.
Back to top