REST-API-Endpunkte für das geheime Scannen benutzerdefinierter Muster
Verwenden Sie die REST-API, um benutzerdefinierte Muster für die geheime Überprüfung zu verwalten.
List organization custom patterns
Lists secret scanning custom patterns for an organization.
Personal access tokens (classic) need the read:org scope to use this endpoint.
Feinkörnige Zugriffstoken für "List organization custom patterns"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub App-Benutzerzugriffstoken
- GitHub-App-Installations-Zugriffstoken
- Feingranulare persönliche Zugriffstoken
Das differenzierte Token muss über den folgenden Berechtigungssatz verfügen.:
- "Administration" organization permissions (read)
Parameter für "List organization custom patterns"
| Name, Typ, BESCHREIBUNG |
|---|
accept string Setting to |
| Name, Typ, BESCHREIBUNG |
|---|
org string ErforderlichThe organization name. The name is not case sensitive. |
| Name, Typ, BESCHREIBUNG |
|---|
state string Filter custom patterns by state. When absent, returns patterns in all states. Kann eine der folgenden sein: |
push_protection string Filter custom patterns by whether push protection is enabled. When absent, returns patterns regardless of push protection status. Kann eine der folgenden sein: |
sort string The property to sort the results by. Standard: Kann eine der folgenden sein: |
direction string The direction to sort the results by. Standard: Kann eine der folgenden sein: |
before string A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API." |
after string A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API." |
HTTP-Antwortstatuscodes für "List organization custom patterns"
| Statuscode | BESCHREIBUNG |
|---|---|
200 | OK |
403 | Forbidden |
404 | Resource not found |
Codebeispiele für "List organization custom patterns"
Anforderungsbeispiel
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/orgs/ORG/secret-scanning/custom-patternsResponse