Skip to main content
Skip to content

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.:

Das differenzierte Token muss über den folgenden Berechtigungssatz verfügen.:

  • "Administration" organization permissions (read)

Parameter für "List organization custom patterns"

Header
Name, Typ, BESCHREIBUNG
accept string

Setting to application/vnd.github+json is recommended.

Pfadparameter
Name, Typ, BESCHREIBUNG
org string Erforderlich

The organization name. The name is not case sensitive.

Abfrageparameter
Name, Typ, BESCHREIBUNG
state string

Filter custom patterns by state. When absent, returns patterns in all states.

Kann eine der folgenden sein: published, unpublished

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: enabled, disabled

sort string

The property to sort the results by.

Standard: created

Kann eine der folgenden sein: created, updated, name

direction string

The direction to sort the results by.

Standard: desc

Kann eine der folgenden sein: asc, desc

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"

StatuscodeBESCHREIBUNG
200

OK

403

Forbidden

404

Resource not found

Codebeispiele für "List organization custom patterns"

Anforderungsbeispiel

get/orgs/{org}/secret-scanning/custom-patterns
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-patterns

Response