Show:

Client for the Sentry API.

Constructor

Client
(
  • dsn
  • config
)

Defined in lib/client.js:16

Parameters:

  • dsn String

    Sentry DSN.

  • config Options

    Config

    • version Number

      Sentry API version number.

Example:

var Client = require('sentry-api').Client;

var sentry = new Client('https://abc123:@app.getsentry.com/1234', { logging: true });

sentry.projects.get('my-organization-slug', 'my-project-slug').then(function(error, project) { console.log(project.name); });

Methods

delete
(
  • path
  • callback
)
Promise

Defined in lib/client.js:175

Convenience method for making DELETE requests.

Parameters:

  • path String

    Request path.

  • callback Function

    Request callback.

Returns:

Promise
get
(
  • path
  • params
  • callback
)
Promise

Defined in lib/client.js:149

Convenience method for making GET requests.

Parameters:

  • path String

    Request path.

  • params Object

    Request query string parameters.

  • callback Function

    Request callback.

Returns:

Promise
post
(
  • path
  • body
  • callback
)
Promise

Defined in lib/client.js:162

Convenience method for making POST requests.

Parameters:

  • path String

    Request path.

  • body Object

    Request body.

  • callback Function

    Request callback.

Returns:

Promise
put
(
  • path
  • body
  • callback
)
Promise

Defined in lib/client.js:187

Convenience method for making PUT requests.

Parameters:

  • path String

    Request path.

  • body Object

    Request body.

  • callback Function

    Request callback.

Returns:

Promise
request
(
  • path
  • options
  • callback
)
Promise

Defined in lib/client.js:95

Make a request to the Sentry API.

Parameters:

  • path String

    The request path.

  • options Object

    Request options. These are the same as the request module's options.

  • callback Function

    Function to execute when the request completes.

Returns:

Promise

Properties

events

Events

Defined in lib/client.js:88

Contains methods related to Sentry Events.

organizations

Organizations

Defined in lib/client.js:67

Contains methods related to Sentry Organizations.

projects

Projects

Defined in lib/client.js:60

Contains methods related to Sentry Projects.

releases

Releases

Defined in lib/client.js:74

Contains methods related to Sentry Releases.

teams

Teams

Defined in lib/client.js:81

Contains methods related to Sentry Teams.