Skip to content

Bulk delete organization custom patterns

DELETE
/orgs/{org}/secret-scanning/custom-patterns

Bulk deletes secret scanning custom patterns for an organization.

Personal access tokens (classic) need the write:org scope to use this endpoint.

API method documentation

org
required
string

The organization name. The name is not case sensitive.

Media type application/json
object
patterns
required

The list of custom patterns to delete.

Array<object>
<= 500 items
Secret Scanning Custom Pattern To Delete

A custom pattern to delete in a bulk operation.

object
pattern_id
required

The ID of the custom pattern to delete.

integer
custom_pattern_version

The version of the entity. This is used to confirm you’re updating the current version of the entity and mitigate unintentionally overriding someone else’s update.

string
nullable
post_delete_action

What to do with alerts associated with the deleted patterns. delete_alerts permanently removes the alerts. resolve_alerts resolves the alerts as “pattern deleted”. Defaults to delete_alerts when not specified.

string
default: delete_alerts
Allowed values: delete_alerts resolve_alerts
Examples
Example default
{
"patterns": [
{
"pattern_id": 2,
"custom_pattern_version": "0ujsswThIGTUYm2K8FjOOfXtY1K"
}
]
}

All patterns deleted successfully.

Bad Request

Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Forbidden

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Precondition Failed

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}