> For the complete documentation index, see [llms.txt](https://help.security.gallagher.com/knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.security.gallagher.com/knowledge-hub/developer/rest-api/alarms.md).

# Alarms

Use these methods to download, monitor, and manage Command Centre alarms.

### Alarm states

Each type of alarm can be stateless or stateful. Stateless alarm types are spikes, such as an operator getting their password wrong or a cardholder being denied at a door. Stateful alarms have a triggering event and a restoring event, such as a door being forced open then closed, or a service going offline then reappearing later.

An operator cannot process (dismiss) an active alarm without the 'Force process' privilege.

The API presents the difference in a field called `active`. It will always be false for stateless alarms, and it will be true for stateful alarms before their restoring event occurs.

### Alarm use cases

#### Downloading and managing unprocessed alarms

1. `GET /api`
2. Follow the link at `features.alarms.alarms` ↪. You will receive up to 100 alarms, each containing links to its management functions.
3. If step 2 returned results and there is a link at `next.href`, follow it and repeat.

#### Staying up to date

After getting all the current alarms using the process above, which is following `next.href` in a loop until there are no more alarms to get, follow the link at `updates.href`. It will block until there is a new alarm or a change to an existing alarm. After handling that update, follow the link it contains at `next.href` and keep following it in a loop to stay up to date.

### Licensing

* The GETs that collect alarms and events require the RESTEvents licence.

## Get current alarms

> This returns the current list of unprocessed alarms.  The result will contain no more\
> than 100 alarms; you should follow the \`next\` link, if it is present, to collect\
> more.\
> \
> You can tell when you have loaded all the current alarms because there will not be\
> a \`next\` link.  Instead, there will be an \`updates\` link which takes you to a different\
> endpoint that long-polls for live updates to alarms.\
> \
> Unlike the corresponding method that retrieves events, this call does not take query\
> parameters to filter its results.  You can limit the fields it returns, but it will always\
> return every alarm that your operator can view.  If you wish to restrict it to alarms in\
> certain divisions, give your operator permission to view alarms in only those divisions.\
> \
> The alarm summary only contains unprocessed alarms.  You can access\
> a processed alarm by finding its corresponding event in the \[event summary]\(models#eventsummary)\
> and following its \`alarm.href\` link to the alarm details.\
> \
> Do not code this URL into your application.  Take it from \`alarms.alarms.href\` in the\
> results of \`GET /api\`.<br>

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Alarms","description":"\nUse these methods to download, monitor, and manage Command Centre alarms.\n\n## Alarm states\n\nEach type of alarm can be stateless or stateful.  Stateless alarm types are spikes, such as an\noperator getting their password wrong or a cardholder being denied at a door.  Stateful alarms\nhave a triggering event and a restoring event, such as a door being forced open then closed, or\na service going offline then reappearing later.\n\nAn operator cannot process (dismiss) an active alarm without the 'Force process' privilege.\n\nThe API presents the difference in a field called `active`.  It will always be false for\nstateless alarms, and it will be true for stateful alarms before their restoring event occurs.\n\n## Alarm use cases\n\n### Downloading and managing unprocessed alarms\n1. `GET /api`\n2. Follow the link at `features.alarms.alarms` [↪](alarms#get-api-alarms).  You will\n   receive up to 100 alarms, each containing links to its management functions.\n3. If step 2 returned results and there is a link at `next.href`, follow it and\n   repeat.\n\n### Staying up to date\n\nAfter getting all the current alarms using the process above, which is following `next.href` in\na loop until there are no more alarms to get, follow the link at `updates.href`.  It will block\nuntil there is a new alarm or a change to an existing alarm.  After handling that update, follow\nthe link it contains at `next.href` and keep following it in a loop to stay up to date.\n\n## Licensing\n\n* The GETs that collect alarms and events require the RESTEvents licence.\n"}],"servers":[{"url":"https://127.0.0.1:8904"}],"security":[{"API_key":[]},{"basic":[]}],"components":{"securitySchemes":{"API_key":{"type":"apiKey","name":"Authorization","in":"header","description":"\nClients authenticate by including a pre-shared API key in the `Authorization` header of each\nrequest after an authorisation method of `GGL-API-KEY`:\n\n`Authorization: GGL-API-KEY C774-B01F-D695-AA4B-215F-A158-AC22-ADEB`\n\nFor a fuller description see [API authentication](api-authentication).\n"},"basic":{"type":"http","scheme":"basic","description":"This is HTTP Basic authentication using a blank username and the API key as the password.\n\nExample:  `Authorization: Basic OkM3NzQtQjAxRi1ENjk1LUFBNEItMjE1Ri1BMTU4LUFDMjItQURFQg==`\n\nThat example is equivalent to the example in the description of the api_Key method:\nprepending a colon to the API key beginning with `C774` then encoding it into Base64\nproduces the 56 characters beginning with `OkM3`.\n\nThe colon is a separator between a username, which is blank in our case, and the password,\nwhich is our API key.\n\nFor a fuller description see [API authentication](api-authentication)\n"}},"parameters":{"alarmfields":{"name":"fields","in":"query","explode":false,"required":false,"schema":{"type":"string","enum":["href","id","time","message","source","type","eventType","priority","state","active","division","notePresets","view","comment","acknowledgeWithComment","acknowledge","processWithComment","process","details","history","instruction","cardholder","event"]},"description":"Sets the fields you want in your results of an alarm GET.  Separate fields with commas.\n\nNew to 8.40.\n"}},"schemas":{"AlarmSearch":{"title":"Alarm search","description":"An array of alarm summaries, and either a 'next' or an 'updates' link you should follow to\nretrieve more alarms.\n","type":"object","properties":{"alarms":{"type":"array","description":"An array of alarm summaries.","items":{"$ref":"#/components/schemas/AlarmSummary"}},"next":{"type":"object","description":"The link to the next page of alarms. Missing if you have retrieved all the current alarms.","properties":{"href":{"type":"string"}}},"updates":{"type":"object","description":"The link to follow to long-poll for alarm changes.  Missing if you have not yet retrieved all the current alarms.","properties":{"href":{"type":"string"}}}}},"AlarmSummary":{"title":"Alarm summary","description":"`/api/alarms` returns an array of these, and `/api/alarms/{id}` returns one with more fields.","type":"object","properties":{"href":{"type":"string","format":"uri-reference","description":"A link to the details of this alarm, also usable as an identifier.  It is not globally\nunique but it is unique to the site and, barring a database restore, it will not be\nrecycled by another event or alarm.\n"},"id":{"type":"string","description":"An alphanumeric identifier for this alarm, unique to the site but not across sites.\nOnce allocated, an ID is not re-used except after totally resetting the server's state\nby restoring the database.\n"},"time":{"type":"string","description":"The time the alarm occurred."},"message":{"type":"string","description":"The alarm's message."},"source":{"type":"object","description":"The ID and href are new to 8.10.","properties":{"id":{"type":"string","description":"The alphanumeric ID of the alarm's source item.\n"},"name":{"type":"string","description":"The name of the alarm's source item at the time of the event."},"href":{"type":"string","format":"uri-reference","description":"Link to the source item."}}},"type":{"type":"string","description":"The name of this alarm's event type.\n\nDeprecated in favour of the `eventType` block.\n"},"eventType":{"type":"object","description":"ID and name of the event's or alarm's type.  There is a long list of them at\n[/events/groups](events#get-api-events-groups).\n\nUnlike the `type` field, this has the same format in an event as it does in an alarm.\n\nAdded in 8.90.  Because it is a new field, it does not appear by default.  Ask for it using\nthe `fields` parameter.\n"},"priority":{"type":"integer","description":"Numeric priority.  9 is critical and 0 is not an event.","minimum":0,"maximum":9},"state":{"type":"string","description":"The state of the alarm.  Alarms start at \"unacknowledged\".","enum":["unacknowledged","acknowledged","processed"]},"active":{"type":"boolean","description":"Alarms can be stateless or stateful.  Stateless alarm types are spikes:  an operator\ngetting their password wrong or a cardholder being denied at a door.  Stateful alarms\nhave a triggering event and a restoring event:  a door being forced open then closed, or\na service going offline then reappearing later.\n\nStateless alarms are always inactive:  `active` will be false.  Stateful alarms will\nhave `active` true between being raised and restored.\n\nAn operator cannot process (dismiss) an active alarm without the 'Force process'\nprivilege.\n"},"division":{"type":"object","description":"The division entity representing the division of the alarm. GET the href for full details.","properties":{"href":{"type":"string","format":"uri-reference"}}},"event":{"type":"object","description":"A block containing a link (\"href\") to the details page of this alarm's event.  Useful if\nyou want an alarm's related items.\n\nThis mirrors an event's `alarm` field, which comes the other way.\n\nAdded in 8.90.  Not returned by default - you need to ask for it using the `fields` query parameter.\n","properties":{"href":{"type":"string","format":"uri-reference","description":"Link to the event page for this alarm.  GET it for the fields found on an event\nthat are not on an alarm.\n"}}},"notePresets":{"type":"array","items":{"type":"string"},"description":"Preset alarm notes to use for this specific alarm. Missing if the alarm does not have specific notes; in this case the client should fall back to the server defaults."},"view":{"type":"object","description":"POST an alarm update request JSON object to the href to indicate the operator has viewed\nthe alarm.\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"comment":{"type":"object","description":"POST an alarm update request JSON object to the href to place an arbitrary alarm note\nagainst the alarm.\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"acknowledge":{"type":"object","description":"POST an alarm update request JSON object to the href to acknowledge an alarm. Missing if\nthe system has mandatory alarm notes on for this alarm, or if the alarm is already\nacknowledged.\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"acknowledgeWithComment":{"type":"object","description":"POST an alarm update request JSON object to the href to acknowledge an alarm and place an\nalarm note against it.  Missing if the alarm is already acknowledged.\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"process":{"type":"object","description":"POST an alarm update request JSON object to the href to process an alarm. Missing if the\nsystem has mandatory alarm notes on for this alarm.  Missing if the alarm cannot be\nprocessed (if it is active, for example).\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"processWithComment":{"type":"object","description":"POST an alarm update request JSON object to the href to process an alarm and place an\nalarm note against it.  Missing if the alarm cannot be processed (if it is active, for\nexample).\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"forceProcess":{"type":"object","description":"POST an alarm update request JSON object to this href to process an active alarm.  Missing\nif the alarm is not active (in which case you will have `process` and `processWithComment`\nlinks instead).\n\nThis action can take a comment in the body.  In fact an explanation is recommended since\nforce-processing an alarm is unusual.\n","properties":{"href":{"type":"string","format":"uri-reference"}}}}}}},"paths":{"/api/alarms":{"get":{"tags":["Alarms"],"summary":"Get current alarms","description":"This returns the current list of unprocessed alarms.  The result will contain no more\nthan 100 alarms; you should follow the `next` link, if it is present, to collect\nmore.\n\nYou can tell when you have loaded all the current alarms because there will not be\na `next` link.  Instead, there will be an `updates` link which takes you to a different\nendpoint that long-polls for live updates to alarms.\n\nUnlike the corresponding method that retrieves events, this call does not take query\nparameters to filter its results.  You can limit the fields it returns, but it will always\nreturn every alarm that your operator can view.  If you wish to restrict it to alarms in\ncertain divisions, give your operator permission to view alarms in only those divisions.\n\nThe alarm summary only contains unprocessed alarms.  You can access\na processed alarm by finding its corresponding event in the [event summary](models#eventsummary)\nand following its `alarm.href` link to the alarm details.\n\nDo not code this URL into your application.  Take it from `alarms.alarms.href` in the\nresults of `GET /api`.\n","parameters":[{"$ref":"#/components/parameters/alarmfields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlarmSearch"}}}},"403":{"description":"The site does not have a RESTEvents licence."}}}}}}
```

## Get changes to alarms (or wait)

> This is a long poll for live updates to alarms.  If alarms occurred or changed since the\
> previous call, no matter how long ago that was, it will return them immediately.  If there\
> are no updates pending, it will wait until one arrives.  If none arrive before a timeout\
> passes (about 30 seconds) it will return an empty \`updates\` array and a fresh \`next\` link.\
> \
> Whether or not the response contained updates the client should follow the \`next\` link to\
> wait for the next updates.\
> \
> If your server receives a lot of alarm updates, wait some time between calls to reduce\
> chatter.  You will not miss any alarms:  each response contains all the alarms that happened\
> since the previous call, even if an operator processed the alarms in question.\
> \
> You will receive each alarm only once in a result set, in its current state.  For example if\
> an alarm is raised, restored, acknowledged, then processed between two of your API calls you\
> will receive it as 'processed' in your next call.  If, however, you make API calls between\
> each of the alarm's state changes you will receive it four times:  active, inactive and\
> unacknowledged, acknowledged, then finally processed.\
> \
> Do not wait if you receive 100 updates or more.  100 is the maximum number of updates\
> current versions of CC will return in one batch, so if that happens you have fallen behind:\
> there are more updates waiting and you can catch up by asking for them immediately.\
> \
> Command Centre does not tell you which alarms were added, removed, or modified. It is up to\
> you to match the incoming alarms against your own internal alarm list and determine the\
> differences.\
> \
> Do not code this URL into your application.  Take it from \`alarms.updates.href\` in the\
> results of \`GET /api\`, or from \`updates\` in the results of \`GET /api/alarms\`, or from \`next\`\
> in the results of this call.  Do not attempt to interpret or set the \`id\` query parameter in\
> the URL, as it tracks your progress through the alarm history.\
> \
> Assuming you got the URL for this call from the response from another call, and your\
> operator therefore has the privileges required to view alarms, this should always complete\
> successfully.<br>

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Alarms","description":"\nUse these methods to download, monitor, and manage Command Centre alarms.\n\n## Alarm states\n\nEach type of alarm can be stateless or stateful.  Stateless alarm types are spikes, such as an\noperator getting their password wrong or a cardholder being denied at a door.  Stateful alarms\nhave a triggering event and a restoring event, such as a door being forced open then closed, or\na service going offline then reappearing later.\n\nAn operator cannot process (dismiss) an active alarm without the 'Force process' privilege.\n\nThe API presents the difference in a field called `active`.  It will always be false for\nstateless alarms, and it will be true for stateful alarms before their restoring event occurs.\n\n## Alarm use cases\n\n### Downloading and managing unprocessed alarms\n1. `GET /api`\n2. Follow the link at `features.alarms.alarms` [↪](alarms#get-api-alarms).  You will\n   receive up to 100 alarms, each containing links to its management functions.\n3. If step 2 returned results and there is a link at `next.href`, follow it and\n   repeat.\n\n### Staying up to date\n\nAfter getting all the current alarms using the process above, which is following `next.href` in\na loop until there are no more alarms to get, follow the link at `updates.href`.  It will block\nuntil there is a new alarm or a change to an existing alarm.  After handling that update, follow\nthe link it contains at `next.href` and keep following it in a loop to stay up to date.\n\n## Licensing\n\n* The GETs that collect alarms and events require the RESTEvents licence.\n"}],"servers":[{"url":"https://127.0.0.1:8904"}],"security":[{"API_key":[]},{"basic":[]}],"components":{"securitySchemes":{"API_key":{"type":"apiKey","name":"Authorization","in":"header","description":"\nClients authenticate by including a pre-shared API key in the `Authorization` header of each\nrequest after an authorisation method of `GGL-API-KEY`:\n\n`Authorization: GGL-API-KEY C774-B01F-D695-AA4B-215F-A158-AC22-ADEB`\n\nFor a fuller description see [API authentication](api-authentication).\n"},"basic":{"type":"http","scheme":"basic","description":"This is HTTP Basic authentication using a blank username and the API key as the password.\n\nExample:  `Authorization: Basic OkM3NzQtQjAxRi1ENjk1LUFBNEItMjE1Ri1BMTU4LUFDMjItQURFQg==`\n\nThat example is equivalent to the example in the description of the api_Key method:\nprepending a colon to the API key beginning with `C774` then encoding it into Base64\nproduces the 56 characters beginning with `OkM3`.\n\nThe colon is a separator between a username, which is blank in our case, and the password,\nwhich is our API key.\n\nFor a fuller description see [API authentication](api-authentication)\n"}},"parameters":{"alarmfields":{"name":"fields","in":"query","explode":false,"required":false,"schema":{"type":"string","enum":["href","id","time","message","source","type","eventType","priority","state","active","division","notePresets","view","comment","acknowledgeWithComment","acknowledge","processWithComment","process","details","history","instruction","cardholder","event"]},"description":"Sets the fields you want in your results of an alarm GET.  Separate fields with commas.\n\nNew to 8.40.\n"}},"schemas":{"AlarmUpdates":{"title":"Alarm updates","type":"object","properties":{"updates":{"type":"array","description":"An array of summaries of alarms created or modified since the previous call.","items":{"$ref":"#/components/schemas/AlarmSummary"}},"next":{"type":"object","description":"Follow this link to perform another long poll.","properties":{"href":{"type":"string"}}}}},"AlarmSummary":{"title":"Alarm summary","description":"`/api/alarms` returns an array of these, and `/api/alarms/{id}` returns one with more fields.","type":"object","properties":{"href":{"type":"string","format":"uri-reference","description":"A link to the details of this alarm, also usable as an identifier.  It is not globally\nunique but it is unique to the site and, barring a database restore, it will not be\nrecycled by another event or alarm.\n"},"id":{"type":"string","description":"An alphanumeric identifier for this alarm, unique to the site but not across sites.\nOnce allocated, an ID is not re-used except after totally resetting the server's state\nby restoring the database.\n"},"time":{"type":"string","description":"The time the alarm occurred."},"message":{"type":"string","description":"The alarm's message."},"source":{"type":"object","description":"The ID and href are new to 8.10.","properties":{"id":{"type":"string","description":"The alphanumeric ID of the alarm's source item.\n"},"name":{"type":"string","description":"The name of the alarm's source item at the time of the event."},"href":{"type":"string","format":"uri-reference","description":"Link to the source item."}}},"type":{"type":"string","description":"The name of this alarm's event type.\n\nDeprecated in favour of the `eventType` block.\n"},"eventType":{"type":"object","description":"ID and name of the event's or alarm's type.  There is a long list of them at\n[/events/groups](events#get-api-events-groups).\n\nUnlike the `type` field, this has the same format in an event as it does in an alarm.\n\nAdded in 8.90.  Because it is a new field, it does not appear by default.  Ask for it using\nthe `fields` parameter.\n"},"priority":{"type":"integer","description":"Numeric priority.  9 is critical and 0 is not an event.","minimum":0,"maximum":9},"state":{"type":"string","description":"The state of the alarm.  Alarms start at \"unacknowledged\".","enum":["unacknowledged","acknowledged","processed"]},"active":{"type":"boolean","description":"Alarms can be stateless or stateful.  Stateless alarm types are spikes:  an operator\ngetting their password wrong or a cardholder being denied at a door.  Stateful alarms\nhave a triggering event and a restoring event:  a door being forced open then closed, or\na service going offline then reappearing later.\n\nStateless alarms are always inactive:  `active` will be false.  Stateful alarms will\nhave `active` true between being raised and restored.\n\nAn operator cannot process (dismiss) an active alarm without the 'Force process'\nprivilege.\n"},"division":{"type":"object","description":"The division entity representing the division of the alarm. GET the href for full details.","properties":{"href":{"type":"string","format":"uri-reference"}}},"event":{"type":"object","description":"A block containing a link (\"href\") to the details page of this alarm's event.  Useful if\nyou want an alarm's related items.\n\nThis mirrors an event's `alarm` field, which comes the other way.\n\nAdded in 8.90.  Not returned by default - you need to ask for it using the `fields` query parameter.\n","properties":{"href":{"type":"string","format":"uri-reference","description":"Link to the event page for this alarm.  GET it for the fields found on an event\nthat are not on an alarm.\n"}}},"notePresets":{"type":"array","items":{"type":"string"},"description":"Preset alarm notes to use for this specific alarm. Missing if the alarm does not have specific notes; in this case the client should fall back to the server defaults."},"view":{"type":"object","description":"POST an alarm update request JSON object to the href to indicate the operator has viewed\nthe alarm.\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"comment":{"type":"object","description":"POST an alarm update request JSON object to the href to place an arbitrary alarm note\nagainst the alarm.\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"acknowledge":{"type":"object","description":"POST an alarm update request JSON object to the href to acknowledge an alarm. Missing if\nthe system has mandatory alarm notes on for this alarm, or if the alarm is already\nacknowledged.\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"acknowledgeWithComment":{"type":"object","description":"POST an alarm update request JSON object to the href to acknowledge an alarm and place an\nalarm note against it.  Missing if the alarm is already acknowledged.\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"process":{"type":"object","description":"POST an alarm update request JSON object to the href to process an alarm. Missing if the\nsystem has mandatory alarm notes on for this alarm.  Missing if the alarm cannot be\nprocessed (if it is active, for example).\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"processWithComment":{"type":"object","description":"POST an alarm update request JSON object to the href to process an alarm and place an\nalarm note against it.  Missing if the alarm cannot be processed (if it is active, for\nexample).\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"forceProcess":{"type":"object","description":"POST an alarm update request JSON object to this href to process an active alarm.  Missing\nif the alarm is not active (in which case you will have `process` and `processWithComment`\nlinks instead).\n\nThis action can take a comment in the body.  In fact an explanation is recommended since\nforce-processing an alarm is unusual.\n","properties":{"href":{"type":"string","format":"uri-reference"}}}}}}},"paths":{"/api/alarms/updates":{"get":{"tags":["Alarms"],"summary":"Get changes to alarms (or wait)","description":"This is a long poll for live updates to alarms.  If alarms occurred or changed since the\nprevious call, no matter how long ago that was, it will return them immediately.  If there\nare no updates pending, it will wait until one arrives.  If none arrive before a timeout\npasses (about 30 seconds) it will return an empty `updates` array and a fresh `next` link.\n\nWhether or not the response contained updates the client should follow the `next` link to\nwait for the next updates.\n\nIf your server receives a lot of alarm updates, wait some time between calls to reduce\nchatter.  You will not miss any alarms:  each response contains all the alarms that happened\nsince the previous call, even if an operator processed the alarms in question.\n\nYou will receive each alarm only once in a result set, in its current state.  For example if\nan alarm is raised, restored, acknowledged, then processed between two of your API calls you\nwill receive it as 'processed' in your next call.  If, however, you make API calls between\neach of the alarm's state changes you will receive it four times:  active, inactive and\nunacknowledged, acknowledged, then finally processed.\n\nDo not wait if you receive 100 updates or more.  100 is the maximum number of updates\ncurrent versions of CC will return in one batch, so if that happens you have fallen behind:\nthere are more updates waiting and you can catch up by asking for them immediately.\n\nCommand Centre does not tell you which alarms were added, removed, or modified. It is up to\nyou to match the incoming alarms against your own internal alarm list and determine the\ndifferences.\n\nDo not code this URL into your application.  Take it from `alarms.updates.href` in the\nresults of `GET /api`, or from `updates` in the results of `GET /api/alarms`, or from `next`\nin the results of this call.  Do not attempt to interpret or set the `id` query parameter in\nthe URL, as it tracks your progress through the alarm history.\n\nAssuming you got the URL for this call from the response from another call, and your\noperator therefore has the privileges required to view alarms, this should always complete\nsuccessfully.\n","parameters":[{"$ref":"#/components/parameters/alarmfields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlarmUpdates"}}}},"403":{"description":"The site does not have a RESTEvents licence."}}}}}}
```

## Get details of an alarm

> Full details for an alarm. Follow the \`href\` in the alarm summary to get here.

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Alarms","description":"\nUse these methods to download, monitor, and manage Command Centre alarms.\n\n## Alarm states\n\nEach type of alarm can be stateless or stateful.  Stateless alarm types are spikes, such as an\noperator getting their password wrong or a cardholder being denied at a door.  Stateful alarms\nhave a triggering event and a restoring event, such as a door being forced open then closed, or\na service going offline then reappearing later.\n\nAn operator cannot process (dismiss) an active alarm without the 'Force process' privilege.\n\nThe API presents the difference in a field called `active`.  It will always be false for\nstateless alarms, and it will be true for stateful alarms before their restoring event occurs.\n\n## Alarm use cases\n\n### Downloading and managing unprocessed alarms\n1. `GET /api`\n2. Follow the link at `features.alarms.alarms` [↪](alarms#get-api-alarms).  You will\n   receive up to 100 alarms, each containing links to its management functions.\n3. If step 2 returned results and there is a link at `next.href`, follow it and\n   repeat.\n\n### Staying up to date\n\nAfter getting all the current alarms using the process above, which is following `next.href` in\na loop until there are no more alarms to get, follow the link at `updates.href`.  It will block\nuntil there is a new alarm or a change to an existing alarm.  After handling that update, follow\nthe link it contains at `next.href` and keep following it in a loop to stay up to date.\n\n## Licensing\n\n* The GETs that collect alarms and events require the RESTEvents licence.\n"}],"servers":[{"url":"https://127.0.0.1:8904"}],"security":[{"API_key":[]},{"basic":[]}],"components":{"securitySchemes":{"API_key":{"type":"apiKey","name":"Authorization","in":"header","description":"\nClients authenticate by including a pre-shared API key in the `Authorization` header of each\nrequest after an authorisation method of `GGL-API-KEY`:\n\n`Authorization: GGL-API-KEY C774-B01F-D695-AA4B-215F-A158-AC22-ADEB`\n\nFor a fuller description see [API authentication](api-authentication).\n"},"basic":{"type":"http","scheme":"basic","description":"This is HTTP Basic authentication using a blank username and the API key as the password.\n\nExample:  `Authorization: Basic OkM3NzQtQjAxRi1ENjk1LUFBNEItMjE1Ri1BMTU4LUFDMjItQURFQg==`\n\nThat example is equivalent to the example in the description of the api_Key method:\nprepending a colon to the API key beginning with `C774` then encoding it into Base64\nproduces the 56 characters beginning with `OkM3`.\n\nThe colon is a separator between a username, which is blank in our case, and the password,\nwhich is our API key.\n\nFor a fuller description see [API authentication](api-authentication)\n"}},"parameters":{"alarmid":{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An internal identifier.  Do not insert this into your request yourself.  Instead you should\nget the URL of this call from an alarm summary or detail.\n"},"alarmfields":{"name":"fields","in":"query","explode":false,"required":false,"schema":{"type":"string","enum":["href","id","time","message","source","type","eventType","priority","state","active","division","notePresets","view","comment","acknowledgeWithComment","acknowledge","processWithComment","process","details","history","instruction","cardholder","event"]},"description":"Sets the fields you want in your results of an alarm GET.  Separate fields with commas.\n\nNew to 8.40.\n"}},"schemas":{"AlarmDetail":{"title":"Alarm detail","description":"[/api/alarms/{id}](alarms#get-api-alarms-id-) returns one of these.  It contains\neverything from the alarm summary results, plus some extra fields that are too expensive to\ncompute and return for large result sets.\n","allOf":[{"type":"object","properties":{"details":{"type":"string","description":"The full alarm details text.  This may be up to 2048 UTF-8 characters, each of which\ncould (theoretically) be four bytes long.\n"},"history":{"type":"array","description":"An array of alarm history entries.  Missing if there is no history.","items":{"$ref":"#/components/schemas/AlarmHistoryEntry"}},"instruction":{"type":"object","description":"GET the href it contains to retrieve the alarm instruction body inside an HTML document.\n\nIn 9.10 and later you can request the instruction's name using the query parameter\n`fields=instruction.name`.  If you want the href as well, add `,instruction.href`.\n\nMissing if there is no alarm instruction for this alarm.\n","properties":{"href":{"type":"string","format":"uri-reference"},"name":{"type":"string"}}},"cardholder":{"type":"object","description":"The cardholder entity associated with this alarm. GET the href for full details. Missing if this alarm does not have an associated cardholder.","properties":{"href":{"type":"string","format":"uri-reference"},"name":{"type":"string","description":"In versions up to and including 8.10 this is the current name of the cardholder.\nIn 8.20 it is the name of the cardholder at the time of the event.\n"},"firstName":{"type":"string","description":"The current value of the firstName field of this cardholder.  Added in 8.20."},"lastName":{"type":"string","description":"The current value of the lastName field of this cardholder.  Added in 8.20."}}}}},{"$ref":"#/components/schemas/AlarmSummary"}]},"AlarmHistoryEntry":{"title":"Alarm history entry","type":"object","properties":{"time":{"type":"string","description":"The time the history entry was added."},"action":{"type":"string","description":"The type of the history entry.","enum":["legacy","comment","acknowledge","process","acknowledgeActive","escalated","viewed"]},"comment":{"type":"string","description":"The added comment, or a textual description of some occurrence related to the alarm."},"operator":{"type":"object","description":"The operator that created the history event."}}},"AlarmSummary":{"title":"Alarm summary","description":"`/api/alarms` returns an array of these, and `/api/alarms/{id}` returns one with more fields.","type":"object","properties":{"href":{"type":"string","format":"uri-reference","description":"A link to the details of this alarm, also usable as an identifier.  It is not globally\nunique but it is unique to the site and, barring a database restore, it will not be\nrecycled by another event or alarm.\n"},"id":{"type":"string","description":"An alphanumeric identifier for this alarm, unique to the site but not across sites.\nOnce allocated, an ID is not re-used except after totally resetting the server's state\nby restoring the database.\n"},"time":{"type":"string","description":"The time the alarm occurred."},"message":{"type":"string","description":"The alarm's message."},"source":{"type":"object","description":"The ID and href are new to 8.10.","properties":{"id":{"type":"string","description":"The alphanumeric ID of the alarm's source item.\n"},"name":{"type":"string","description":"The name of the alarm's source item at the time of the event."},"href":{"type":"string","format":"uri-reference","description":"Link to the source item."}}},"type":{"type":"string","description":"The name of this alarm's event type.\n\nDeprecated in favour of the `eventType` block.\n"},"eventType":{"type":"object","description":"ID and name of the event's or alarm's type.  There is a long list of them at\n[/events/groups](events#get-api-events-groups).\n\nUnlike the `type` field, this has the same format in an event as it does in an alarm.\n\nAdded in 8.90.  Because it is a new field, it does not appear by default.  Ask for it using\nthe `fields` parameter.\n"},"priority":{"type":"integer","description":"Numeric priority.  9 is critical and 0 is not an event.","minimum":0,"maximum":9},"state":{"type":"string","description":"The state of the alarm.  Alarms start at \"unacknowledged\".","enum":["unacknowledged","acknowledged","processed"]},"active":{"type":"boolean","description":"Alarms can be stateless or stateful.  Stateless alarm types are spikes:  an operator\ngetting their password wrong or a cardholder being denied at a door.  Stateful alarms\nhave a triggering event and a restoring event:  a door being forced open then closed, or\na service going offline then reappearing later.\n\nStateless alarms are always inactive:  `active` will be false.  Stateful alarms will\nhave `active` true between being raised and restored.\n\nAn operator cannot process (dismiss) an active alarm without the 'Force process'\nprivilege.\n"},"division":{"type":"object","description":"The division entity representing the division of the alarm. GET the href for full details.","properties":{"href":{"type":"string","format":"uri-reference"}}},"event":{"type":"object","description":"A block containing a link (\"href\") to the details page of this alarm's event.  Useful if\nyou want an alarm's related items.\n\nThis mirrors an event's `alarm` field, which comes the other way.\n\nAdded in 8.90.  Not returned by default - you need to ask for it using the `fields` query parameter.\n","properties":{"href":{"type":"string","format":"uri-reference","description":"Link to the event page for this alarm.  GET it for the fields found on an event\nthat are not on an alarm.\n"}}},"notePresets":{"type":"array","items":{"type":"string"},"description":"Preset alarm notes to use for this specific alarm. Missing if the alarm does not have specific notes; in this case the client should fall back to the server defaults."},"view":{"type":"object","description":"POST an alarm update request JSON object to the href to indicate the operator has viewed\nthe alarm.\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"comment":{"type":"object","description":"POST an alarm update request JSON object to the href to place an arbitrary alarm note\nagainst the alarm.\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"acknowledge":{"type":"object","description":"POST an alarm update request JSON object to the href to acknowledge an alarm. Missing if\nthe system has mandatory alarm notes on for this alarm, or if the alarm is already\nacknowledged.\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"acknowledgeWithComment":{"type":"object","description":"POST an alarm update request JSON object to the href to acknowledge an alarm and place an\nalarm note against it.  Missing if the alarm is already acknowledged.\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"process":{"type":"object","description":"POST an alarm update request JSON object to the href to process an alarm. Missing if the\nsystem has mandatory alarm notes on for this alarm.  Missing if the alarm cannot be\nprocessed (if it is active, for example).\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"processWithComment":{"type":"object","description":"POST an alarm update request JSON object to the href to process an alarm and place an\nalarm note against it.  Missing if the alarm cannot be processed (if it is active, for\nexample).\n","properties":{"href":{"type":"string","format":"uri-reference"}}},"forceProcess":{"type":"object","description":"POST an alarm update request JSON object to this href to process an active alarm.  Missing\nif the alarm is not active (in which case you will have `process` and `processWithComment`\nlinks instead).\n\nThis action can take a comment in the body.  In fact an explanation is recommended since\nforce-processing an alarm is unusual.\n","properties":{"href":{"type":"string","format":"uri-reference"}}}}}},"responses":{"404alarm":{"description":"That is not the href of an alarm or you do not have privileges for it."}}},"paths":{"/api/alarms/{id}":{"get":{"tags":["Alarms"],"summary":"Get details of an alarm","description":"Full details for an alarm. Follow the `href` in the alarm summary to get here.","parameters":[{"$ref":"#/components/parameters/alarmid"},{"$ref":"#/components/parameters/alarmfields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlarmDetail"}}}},"404":{"$ref":"#/components/responses/404alarm"}}}}}}
```

## Mark alarm viewed

> Mark the alarm as viewed.  Follow the \`view\` link in the alarm summary to get here.\
> \
> You can do this for an alarm in any state, even processed, provided you have its URL and\
> sufficient privilege.<br>

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Alarms","description":"\nUse these methods to download, monitor, and manage Command Centre alarms.\n\n## Alarm states\n\nEach type of alarm can be stateless or stateful.  Stateless alarm types are spikes, such as an\noperator getting their password wrong or a cardholder being denied at a door.  Stateful alarms\nhave a triggering event and a restoring event, such as a door being forced open then closed, or\na service going offline then reappearing later.\n\nAn operator cannot process (dismiss) an active alarm without the 'Force process' privilege.\n\nThe API presents the difference in a field called `active`.  It will always be false for\nstateless alarms, and it will be true for stateful alarms before their restoring event occurs.\n\n## Alarm use cases\n\n### Downloading and managing unprocessed alarms\n1. `GET /api`\n2. Follow the link at `features.alarms.alarms` [↪](alarms#get-api-alarms).  You will\n   receive up to 100 alarms, each containing links to its management functions.\n3. If step 2 returned results and there is a link at `next.href`, follow it and\n   repeat.\n\n### Staying up to date\n\nAfter getting all the current alarms using the process above, which is following `next.href` in\na loop until there are no more alarms to get, follow the link at `updates.href`.  It will block\nuntil there is a new alarm or a change to an existing alarm.  After handling that update, follow\nthe link it contains at `next.href` and keep following it in a loop to stay up to date.\n\n## Licensing\n\n* The GETs that collect alarms and events require the RESTEvents licence.\n"}],"servers":[{"url":"https://127.0.0.1:8904"}],"security":[{"API_key":[]},{"basic":[]}],"components":{"securitySchemes":{"API_key":{"type":"apiKey","name":"Authorization","in":"header","description":"\nClients authenticate by including a pre-shared API key in the `Authorization` header of each\nrequest after an authorisation method of `GGL-API-KEY`:\n\n`Authorization: GGL-API-KEY C774-B01F-D695-AA4B-215F-A158-AC22-ADEB`\n\nFor a fuller description see [API authentication](api-authentication).\n"},"basic":{"type":"http","scheme":"basic","description":"This is HTTP Basic authentication using a blank username and the API key as the password.\n\nExample:  `Authorization: Basic OkM3NzQtQjAxRi1ENjk1LUFBNEItMjE1Ri1BMTU4LUFDMjItQURFQg==`\n\nThat example is equivalent to the example in the description of the api_Key method:\nprepending a colon to the API key beginning with `C774` then encoding it into Base64\nproduces the 56 characters beginning with `OkM3`.\n\nThe colon is a separator between a username, which is blank in our case, and the password,\nwhich is our API key.\n\nFor a fuller description see [API authentication](api-authentication)\n"}},"parameters":{"alarmid":{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An internal identifier.  Do not insert this into your request yourself.  Instead you should\nget the URL of this call from an alarm summary or detail.\n"}},"requestBodies":{"AlarmUpdateRequest":{"description":"Optional comment.\n","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"string","description":"Optional for some methods that update alarms.  Contains a comment placed by the\noperator.\n"}}}}}}},"responses":{"404alarm":{"description":"That is not the href of an alarm or you do not have privileges for it."}}},"paths":{"/api/alarms/{id}/view":{"post":{"tags":["Alarms"],"summary":"Mark alarm viewed","description":"Mark the alarm as viewed.  Follow the `view` link in the alarm summary to get here.\n\nYou can do this for an alarm in any state, even processed, provided you have its URL and\nsufficient privilege.\n","parameters":[{"$ref":"#/components/parameters/alarmid"}],"requestBody":{"$ref":"#/components/requestBodies/AlarmUpdateRequest"},"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/404alarm"}}}}}}
```

## Add a comment to an alarm

> Follow the \`comment\` link in the alarm summary to get here.\
> \
> You can comment on an alarm in any state, even processed, provided you have its URL and\
> sufficient privilege.<br>

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Alarms","description":"\nUse these methods to download, monitor, and manage Command Centre alarms.\n\n## Alarm states\n\nEach type of alarm can be stateless or stateful.  Stateless alarm types are spikes, such as an\noperator getting their password wrong or a cardholder being denied at a door.  Stateful alarms\nhave a triggering event and a restoring event, such as a door being forced open then closed, or\na service going offline then reappearing later.\n\nAn operator cannot process (dismiss) an active alarm without the 'Force process' privilege.\n\nThe API presents the difference in a field called `active`.  It will always be false for\nstateless alarms, and it will be true for stateful alarms before their restoring event occurs.\n\n## Alarm use cases\n\n### Downloading and managing unprocessed alarms\n1. `GET /api`\n2. Follow the link at `features.alarms.alarms` [↪](alarms#get-api-alarms).  You will\n   receive up to 100 alarms, each containing links to its management functions.\n3. If step 2 returned results and there is a link at `next.href`, follow it and\n   repeat.\n\n### Staying up to date\n\nAfter getting all the current alarms using the process above, which is following `next.href` in\na loop until there are no more alarms to get, follow the link at `updates.href`.  It will block\nuntil there is a new alarm or a change to an existing alarm.  After handling that update, follow\nthe link it contains at `next.href` and keep following it in a loop to stay up to date.\n\n## Licensing\n\n* The GETs that collect alarms and events require the RESTEvents licence.\n"}],"servers":[{"url":"https://127.0.0.1:8904"}],"security":[{"API_key":[]},{"basic":[]}],"components":{"securitySchemes":{"API_key":{"type":"apiKey","name":"Authorization","in":"header","description":"\nClients authenticate by including a pre-shared API key in the `Authorization` header of each\nrequest after an authorisation method of `GGL-API-KEY`:\n\n`Authorization: GGL-API-KEY C774-B01F-D695-AA4B-215F-A158-AC22-ADEB`\n\nFor a fuller description see [API authentication](api-authentication).\n"},"basic":{"type":"http","scheme":"basic","description":"This is HTTP Basic authentication using a blank username and the API key as the password.\n\nExample:  `Authorization: Basic OkM3NzQtQjAxRi1ENjk1LUFBNEItMjE1Ri1BMTU4LUFDMjItQURFQg==`\n\nThat example is equivalent to the example in the description of the api_Key method:\nprepending a colon to the API key beginning with `C774` then encoding it into Base64\nproduces the 56 characters beginning with `OkM3`.\n\nThe colon is a separator between a username, which is blank in our case, and the password,\nwhich is our API key.\n\nFor a fuller description see [API authentication](api-authentication)\n"}},"parameters":{"alarmid":{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An internal identifier.  Do not insert this into your request yourself.  Instead you should\nget the URL of this call from an alarm summary or detail.\n"}},"requestBodies":{"AlarmUpdateRequest":{"description":"Optional comment.\n","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"string","description":"Optional for some methods that update alarms.  Contains a comment placed by the\noperator.\n"}}}}}}},"responses":{"404alarm":{"description":"That is not the href of an alarm or you do not have privileges for it."}}},"paths":{"/api/alarms/{id}/comment":{"post":{"tags":["Alarms"],"summary":"Add a comment to an alarm","description":"Follow the `comment` link in the alarm summary to get here.\n\nYou can comment on an alarm in any state, even processed, provided you have its URL and\nsufficient privilege.\n","parameters":[{"$ref":"#/components/parameters/alarmid"}],"requestBody":{"$ref":"#/components/requestBodies/AlarmUpdateRequest"},"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/404alarm"}}}}}}
```

## Mark alarm acknowledged

> Follow the \`acknowledgeWithComment\` or the \`acknowledge\` link in the alarm summary to get\
> here.\
> \
> You can acknowledge an alarm that is in any state provided you have its URL and sufficient\
> privilege.  Doing so will add an entry to the alarm's history, but will have no other effect\
> if it is already acknowledged or processed.<br>

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Alarms","description":"\nUse these methods to download, monitor, and manage Command Centre alarms.\n\n## Alarm states\n\nEach type of alarm can be stateless or stateful.  Stateless alarm types are spikes, such as an\noperator getting their password wrong or a cardholder being denied at a door.  Stateful alarms\nhave a triggering event and a restoring event, such as a door being forced open then closed, or\na service going offline then reappearing later.\n\nAn operator cannot process (dismiss) an active alarm without the 'Force process' privilege.\n\nThe API presents the difference in a field called `active`.  It will always be false for\nstateless alarms, and it will be true for stateful alarms before their restoring event occurs.\n\n## Alarm use cases\n\n### Downloading and managing unprocessed alarms\n1. `GET /api`\n2. Follow the link at `features.alarms.alarms` [↪](alarms#get-api-alarms).  You will\n   receive up to 100 alarms, each containing links to its management functions.\n3. If step 2 returned results and there is a link at `next.href`, follow it and\n   repeat.\n\n### Staying up to date\n\nAfter getting all the current alarms using the process above, which is following `next.href` in\na loop until there are no more alarms to get, follow the link at `updates.href`.  It will block\nuntil there is a new alarm or a change to an existing alarm.  After handling that update, follow\nthe link it contains at `next.href` and keep following it in a loop to stay up to date.\n\n## Licensing\n\n* The GETs that collect alarms and events require the RESTEvents licence.\n"}],"servers":[{"url":"https://127.0.0.1:8904"}],"security":[{"API_key":[]},{"basic":[]}],"components":{"securitySchemes":{"API_key":{"type":"apiKey","name":"Authorization","in":"header","description":"\nClients authenticate by including a pre-shared API key in the `Authorization` header of each\nrequest after an authorisation method of `GGL-API-KEY`:\n\n`Authorization: GGL-API-KEY C774-B01F-D695-AA4B-215F-A158-AC22-ADEB`\n\nFor a fuller description see [API authentication](api-authentication).\n"},"basic":{"type":"http","scheme":"basic","description":"This is HTTP Basic authentication using a blank username and the API key as the password.\n\nExample:  `Authorization: Basic OkM3NzQtQjAxRi1ENjk1LUFBNEItMjE1Ri1BMTU4LUFDMjItQURFQg==`\n\nThat example is equivalent to the example in the description of the api_Key method:\nprepending a colon to the API key beginning with `C774` then encoding it into Base64\nproduces the 56 characters beginning with `OkM3`.\n\nThe colon is a separator between a username, which is blank in our case, and the password,\nwhich is our API key.\n\nFor a fuller description see [API authentication](api-authentication)\n"}},"parameters":{"alarmid":{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An internal identifier.  Do not insert this into your request yourself.  Instead you should\nget the URL of this call from an alarm summary or detail.\n"}},"requestBodies":{"AlarmUpdateRequest":{"description":"Optional comment.\n","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"string","description":"Optional for some methods that update alarms.  Contains a comment placed by the\noperator.\n"}}}}}}},"responses":{"404alarm":{"description":"That is not the href of an alarm or you do not have privileges for it."}}},"paths":{"/api/alarms/{id}/acknowledge":{"post":{"tags":["Alarms"],"summary":"Mark alarm acknowledged","description":"Follow the `acknowledgeWithComment` or the `acknowledge` link in the alarm summary to get\nhere.\n\nYou can acknowledge an alarm that is in any state provided you have its URL and sufficient\nprivilege.  Doing so will add an entry to the alarm's history, but will have no other effect\nif it is already acknowledged or processed.\n","parameters":[{"$ref":"#/components/parameters/alarmid"}],"requestBody":{"$ref":"#/components/requestBodies/AlarmUpdateRequest"},"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/404alarm"}}}}}}
```

## Mark alarm processed

> Follow the \`processWithComment\`, \`forceProcess\`, or \`process\` link in the alarm to get here.\
> \
> You can process an alarm that is in any state provided you have its URL and sufficient\
> privilege.  Doing so will add an entry to the alarm's history, but will have no other effect\
> if it is already acknowledged or processed.  If the alarm is active -- waiting for another\
> event to restore it (such as a 'door open too long' waiting for the door to close) -- it\
> will perform a force process.<br>

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Alarms","description":"\nUse these methods to download, monitor, and manage Command Centre alarms.\n\n## Alarm states\n\nEach type of alarm can be stateless or stateful.  Stateless alarm types are spikes, such as an\noperator getting their password wrong or a cardholder being denied at a door.  Stateful alarms\nhave a triggering event and a restoring event, such as a door being forced open then closed, or\na service going offline then reappearing later.\n\nAn operator cannot process (dismiss) an active alarm without the 'Force process' privilege.\n\nThe API presents the difference in a field called `active`.  It will always be false for\nstateless alarms, and it will be true for stateful alarms before their restoring event occurs.\n\n## Alarm use cases\n\n### Downloading and managing unprocessed alarms\n1. `GET /api`\n2. Follow the link at `features.alarms.alarms` [↪](alarms#get-api-alarms).  You will\n   receive up to 100 alarms, each containing links to its management functions.\n3. If step 2 returned results and there is a link at `next.href`, follow it and\n   repeat.\n\n### Staying up to date\n\nAfter getting all the current alarms using the process above, which is following `next.href` in\na loop until there are no more alarms to get, follow the link at `updates.href`.  It will block\nuntil there is a new alarm or a change to an existing alarm.  After handling that update, follow\nthe link it contains at `next.href` and keep following it in a loop to stay up to date.\n\n## Licensing\n\n* The GETs that collect alarms and events require the RESTEvents licence.\n"}],"servers":[{"url":"https://127.0.0.1:8904"}],"security":[{"API_key":[]},{"basic":[]}],"components":{"securitySchemes":{"API_key":{"type":"apiKey","name":"Authorization","in":"header","description":"\nClients authenticate by including a pre-shared API key in the `Authorization` header of each\nrequest after an authorisation method of `GGL-API-KEY`:\n\n`Authorization: GGL-API-KEY C774-B01F-D695-AA4B-215F-A158-AC22-ADEB`\n\nFor a fuller description see [API authentication](api-authentication).\n"},"basic":{"type":"http","scheme":"basic","description":"This is HTTP Basic authentication using a blank username and the API key as the password.\n\nExample:  `Authorization: Basic OkM3NzQtQjAxRi1ENjk1LUFBNEItMjE1Ri1BMTU4LUFDMjItQURFQg==`\n\nThat example is equivalent to the example in the description of the api_Key method:\nprepending a colon to the API key beginning with `C774` then encoding it into Base64\nproduces the 56 characters beginning with `OkM3`.\n\nThe colon is a separator between a username, which is blank in our case, and the password,\nwhich is our API key.\n\nFor a fuller description see [API authentication](api-authentication)\n"}},"parameters":{"alarmid":{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An internal identifier.  Do not insert this into your request yourself.  Instead you should\nget the URL of this call from an alarm summary or detail.\n"}},"requestBodies":{"AlarmUpdateRequest":{"description":"Optional comment.\n","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"string","description":"Optional for some methods that update alarms.  Contains a comment placed by the\noperator.\n"}}}}}}},"responses":{"404alarm":{"description":"That is not the href of an alarm or you do not have privileges for it."}}},"paths":{"/api/alarms/{id}/process":{"post":{"tags":["Alarms"],"summary":"Mark alarm processed","description":"Follow the `processWithComment`, `forceProcess`, or `process` link in the alarm to get here.\n\nYou can process an alarm that is in any state provided you have its URL and sufficient\nprivilege.  Doing so will add an entry to the alarm's history, but will have no other effect\nif it is already acknowledged or processed.  If the alarm is active -- waiting for another\nevent to restore it (such as a 'door open too long' waiting for the door to close) -- it\nwill perform a force process.\n","parameters":[{"$ref":"#/components/parameters/alarmid"}],"requestBody":{"$ref":"#/components/requestBodies/AlarmUpdateRequest"},"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/404alarm"}}}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.security.gallagher.com/knowledge-hub/developer/rest-api/alarms.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
