# @atlassian/bitbucket-server

> Bitbucket Server API client for Browser and Node.js

Latest version **0.0.6** (published 2019-07-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @atlassian/bitbucket-server
pnpm add @atlassian/bitbucket-server
yarn add @atlassian/bitbucket-server
bun add @atlassian/bitbucket-server
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2019-07-10 |
| First published | 2019-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 201.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Atlassian |
| Maintainers | aahmed, atlassian_fabric_elements, atlassian-aui, cdarroch, cwhittington, dboyd, dmorrow, doklovic, dwalker, jameslnewell, jhoarau, jvdl, macku, mdejongh, mstaas, mszczepanski, prkb, raqystyle, shnooshnoo |
| Keywords | bitbucket-server, api-client, rest |

## Links

- npm: https://www.npmjs.com/package/@atlassian/bitbucket-server
- Repository: https://bitbucket.org/atlassianlabs/bitbucket-server
- Issues: https://bitbucket.org/atlassianlabs/bitbucket-server/issues
- npm.io page: https://npm.io/package/@atlassian/bitbucket-server

## Dependencies (6)

- [debug](https://npm.io/package/debug.md) ^3.1.0
- [btoa-lite](https://npm.io/package/btoa-lite.md) ^1.0.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.1.2
- [url-template](https://npm.io/package/url-template.md) ^2.0.8
- [is-plain-object](https://npm.io/package/is-plain-object.md) ^2.0.4
- [before-after-hook](https://npm.io/package/before-after-hook.md) ^1.1.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

- 0.0.6 (latest) — 2019-07-10
- 0.0.5 — 2019-07-08
- 0.0.4 — 2019-07-01
- 0.0.3 — 2019-06-26
- 0.0.2 — 2019-06-11
- 0.0.1 — 2019-06-11

## README

# bitbucket-server.js

Bitbucket Server API client for Browser and Node.js

This is a port of the excellent bitbucket library by Munif Tanjim:
[https://github.com/MunifTanjim/node-bitbucket](https://github.com/MunifTanjim/node-bitbucket)

Bitbucket Server API docs: [https://docs.atlassian.com/bitbucket-server/rest/latest/bitbucket-rest.html](https://docs.atlassian.com/bitbucket-server/rest/latest/bitbucket-rest.html)

## Installation

via **npm**:

```sh
$ npm install @atlassian/bitbucket-server --save
```

via **yarn**:

```sh
$ yarn add @atlassian/bitbucket-server
```

## Usage

### Node

```js
const BitbucketServer = require('@atlassian/bitbucket-server')

const BitbucketServer = new BitbucketServer()
```

#### Client Options

You can set the APIs' `baseUrl` and modify some behaviors (e.g. request timeout etc.) by passing a clientOptions object to the `BitbucketServer` constructor.

```js
const clientOptions = {
  baseUrl: 'https://<server base url>',
  headers: {},
  options: {
    timeout: 10
  }
}

const client = new BitbucketServer(clientOptions)
```

This enables you to use the client with Bitbucket Server.

#### Authentication

Basic
```js
client.authenticate({
  type: 'basic',
  username: 'username',
  password: 'password'
})
```
OAuth
```js
client.authenticate({
  type: 'token',
  token: 'access token'
})
```

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