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

# Redactions

A *redaction* is a process that removes one cardholder's personal information from Command Centre. There are two kinds of redaction:

An *event* redaction disconnects a cardholder from events that record an operation that affected that cardholder. Examples:

* an operator created the cardholder,
* an operator changed the value of one of the cardholder's PDFs,
* an operator changed the cardholder's access group memberships, or
* the cardholder moved through a door.

An event redaction does not affect a cardholder's history (visible in the enterprise clients).

A *cardholder information* redaction is absolute. It clears all the data held against the item. After being redacted a cardholder has nothing that can identify it: no names and no PDFs.

The only way back from a redaction is a database restore.

Because redactions can take some time, and should not be allowed to run immediately for security reasons, API clients can only schedule a redaction to occur at a future date. After doing that you can check the progress of redactions, and cancel them.

Exactly how far in the future a redaction needs to be depends on the site configuration.

There are two ways to list redactions: via their own paginated interface, which returns all the redactions in the system that your operator has the permission to view, or in the cardholder record.

### Performance

In early tests with SQL Server and Command Centre on a Core i5, event redactions took roughly one second per 1000 affected events. Logs and events generated when a redaction completes contain statistics you could use to calculate your own redaction rate, but expect them to vary with the other demands on the database at the time.

## Search redactions

