const eventId = 'YOUR_eventId_PARAMETER';
const instance = 'YOUR_instance_PARAMETER';
const resp = await fetch(
`https://${instance}.app.willowinc.com/api/v3/events/${eventId}`,
{
method: 'GET',
headers: {
Authorization: 'Bearer <YOUR_TOKEN_HERE>'
}
}
);
const data = await resp.text();
console.log(data);OK
Gets the event type id which is defined by Willow, e.g. CalendarEvent, WeatherForecast, UtilityBill, ….
Gets the strongly-typed event type, or null when int Event.EventTypeId does not correspond to a known EventType.
Gets or sets the event sub type id, which further qualifies the int Event.EventTypeId.
Gets or sets the event category — the id of a user-defined EventCategory. Independent of the event type and sub type — any event may carry any category. Null or 0 means "no category". On update, null preserves the existing category and 0 explicitly clears it, so clients that don't yet send the field can't clear data they don't know about.
Gets an Id linking it to the source system, facilitating updates and deletes.
Gets or sets a version for the payload to assist in the deserialization of the payload.
Gets or sets a double value that may be stored to complement the Payload value.
Gets the id of the twin that is a reference to to an existing space, or equipment twin.
Gets or sets a JSON string with the expanded location ancestors for the twinId.
- text/plain
- application/json
- text/json
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": null,
"description": null,
"startTime": "2019-08-24T14:15:22Z",
"endTime": null,
"eventTypeId": 0,
"type": 0,
"subTypeId": null,
"category": null,
"eventSourceId": null,
"externalId": null,
"payload": null,
"payloadVersion": null,
"scalarValue": null,
"twinId": null,
"locations": null,
"createdDate": "2019-08-24T14:15:22Z",
"lastModifiedDate": "2019-08-24T14:15:22Z"
}