API Stability Long-Term

The redactEvents() GraphQL mutation is used to redact events matching a certain query within a certain time interval. It returns the identifier of the submitted redaction task.

For more information on creating views to redact data, see the Creating a Repository or View documentation page. You may also want to look at General Settings for related information.

Syntax

Below is the syntax for the redactEvents() mutation field:

graphql
redactEvents(
     input: RedactEventsInputType!
   ): string!

Below is an example of how this mutation field might be used:

Show:
graphql
mutation {
  redactEvents(
    input: {
      repositoryName: "sandbox",
      start: "2024-11-12T03:00:00.000Z",
      end: "2024-11-12T03:15:00.000Z",
      query: "password=*",
      userMessage: "Hiding Passwords"
    }
  )
}
Example Responses
Show:
json
{
  "data": {
    "redactEvents": "N8M03lslv8UxWSlCzNmyASN1"
  }
}

Given Datatypes

For RedactEventsInputType, there are several parameters. Below is a list of them along with a description of each:

Table: RedactEventsInputType

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 19, 2024
enddatetimeyes  The end of the interval in which to perform redactions.
querystringyes  The query to use for redaction. Any event returned by this query will be removed.
repositoryNamestringyes  The name of the repository in which to redact events.
startdatetimeyes  The start of the interval from which to perform redactions.
userMessagestring   Optional message to log in the audit log for this action.