OpenAPI is a specification for describing REST API interfaces. It describes the API without requiring access to the source code or additional documentation. The specification is both human and machine readable. For more information, see the OpenAPI specification documentation.
's OpenAPI description of the REST API is publicly available. You can find the description in the open source /rest-api-description repository.
provides both 3.0 and 3.1 OpenAPI descriptions.
For each description, there is a version for each product: Free/ Pro/ Team (api..com
), Enterprise Cloud (ghec
), and each version of Enterprise Server (ghes-X.X
).
For each product, if date-based versioning is supported, there is also a description for each date-based version. For more information, see API Versions.
Each description is available in a bundled or in a dereferenced format. The bundled format uses $ref
to refer to OpenAPI components that are shared between endpoints. The dereferenced format includes the fully expanded description.
Because the OpenAPI description is machine readable, you can use it to do things like:
- Generate libraries to facilitate using the REST API
- Validate and test an integration that uses the REST API
- Explore and interact with the REST API using third-party tools, such as Insomnia or Postman
For example, uses the OpenAPI description to generate the Octokit SDKs. also uses the OpenAPI description to generate the REST API reference documentation for each endpoint.