# rancher-connect

> Rancher REST API client for Node.js.

Latest version **1.0.12** (published 2017-08-19) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install rancher-connect
pnpm add rancher-connect
yarn add rancher-connect
bun add rancher-connect
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.12 |
| Published | 2017-08-19 |
| First published | 2017-08-18 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | David Mart |
| Maintainers | aluzino |
| Keywords | rancher, api, connect, node, wrapper, client |

## Links

- npm: https://www.npmjs.com/package/rancher-connect
- Repository: https://github.com/daviidmart/rancher-connect
- Homepage: https://github.com/daviidmart/rancher-connect#readme
- Issues: https://github.com/daviidmart/rancher-connect/issues
- npm.io page: https://npm.io/package/rancher-connect

## Dependencies (2)

- [joi](https://npm.io/package/joi.md) 10.x
- [request](https://npm.io/package/request.md) 2.x

## 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

- 1.0.12 (latest) — 2017-08-19
- 1.0.11 — 2017-08-19
- 1.0.10 — 2017-08-18
- 1.0.9 — 2017-08-18
- 1.0.8 — 2017-08-18
- 1.0.6 — 2017-08-18
- 1.0.3 — 2017-08-18
- 1.0.0 — 2017-08-18

## README

[![Greenkeeper badge](https://badges.greenkeeper.io/daviidmart/rancher-connect.svg)](https://greenkeeper.io/)
[![Known Vulnerabilities](https://snyk.io/test/github/daviidmart/rancher-connect/badge.svg)](https://snyk.io/test/github/daviidmart/rancher-connect)

# rancher-node
Node client for the Rancher API

## Client

An API client is included in this package

```js
const Rancher = require('rancher-node');

const rancher = new Rancher({ 
    url: 'https://try.rancher.com/v2-beta/projects/XXXXXXXX/', 
    access_key: 'SoMeToKeN', 
    secret_key: 'someSecRetToken' 
});

rancher.getContainer(containerId).then((container) => {
  // gets the container for the provided container id
}).catch((err)=>{
  console.error(' ERROR : ', err)
});
```

## API

### `createContainer(container)`

Creates a container

### `getContainer(containerId)`

Gets information about a specific container

### `updateContainer(container)`

Updates a container

### `stopContainer(containerId, stopParams)`

Stops a container

### `startContainer(containerId)`

Starts a container

### `restartContainer(containerId)`

Restarts a container

### `removeContainer(containerId)`

Removes a container

### `purgeContainer(containerId)`

Purges a container

### `getContainerLogs(containerId)`

Gets the container logs of a container

### `createStack(stack)`

Creates a stack

### `getStacks(query)`

Gets all stacks

### `getStack(stackId)`

Gets information about a specific stack

### `getStackServices(stackId)`

Gets the stack services of a stack

### `removeStack(stackId)`

Removes a stack

### `getPorts()`

Gets all ports

### `getHosts(query)`

Gets all hosts

### `getHost(hostId)`

Gets information about a specific host

### `deleteHost(hostId)`

Deletes a host

### `getRegistrationToken()`

Gets information about a specific registration token

### `getServices(query)`

Gets all services

### `getService(serviceId)`

Gets information about a specific service

### `getServiceStats(serviceId)`

Gets the service stats of a service

### `stopService(serviceId)`

Stops a service

### `startService(serviceId)`

Starts a service

### `restartService(serviceId, restartParams)`

Restarts a service

### `createVolume(volume)`

Creates a volume

### `getVolume(volumeId)`

Gets information about a specific volume

### `removeVolume(volumeId)`

Removes a volume

**NOTE: These docs were written by [a script](/gen-docs.js?raw=true)**

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