Octokit plugin for GitHub Enterprise Server REST APIs
npm install @octokit/plugin-enterprise-server> Octokit plugin for GitHub Enterprise Server REST APIs


@octokit/rest and the @octokit/plugin-rest-endpoint-methods plugin it's using internally do not include methods for Enterprise Administration as they do not exist on https://api.github.com. This plugin adds endpoint methods for every GitHub Enterprise Server version that is currently supported.
Besides the admin-specific endpoints, there are differences between api.github.com and each GitHub Enterprise Server version. Instead of loading @octokit/plugin-rest-endpoint-methods you can optionally add all endpoint methods for each GitHub Enterprise Server version, including the admin endpoints.
Browsers | Load `` |
|---|---|
Node | Install with npm install @octokit/core @octokit/plugin-enterprise-server ` |
`js
const OctokitEnterprise12 = Octokit.plugin(enterpriseServer316Admin);
const octokit = new OctokitEnterprise316({
auth: "secret123",
baseUrl: "https://github.acme-inc.com/api/v3",
});
octokit.enterpriseAdmin.createUser({
username: "octocat",
email: "octocat@acme-inc.com",
});
`
The list of currently exported plugins are
- enterpriseServer313Admin
- enterpriseServer313
- enterpriseServer314Admin
- enterpriseServer314
- enterpriseServer315Admin
- enterpriseServer315
- enterpriseServer316Admin
- enterpriseServer316
The route definitions for the currently supported GitHub Enterprise versions are built automatically from @octokit/openapi. Each time there is a new @octokit/openapi release, the .github/workflows/update.yml` workflow is triggered. If an update is found, a pull request is created.