> For the complete documentation index, see [llms.txt](https://www.openhue.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.openhue.io/api/openhue-api-1/event.md).

# Event

API to fetch device events.

## Get Events.

> Long poll or stream device event data.

```json
{"openapi":"3.0.3","info":{"title":"Hue CLIP API","version":"v2"},"tags":[{"name":"Event","description":"API to fetch device events."}],"servers":[{"url":"https://{bridgeInternalIPAddress}","description":"Your Home Bridge","variables":{"bridgeInternalIPAddress":{"default":"192.168.1.0","description":"Use the broker server discover process by visiting https://discovery.meethue.com\nto discover the IP address of the bridge on your network\n"}}}],"security":[{"HueApplicationKey":[]}],"components":{"securitySchemes":{"HueApplicationKey":{"type":"apiKey","in":"header","name":"hue-application-key"}},"schemas":{"Event":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$","description":"A UUID that identifies this batch of events."},"type":{"type":"string","enum":["add","delete","error","update"]},"creationtime":{"type":"string","format":"date-time","description":"Time of creation for this batch of events."},"data":{"type":"array","description":"Array of resources affected by this batch of events.","items":{"description":"Individual resource data","allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","additionalProperties":true}]}}},"required":["id","creationtime","data","type"]},"Resource":{"type":"object","description":"Common resource properties","required":["type","id"],"properties":{"type":{"type":"string","description":"Type of the supported resources"},"id":{"type":"string","description":"Unique identifier representing a specific resource instance","pattern":"^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$"},"id_v1":{"type":"string","description":"Clip v1 resource identifier","pattern":"^(\\/[a-z]{4,32}\\/[0-9a-zA-Z-]{1,32})?$"}}},"ErrorResponse":{"type":"object","required":["errors"],"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}},"Error":{"type":"object","required":["description"],"properties":{"description":{"type":"string","description":"a human-readable explanation specific to this occurrence of the problem."}}}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"MethodNotAllowed":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotAcceptable":{"description":"Not Acceptable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Conflict":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"TooManyRequests":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"ServiceUnavailable":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InsufficientStorage":{"description":"Insufficient Storage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/eventstream/clip/v2":{"get":{"operationId":"getEventStream","summary":"Get Events.","description":"Long poll or stream device event data.","tags":["Event"],"parameters":[{"name":"If-None-Match","in":"header","required":false,"description":"Unix timestamp of the last seen event, followed by `:0`.\n\nIf any events in the server's buffer have a timestamp greater than this,\nthe server will send them immediately instead of blocking for new events.\nThe server does not maintain a persistent buffer and purges old events\nafter several minutes and does not indicate when the value of\nIf-None-Match falls outside of its buffered window, so clients must poll\nconsistently often else events will be silently missed.\n","schema":{"type":"string"}}],"responses":{"200":{"description":"Events Success Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}},"text/event-stream":{"encoding":{"id":{"contentType":"text/plain"},"data":{"contentType":"application/json"}},"schema":{"type":"object","properties":{"id":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"406":{"$ref":"#/components/responses/NotAcceptable"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"},"507":{"$ref":"#/components/responses/InsufficientStorage"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.openhue.io/api/openhue-api-1/event.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