> This returns all cardholders' redactions.  Paginated.<br>

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Redactions","description":"A _redaction_ is a process that removes one cardholder's personal information from Command\nCentre.  There are two kinds of redaction:\n\nAn _event_ redaction disconnects a cardholder from events that record an operation that affected\nthat cardholder.  Examples:\n\n- an operator created the cardholder,\n\n- an operator changed the value of one of the cardholder's PDFs,\n\n- an operator changed the cardholder's access group memberships, or\n\n- the cardholder moved through a door.\n\nAn event redaction does not affect a cardholder's history (visible in the enterprise clients).\n\nA _cardholder information_ redaction is absolute.  It clears all the data held against the item.\nAfter being redacted a cardholder has nothing that can identify it:  no names and no PDFs.\n\nThe only way back from a redaction is a database restore.\n\nBecause redactions can take some time, and should not be allowed to run immediately for security\nreasons, API clients can only schedule a redaction to occur at a future date.  After doing that\nyou can check the progress of redactions, and cancel them.\n\nExactly how far in the future a redaction needs to be depends on the site configuration.\n\nThere are two ways to list redactions:  via their own paginated interface, which returns all the\nredactions in the system that your operator has the permission to view, or in the cardholder\nrecord.\n\n## Performance\n\nIn early tests with SQL Server and Command Centre on a Core i5, event redactions took roughly\none second per 1000 affected events.  Logs and events generated when a redaction completes\ncontain statistics you could use to calculate your own redaction rate, but expect them to vary\nwith the other demands on the database at the time.\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":{"pos":{"name":"pos","in":"query","required":false,"schema":{"type":"integer"},"description":"Reserved for internal use.  You may see it in URLs you receive from the server, but you must never add it yourself."}},"schemas":{"Redaction":{"description":"An array of these comes from `GET /cardholders/redactions`.\n","allOf":[{"$ref":"#/components/schemas/CardholderRedaction"},{"type":"object","properties":{"cardholder":{"type":"object","description":"The href of the cardholder whose events or item this redaction should affect.\n\nRequired.\n"},"finished":{"type":"string","description":"When the redaction finished.\n\nWill be missing from pending redactions.\n","format":"date-time"},"message":{"type":"string","description":"Translated string from the redaction's error code.  Will be absent if empty, or if the\nredaction is pending or complete.\n"},"details":{"type":"string","description":"A more detailed description of what went wrong.\n\nNot translated.  Will be absent if empty, or if the redaction is pending or complete.\n"}}}]},"CardholderRedaction":{"title":"Cardholder redaction","description":"These appear in an array in a cardholder object.  Each describes a redaction scheduled for the\ncardholder.\n\nA cardholder can have multiple event redactions pending, because they can operate on events\nfrom different periods, but since a cardholder redaction removes the cardholder item there\ncan be only one.\n","properties":{"href":{"type":"string","format":"uri-reference","description":"DELETE this URL to cancel this redaction.\n\nDELETE is the only verb you can use on this URL.  GET will always return a 404.\n"},"type":{"type":"string","enum":["normalEvents","cardholder"],"description":"Whether this redaction is for cardholder events or cardholder information.\n"},"when":{"description":"When the redaction is meant to happen.  This should be in the future.  If it is in the past,\nthe service returns 400-Bad Request Invalid Start Time.\n\nOptional.  If it is absent, it means to do it asap.\n","type":"string","format":"date-time"},"before":{"description":"For event redactions, do not redact any events after this time.  No effect on cardholder\ninformation redactions.\n\nOptional.\n","type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","inProgress","cancelled","done","failed"],"description":"The status of this redaction.\n"},"redactionOperator":{"description":"A block containing the href and current name of the operator who scheduled the redaction.\n","type":"object"}}}}},"paths":{"/api/cardholders/redactions":{"get":{"tags":["Redactions"],"summary":"Search redactions","description":"This returns all cardholders' redactions.  Paginated.\n","parameters":[{"name":"cardholder","in":"query","description":"Limits the results to redactions to cardholders with these IDs.  Separate with commas.\n","schema":{"type":"string"}},{"name":"status","in":"query","description":"Limits the results to redactions with this status.  Separate with commas.\n","schema":{"type":"string","enum":["pending","inProgress","cancelled","done","failed"]}},{"name":"type","in":"query","description":"Limits the results to redactions of this type.  Separate with commas.\n","schema":{"type":"string","enum":["normalEvents","cardholder"]}},{"name":"after","in":"query","description":"Limits the results to redactions that were scheduled to occur after this time.\n","schema":{"type":"string","format":"date-time"}},{"name":"before","in":"query","description":"Limits the results to redactions that were scheduled to occur before this time.\n","schema":{"type":"string","format":"date-time"}},{"name":"fields","in":"query","description":"Specifies the fields you want in the results.\n\nTreat the string matches as case sensitive.\n","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["before cardholder finishTime href redactionOperator status type when"]}}},{"$ref":"#/components/parameters/pos"}],"responses":{"200":{"description":"An array of redactions, and a link to the next page if any.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Redaction"}},"next":{"type":"object","properties":{"href":{"type":"string","format":"uri-reference"}}}}}}}},"403":{"description":"The site does not have the RESTCardholders licence."}}}}}}
```

## Schedule a redaction

> Schedules a cardholder redaction.<br>

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Redactions","description":"A _redaction_ is a process that removes one cardholder's personal information from Command\nCentre.  There are two kinds of redaction:\n\nAn _event_ redaction disconnects a cardholder from events that record an operation that affected\nthat cardholder.  Examples:\n\n- an operator created the cardholder,\n\n- an operator changed the value of one of the cardholder's PDFs,\n\n- an operator changed the cardholder's access group memberships, or\n\n- the cardholder moved through a door.\n\nAn event redaction does not affect a cardholder's history (visible in the enterprise clients).\n\nA _cardholder information_ redaction is absolute.  It clears all the data held against the item.\nAfter being redacted a cardholder has nothing that can identify it:  no names and no PDFs.\n\nThe only way back from a redaction is a database restore.\n\nBecause redactions can take some time, and should not be allowed to run immediately for security\nreasons, API clients can only schedule a redaction to occur at a future date.  After doing that\nyou can check the progress of redactions, and cancel them.\n\nExactly how far in the future a redaction needs to be depends on the site configuration.\n\nThere are two ways to list redactions:  via their own paginated interface, which returns all the\nredactions in the system that your operator has the permission to view, or in the cardholder\nrecord.\n\n## Performance\n\nIn early tests with SQL Server and Command Centre on a Core i5, event redactions took roughly\none second per 1000 affected events.  Logs and events generated when a redaction completes\ncontain statistics you could use to calculate your own redaction rate, but expect them to vary\nwith the other demands on the database at the time.\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"}},"requestBodies":{"RedactionPOST":{"description":"POST one of these to schedule a redaction.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedactionPOST"}}}}},"schemas":{"RedactionPOST":{"title":"Redaction POST","description":"POST one of these to schedule a redaction.\n","required":["cardholder","type"],"allOf":[{"$ref":"#/components/schemas/RedactionCommonFields"},{"type":"object","properties":{"when":{"type":"string","description":"When the redaction is meant to happen.  This should be in the future.  If it is in the\npast, the service returns a 400.\n\nOptional.  If it is absent, it means to do it asap.\n","format":"date-time"}}}]},"RedactionCommonFields":{"title":"Redaction shared fields","description":"These fields are common to redaction POSTs and GETs.\n","properties":{"cardholder":{"type":"object","description":"The href of the cardholder whose events or item this redaction should affect.\n\nRequired.\n"},"type":{"type":"string","enum":["normalEvents","cardholder"],"description":"Whether this redaction is for events or cardholder information.\n\nRequired.\n"},"before":{"type":"string","description":"For event redactions, do not redact any events after this time.  No effect on cardholder\ninformation redactions.\n\nOptional.\n","format":"date-time"}}}}},"paths":{"/api/cardholders/redactions":{"post":{"tags":["Redactions"],"summary":"Schedule a redaction","description":"Schedules a cardholder redaction.\n","requestBody":{"$ref":"#/components/requestBodies/RedactionPOST"},"responses":{"201":{"description":"Success."},"400":{"description":"The cardholder does not exist.\n"},"403":{"description":"The operator does not have permissions to redact or to delete a cardholder, \nor redactions are not enabled on the server,\nor the server is not licensed for cardholder operations.\n"}}}}}}
```

