# @octokit/plugin-enterprise-server

> Octokit plugin for GitHub Enterprise Server REST APIs

Latest version **20.0.0** (published 2025-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @octokit/plugin-enterprise-server
pnpm add @octokit/plugin-enterprise-server
yarn add @octokit/plugin-enterprise-server
bun add @octokit/plugin-enterprise-server
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 20.0.0 |
| Published | 2025-05-20 |
| First published | 2020-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >= 20 |
| Dependencies | 1 |
| Unpacked size | 1.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 22 |
| Author | Gregor Martynus |
| Maintainers | octokitbot |
| Keywords | octokit, github, api, rest, plugin, enterprise |

## Links

- npm: https://www.npmjs.com/package/@octokit/plugin-enterprise-server
- Repository: https://github.com/octokit/plugin-enterprise-server.js
- Homepage: https://github.com/octokit/plugin-enterprise-server.js#readme
- Issues: https://github.com/octokit/plugin-enterprise-server.js/issues
- npm.io page: https://npm.io/package/@octokit/plugin-enterprise-server

## Dependencies (1)

- [@octokit/types](https://npm.io/package/@octokit/types.md) ^14.0.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 20.0.0 (latest) — 2025-05-20
- 19.0.0-beta.2 (beta) — 2025-02-05
- 19.1.0 — 2025-04-20
- 19.0.0 — 2025-02-06
- 19.0.0-beta.1 — 2025-02-05
- 18.0.0 — 2025-02-05
- 17.3.1 — 2024-09-27
- 17.3.0 — 2024-04-29
- 17.2.0 — 2024-04-22
- 17.1.0 — 2024-04-09
- 17.0.1 — 2024-04-09
- 17.0.0 — 2024-04-09
- 16.1.0 — 2024-04-03
- 16.0.1 — 2024-03-01
- 16.0.0 — 2024-03-01
- … 83 more at https://npm.io/package/@octokit/plugin-enterprise-server/versions

## README

# plugin-enterprise-server.js

> Octokit plugin for GitHub Enterprise Server REST APIs

[![@latest](https://img.shields.io/npm/v/@octokit/plugin-enterprise-server.svg)](https://www.npmjs.com/package/@octokit/plugin-enterprise-server)
[![Build Status](https://github.com/octokit/plugin-enterprise-server.js/workflows/Test/badge.svg)](https://github.com/octokit/plugin-enterprise-server.js/actions?workflow=Test)

[`@octokit/rest`](https://github.com/octokit/rest.js/) and the [`@octokit/plugin-rest-endpoint-methods`](https://github.com/octokit/plugin-rest-endpoint-methods.js/) 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`](https://github.com/octokit/plugin-rest-endpoint-methods.js/) you can optionally add all endpoint methods for each GitHub Enterprise Server version, including the admin endpoints.

## Usage

<table>
<tbody valign=top align=left>
<tr><th>
Browsers
</th><td width=100%>

Load `@octokit/plugin-enterprise-server` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [esm.sh](https://esm.sh)

```html
<script type="module">
  import { Octokit } from "https://esm.sh/@octokit/core";
  import { enterpriseServer220Admin } from "https://esm.sh/@octokit/plugin-enterprise-server";
</script>
```

</td></tr>
<tr><th>
Node
</th><td>

Install with `npm install @octokit/core @octokit/plugin-enterprise-server`. Optionally replace `@octokit/core` with a core-compatible module

```js
import { Octokit } from "@octokit/core";
import { enterpriseServer316Admin } from "@octokit/plugin-enterprise-server";
```

</td></tr>
</tbody>
</table>

```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`](docs/ghe-313.md#admin)
- [`enterpriseServer313`](docs/ghe-313.md#others)
- [`enterpriseServer314Admin`](docs/ghe-314.md#admin)
- [`enterpriseServer314`](docs/ghe-314.md#others)
- [`enterpriseServer315Admin`](docs/ghe-315.md#admin)
- [`enterpriseServer315`](docs/ghe-315.md#others)
- [`enterpriseServer316Admin`](docs/ghe-315.md#admin)
- [`enterpriseServer316`](docs/ghe-315.md#others)

## How it works

The route definitions for the currently supported GitHub Enterprise versions are built automatically from [`@octokit/openapi`](https://github.com/octokit/openapi). Each time there is a new `@octokit/openapi` release, the [`.github/workflows/update.yml`](.github/workflows/update.yml) workflow is triggered. If an update is found, a pull request is created.

## LICENSE

[MIT](LICENSE)

---
_Source: https://npm.io/package/@octokit/plugin-enterprise-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
