> 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.md).

# Command Centre REST API

The Command Centre REST API lets your system read from and write to Command Centre over HTTPS.

### Before you start <a href="#user-content-before-you-start" id="user-content-before-you-start"></a>

You need four things in place before your first call. Your Command Centre administrator usually sets these up.

<table><thead><tr><th width="262">You need</th><th>How to get it</th></tr></thead><tbody><tr><td><strong>The right licences</strong></td><td>The API is licensed in five editions: Events &#x26; Alarms, Cardholders, View Status, Overrides, and Create Events &#x26; Alarms. The server returns <code>403</code> for any call you are not licensed for. See <a href="https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/interface-options/api/representational-state-transfer-rest-api/rest-api-features">REST API features</a>.</td></tr><tr><td><strong>A REST Client and API key</strong></td><td>Created in the Configuration Client. See <a href="https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/interface-options/api/representational-state-transfer-rest-api/rest-api-setting-up-rest-api-in-command-center">Setting up REST API in Command Centre</a>.</td></tr><tr><td><strong>A REST operator</strong></td><td>The API acts with that operator's privileges, so give it only what your integration needs. See <a href="https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/interface-options/api/representational-state-transfer-rest-api/rest-api-create-rest-operator">Create a REST operator</a>.</td></tr><tr><td><strong>Certificates</strong></td><td>A client certificate is strongly recommended. See <a href="https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/interface-options/api/representational-state-transfer-rest-api/rest-api-certificates">REST API certificates</a>.</td></tr></tbody></table>

### Make your first call <a href="#user-content-make-your-first-call" id="user-content-make-your-first-call"></a>

Send your API key in the `Authorization` header, prefixed with `GGL-API-KEY` and a space. Start at the API root. It returns links to everything else your licences and operator allow.

{% code overflow="wrap" %}

```bash
curl https://<your-server>:8904/api -H "Authorization: GGL-API-KEY <your-api-key>"
```

{% endcode %}

{% hint style="info" %}
Follow the links the API returns rather than building URLs yourself. Your integration will keep working when routes change between versions. See [Forward compatibility (HATEOAS)](https://help.security.gallagher.com/knowledge-hub/developer/rest-api/forward-compatibility-hateoas).
{% endhint %}

If the call fails, see [REST API connection](https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/interface-options/api/representational-state-transfer-rest-api/rest-api-connection) and [REST API logs](https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/interface-options/api/representational-state-transfer-rest-api/rest-api-logs).

### Find what you need <a href="#user-content-find-what-you-need" id="user-content-find-what-you-need"></a>

| Area                         | What it covers                                                                                                | Start here                                                                                                                                                                                                                                                                              |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Alarms, events and items** | Download, monitor and create events. Monitor and manage alarms. Search items and subscribe to status changes. | [Events](https://help.security.gallagher.com/knowledge-hub/developer/rest-api/events), [Alarms](https://help.security.gallagher.com/knowledge-hub/developer/rest-api/alarms), [Items](https://help.security.gallagher.com/knowledge-hub/developer/rest-api/items)                       |
| **Cardholders**              | Manage cardholders, their cards, access groups, roles, competencies and lockers.                              | [Cardholders](https://help.security.gallagher.com/knowledge-hub/developer/rest-api/cardholders), [Cardholder change tracking](https://help.security.gallagher.com/knowledge-hub/developer/rest-api/cardholder-change-tracking)                                                          |
| **Status and overrides**     | Monitor and override doors, access zones, alarm zones, fence zones, inputs, outputs, macros and more.         | [Doors](https://help.security.gallagher.com/knowledge-hub/developer/rest-api/doors), [Access Zones](https://help.security.gallagher.com/knowledge-hub/developer/rest-api/access-zones), [Alarm Zones](https://help.security.gallagher.com/knowledge-hub/developer/rest-api/alarm-zones) |
| **PIV cards**                | Work with PIV and PIV-I cards.                                                                                | [PIV cards](https://help.security.gallagher.com/knowledge-hub/developer/rest-api/piv-cards)                                                                                                                                                                                             |

Every page is listed in the menu on the left. Data structures are on the [Models](https://help.security.gallagher.com/knowledge-hub/developer/rest-api/models) page.

### Good to know <a href="#user-content-good-to-know" id="user-content-good-to-know"></a>

* **What's new:** each Command Centre release can change the API. Check the [Changelog](https://help.security.gallagher.com/knowledge-hub/developer/rest-api/changelog), especially for potentially breaking changes.
* **Operator privileges:** what the API returns depends on your REST operator's privileges and divisions. See [Operator privileges](https://help.security.gallagher.com/knowledge-hub/developer/rest-api/operator-privileges).
* **Sample code:** Command Centre install media includes Visual Studio sample projects in the `Utilities/REST API` folder. Run them against a development server, never production.
* **No inbound firewall ports?** The [Cloud API Gateway](https://help.security.gallagher.com/knowledge-hub/products/cloud-services/cloud-api-gateway) lets you reach the REST API without opening ports.
* **Download the spec:** the full OpenAPI specification is available from the link at the bottom of the menu.

### Get help <a href="#user-content-get-help" id="user-content-get-help"></a>

For questions about the API or this documentation, contact `interfaces@security.gallagher.com`.


---

# 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.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.
