Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Sky Event API is used to raise events to the pico engine. Because the Sky API has the concept of unique entity identity built into the API, each event raised using the Sky API is raised on behalf of a particular entity. This concept enables personal event networks. The Sky API follows the Evented API specification. The API implements event signal URLs (ESLs). 

For a thorough tutorial of the use of the Sky Event API with the Pico Engine read the Events and Queries Lesson.

...

The components of the event are encoded in an event signal URL as follows:

The schema scheme is either http or https. The HTTP call may be either a POST or a GETPOST is preferred.

...

If you choose to not provide an <eid> in this form, you can supply none as the EID to force the engine to generate a unique EID for the event.  

  /sky/event/<eci>/none/<domain>/<type>

Attributes

When the event is raised using an HTTP POST, attributes are sent as the body. These parameters must be encoded using one of the methods shown in the following table. Note that the Content-Type header must be set to the appropriate mime-type for the event consumer to understand the message.

encodingmime-type
formapplication/x-www-form-urlencoded
JSONapplication/json

If the body is JSON-encoded, the encoding should be a JSON object containing the keys and values. For example, to send the attributes temperature and node_id, the JSON would appear as follows:

Code Block
languagejs
themeConfluence
{
	"temperature": 67,
	"node_id": "2392029d003a:1"
}

Status 

Active