DELETE
/repos/{owner}/{repo}/secret-scanning/custom-patternsBulk delete repository custom patterns
Bulk deletes secret scanning custom patterns for a repository.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the public_repo scope instead.
Fine-grained access tokens require the administration:write repository permission.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
patternsarray<SecretScanningCustomPatternToDelete>required
The list of custom patterns to delete.
post_delete_actionstringoptional
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.
204All patterns deleted successfully.
400Bad Request
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
412Precondition Failed
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
Error handling
A 400 is returned: Bad Request. A 403 is returned: Forbidden. A 404 is returned: Resource not found. A 412 is returned: Precondition Failed.
Was this helpful?