Sample - GitHub REST API
GET/orgs/{org}/code-security/configurations/defaults

Get default code security configurations

Lists the default code security configurations for an organization.

The authenticated user must be an administrator or security manager for the organization to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter
orgstringrequired
The organization name. The name is not case sensitive.

4 status codes
200Response
default_for_new_reposstringoptional
The visibility of newly created repositories for which the code security configuration will be applied to by default
Allowed:publicprivate_and_internalall
configurationobjectoptional
A code security configuration
304Not modified
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 403 is returned: Forbidden. A 404 is returned: Resource not found.