> For the complete documentation index, see [llms.txt](https://docs.globalalerting.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globalalerting.com/web-api/alerts.md).

# Alerts

## GET /V2/{tenantVarCode}/devices/{deviceId}/alerts

> Returns a list of alerts for the device.> \
> This endpoint returns paged results of up to 1,000 records per response, using the X-CONTINUATIONTOKEN header.> \
> When the response includes this token, it indicates that additional records are available. To retrieve the next set of results,> \
> include the X-CONTINUATIONTOKEN token from the previous response header in the header of your subsequent request.> \
> This process can be repeated until no further continuation token is provided, indicating that you have reached the end of the dataset.

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Alerts"}],"paths":{"/V2/{tenantVarCode}/devices/{deviceId}/alerts":{"get":{"tags":["Alerts"],"summary":"Returns a list of alerts for the device.\r\nThis endpoint returns paged results of up to 1,000 records per response, using the X-CONTINUATIONTOKEN header.\r\nWhen the response includes this token, it indicates that additional records are available. To retrieve the next set of results,\r\ninclude the X-CONTINUATIONTOKEN token from the previous response header in the header of your subsequent request.\r\nThis process can be repeated until no further continuation token is provided, indicating that you have reached the end of the dataset.","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"deviceId","in":"path","description":"Device Id","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","description":"From Date","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","description":"To Date","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertNotification"}}},"application/json;IEEE754Compatible=false":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertNotification"}}},"application/json;IEEE754Compatible=true":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertNotification"}}},"application/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertNotification"}}},"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertNotification"}}},"application/octet-stream":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertNotification"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertNotification"}}},"text/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertNotification"}}},"text/csv":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertNotification"}}}}}}}}},"components":{"schemas":{"AlertNotification":{"type":"object","properties":{"AlertState":{"$ref":"#/components/schemas/AlertNotificationState"},"EventNotificationName":{"type":"string","description":"Name of event notification that created this alert","nullable":true},"EventNotificationText":{"type":"string","description":"Text of event notification that created this alert","nullable":true},"EventNotificationReason":{"type":"string","description":"Description of events that trigerred this alert","nullable":true},"Severity":{"type":"string","description":"Severity as set in event notification","nullable":true},"Latitude":{"type":"number","description":"Latitude in case alert was triggered by MO message with valid position","format":"double","nullable":true},"Longitude":{"type":"number","description":"Longitude in case alert was triggered by MO message with valid position","format":"double","nullable":true},"GpsTimestamp":{"type":"string","description":"Position fix timestamp in case alert was triggered by MO message with valid position","format":"date-time","nullable":true},"Timestamp":{"type":"string","description":"Alert timestamp","format":"date-time"},"AlertTime":{"type":"string","description":"Alert Time","format":"date-time"}},"additionalProperties":false},"AlertNotificationState":{"enum":["New","Closed"],"type":"string"}}}}
```
