Skip to content

Latest commit

 

History

History
252 lines (165 loc) · 5.75 KB

EventsApi.md

File metadata and controls

252 lines (165 loc) · 5.75 KB

Alertmanager.EventsApi

All URIs are relative to http://localhost

Method HTTP request Description
deleteEventsParametersDelete DELETE /events/parameters/{app_key}
getEventsGet GET /events/{id}
getEventsGetAll GET /events
getEventsParametersGet GET /events/parameters
postEventsPost POST /events

deleteEventsParametersDelete

String deleteEventsParametersDelete(appKey)

Example

import Alertmanager from 'alertmanager';
let defaultClient = Alertmanager.ApiClient.instance;
// Configure API key authorization: auth_token
let auth_token = defaultClient.authentications['auth_token'];
auth_token.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//auth_token.apiKeyPrefix = 'Token';

let apiInstance = new Alertmanager.EventsApi();
let appKey = "appKey_example"; // String | 
apiInstance.deleteEventsParametersDelete(appKey, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
appKey String

Return type

String

Authorization

auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getEventsGet

EventSchema getEventsGet(id)

Example

import Alertmanager from 'alertmanager';
let defaultClient = Alertmanager.ApiClient.instance;
// Configure API key authorization: auth_token
let auth_token = defaultClient.authentications['auth_token'];
auth_token.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//auth_token.apiKeyPrefix = 'Token';

let apiInstance = new Alertmanager.EventsApi();
let id = "id_example"; // String | 
apiInstance.getEventsGet(id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
id String

Return type

EventSchema

Authorization

auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getEventsGetAll

PaginationSchema getEventsGetAll()

Example

import Alertmanager from 'alertmanager';
let defaultClient = Alertmanager.ApiClient.instance;
// Configure API key authorization: auth_token
let auth_token = defaultClient.authentications['auth_token'];
auth_token.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//auth_token.apiKeyPrefix = 'Token';

let apiInstance = new Alertmanager.EventsApi();
apiInstance.getEventsGetAll((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

PaginationSchema

Authorization

auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getEventsParametersGet

[EventSchema] getEventsParametersGet()

Example

import Alertmanager from 'alertmanager';
let defaultClient = Alertmanager.ApiClient.instance;
// Configure API key authorization: auth_token
let auth_token = defaultClient.authentications['auth_token'];
auth_token.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//auth_token.apiKeyPrefix = 'Token';

let apiInstance = new Alertmanager.EventsApi();
apiInstance.getEventsParametersGet((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

[EventSchema]

Authorization

auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

postEventsPost

EventSchema postEventsPost(opts)

Example

import Alertmanager from 'alertmanager';
let defaultClient = Alertmanager.ApiClient.instance;
// Configure API key authorization: auth_token
let auth_token = defaultClient.authentications['auth_token'];
auth_token.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//auth_token.apiKeyPrefix = 'Token';

let apiInstance = new Alertmanager.EventsApi();
let opts = {
  'requestBody': new Alertmanager.EventSchema() // EventSchema | 
};
apiInstance.postEventsPost(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
requestBody EventSchema [optional]

Return type

EventSchema

Authorization

auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json