## Cancel a redaction

> This deletes a redaction record.  It must be pending.  Take the URL from the results of a\
> redaction search.\
> \
> Note that the only way to modify a redaction is to delete it and create a new one for the\
> same cardholder.  This is due to concerns about a redaction's effect on auditing.<br>

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Redactions","description":"A _redaction_ is a process that removes one cardholder's personal information from Command\nCentre.  There are two kinds of redaction:\n\nAn _event_ redaction disconnects a cardholder from events that record an operation that affected\nthat cardholder.  Examples:\n\n- an operator created the cardholder,\n\n- an operator changed the value of one of the cardholder's PDFs,\n\n- an operator changed the cardholder's access group memberships, or\n\n- the cardholder moved through a door.\n\nAn event redaction does not affect a cardholder's history (visible in the enterprise clients).\n\nA _cardholder information_ redaction is absolute.  It clears all the data held against the item.\nAfter being redacted a cardholder has nothing that can identify it:  no names and no PDFs.\n\nThe only way back from a redaction is a database restore.\n\nBecause redactions can take some time, and should not be allowed to run immediately for security\nreasons, API clients can only schedule a redaction to occur at a future date.  After doing that\nyou can check the progress of redactions, and cancel them.\n\nExactly how far in the future a redaction needs to be depends on the site configuration.\n\nThere are two ways to list redactions:  via their own paginated interface, which returns all the\nredactions in the system that your operator has the permission to view, or in the cardholder\nrecord.\n\n## Performance\n\nIn early tests with SQL Server and Command Centre on a Core i5, event redactions took roughly\none second per 1000 affected events.  Logs and events generated when a redaction completes\ncontain statistics you could use to calculate your own redaction rate, but expect them to vary\nwith the other demands on the database at the time.\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"}}},"paths":{"/api/cardholders/redactions":{"delete":{"tags":["Redactions"],"summary":"Cancel a redaction","description":"This deletes a redaction record.  It must be pending.  Take the URL from the results of a\nredaction search.\n\nNote that the only way to modify a redaction is to delete it and create a new one for the\nsame cardholder.  This is due to concerns about a redaction's effect on auditing.\n","responses":{"201":{"description":"Success."},"403":{"description":"The operator does not have permissions to redact or to delete a cardholder, \nor the server is not licensed for cardholder operations.\n"},"404":{"description":"No such redaction, or your operator cannot see it.\n"}}}}}}
```


---

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