Bulk delete repository custom patterns
Bulk deletes secret scanning custom patterns for a repository.
OAuth app tokens and personal access tokens (classic) need the repo or security_events scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the public_repo scope instead.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The account owner of the repository. The name is not case sensitive.
The name of the repository without the .git extension. The name is not case sensitive.
Request Body required
Section titled “ Request Body required ”object
The list of custom patterns to delete.
A custom pattern to delete in a bulk operation.
object
The ID of the custom pattern to delete.
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.
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.
Examples
{ "patterns": [ { "pattern_id": 2, "custom_pattern_version": "0ujsswThIGTUYm2K8FjOOfXtY1K" } ]}Responses
Section titled “ Responses ”All patterns deleted successfully.
Bad Request
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Scim Error
object
Example generated
{ "message": "example", "documentation_url": "example", "detail": "example", "status": 1, "scimType": "example", "schemas": [ "example" ]}Forbidden
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Precondition Failed
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}