# sumologic-api-client

> SumoLogic API client

Latest version **1.1.0** (published 2017-06-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install sumologic-api-client
pnpm add sumologic-api-client
yarn add sumologic-api-client
bun add sumologic-api-client
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2017-06-24 |
| First published | 2017-05-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Konstantin Burnaev |
| Maintainers | bkon |

## Links

- npm: https://www.npmjs.com/package/sumologic-api-client
- Repository: https://github.com/bkon/sumologic-api-client
- Homepage: https://github.com/bkon/sumologic-api-client#readme
- Issues: https://github.com/bkon/sumologic-api-client/issues
- npm.io page: https://npm.io/package/sumologic-api-client

## Dependencies (4)

- [ramda](https://npm.io/package/ramda.md) ^0.23.0
- [request](https://npm.io/package/request.md) ^2.81.0
- [query-string](https://npm.io/package/query-string.md) ^4.3.4
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.4

## Recent versions

- 1.1.0 (latest) — 2017-06-24
- 1.0.0 — 2017-05-14

## README

# SumoLogic API client

Convenience wrapper (with typescript declarations) around the [Search Job API](https://help.sumologic.com/APIs/02Search_Job_API/About_the_Search_Job_API).

See also: [rx-sumologic-api-client](https://github.com/bkon/rx-sumologic-api-client) - RxJS convenience wrapper.

## Installation

Use `npm` or `yarn`:
```
npm install --save sumologic-api-client
yarn add sumologic-api-client
```

## Usage

```
import * as moment from "moment";
import * as Sumo from "sumologic-api-client";

const client = Sumo.client({
  endpoint: "https://api.au.sumologic.com/api/v1",
  sumoApiId: "SUMO_API_ID",
  sumoApiKey: "SUMO_API_KEY"
});

client
  .job({
    query: "ERROR | count",
    from: moment().subtract(1, "day").format(),
    to: moment().format(),
    timeZone: "Australia/Sydney"
  })
  .then((data) => console.log("Created job: " + data.id));

const jobId = "SAMPLE JOB ID";

client
  .status(jobId)
  .then((data) => console.log("Status: " + JSON.stringify(data)));

client
  .messages(jobId)
  .then((data) => console.log("Messages: " + JSON.stringify(data)));

client
  .records(jobId)
  .then((data) => console.log("Records: " + JSON.stringify(data)));

client
  .delete(jobId);
```

### What is the `endpoint` parameter?

See [Sumo Logic Endpoints](https://help.sumologic.com/APIs/General_API_Information/Sumo_Logic_Endpoints) for the list of endpoints you can use.

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