How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

GitHub Restrictions API

The Restrictions API from GitHub — 4 operation(s) for restrictions.

GitHub Restrictions API is one of 350 APIs that GitHub publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

Tagged areas include Restrictions. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an AsyncAPI specification, and an API reference.

This API exposes 11 operations across 4 paths, and defines 13 schemas. It is described by OpenAPI 3.2.0, at version 1.1.4.

Requests are made against 2 base URLs: {protocol}://{hostname}/api/v3, {protocol}://{hostname}.

11 operations 4 paths 13 schemas 4 DELETE1 GET3 POST3 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
1.1.4
Base URL
https://api.github.com
Authentication
HTTP Bearer
License
Terms of Service
Resource Areas
1

Authentication & Security 1

GitHub Restrictions API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (bearerHttpAuthentication).

  • bearerHttpAuthentication — Bearer Token

Paths & Operations 11

Across 4 paths, the API surfaces 11 operations — 4 DELETE, 1 GET, 3 POST, 3 PUT. Each is listed below with its method, path, parameters, and response codes.

Restrictions 11
POST
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
GitHub Add App Access Restrictions
addAppAccessRestrictions 3 params body → 200422
PUT
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
GitHub Set App Access Restrictions
setAppAccessRestrictions 3 params body → 200422
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
GitHub Remove App Access Restrictions
removeAppAccessRestrictions 3 params body → 200422
GET
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions
GitHub Get Access Restrictions
getAccessRestrictions 6 params → 200404
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions
GitHub Delete Access Restrictions
deleteAccessRestrictions 6 params → 204
POST
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
GitHub Add Team Access Restrictions
addTeamAccessRestrictions 6 params body → 200422
PUT
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
GitHub Set Team Access Restrictions
setTeamAccessRestrictions 6 params body → 200422
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
GitHub Remove Team Access Restrictions
removeTeamAccessRestrictions 6 params body → 200422
POST
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
GitHub Add User Access Restrictions
addUserAccessRestrictions 6 params body → 200422
PUT
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
GitHub Set User Access Restrictions
setUserAccessRestrictions 6 params body → 200422
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
GitHub Remove User Access Restrictions
removeUserAccessRestrictions 6 params body → 200422

Schemas 13

The contract defines 13 schemas that model the data the API accepts and returns. The most detailed are nullable-simple-user_2 (21 properties), nullable-simple-user (21 properties), simple-user (21 properties), integration (17 properties). Each schema is shown below with its type and property counts.

integration
object
GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They…
17 properties 11 required
nullable-simple-user
objectnull
A GitHub user.
21 properties 18 required
validation-error
object
Validation Error
3 properties 2 required
integration_2
object
GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They…
17 properties 11 required
simple-user
object
GitHub user.
21 properties 18 required
nullable-simple-user_2
object
GitHub user.
21 properties 18 required
validation-error_2
object
Validation Error
3 properties 2 required
basic-error
object
Basic Error
4 properties
team
object
Groups of organization members that gives permissions on specified repositories.
13 properties 11 required
branch-restriction-policy
object
Branch Restriction Policy
7 properties 7 required
nullable-team-simple
object
Groups of organization members that gives permissions on specified repositories.
12 properties 10 required
team_2
object
Groups of organization members that gives permissions on specified repositories.
13 properties 11 required
nullable-team-simple_2
objectnull
Groups of organization members that gives permissions on specified repositories.
12 properties 10 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

github-restrictions-api-openapi.yml Raw ↑

Other APIs GitHub publishes across the network.

GitHub Events API
GitHub Feeds API
GitHub Gists API
GitHub Issues API
GitHub Licenses API
GitHub Markdown API
GitHub Meta API
GitHub Notifications API
GitHub Octocat API
GitHub Projects API
GitHub Repos API
GitHub Search API
Where this information came from

This is an independent, third-party profile of GitHub Restrictions API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.