Skip to content

Latest commit

 

History

History
312 lines (207 loc) · 7.61 KB

ChannelsApi.md

File metadata and controls

312 lines (207 loc) · 7.61 KB

Alertmanager.ChannelsApi

All URIs are relative to http://localhost

Method HTTP request Description
deletePolicyChannelsDelete DELETE /channels/{id}
getPolicyChannelsGet GET /channels/{id}
getPolicyChannelsGetAll GET /channels
postPolicyChannelsPost POST /channels
postPolicyChannelsTest POST /channels/test
putPolicyChannelsPut PUT /channels/{id}

deletePolicyChannelsDelete

PolicyChannelSchema deletePolicyChannelsDelete(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.ChannelsApi();
let id = "id_example"; // String | 
apiInstance.deletePolicyChannelsDelete(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

PolicyChannelSchema

Authorization

auth_token

HTTP request headers

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

getPolicyChannelsGet

PolicyChannelSchema getPolicyChannelsGet(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.ChannelsApi();
let id = "id_example"; // String | 
apiInstance.getPolicyChannelsGet(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

PolicyChannelSchema

Authorization

auth_token

HTTP request headers

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

getPolicyChannelsGetAll

PaginationSchema getPolicyChannelsGetAll()

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.ChannelsApi();
apiInstance.getPolicyChannelsGetAll((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

postPolicyChannelsPost

PolicyChannelSchema postPolicyChannelsPost(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.ChannelsApi();
let opts = {
  'requestBody': new Alertmanager.PolicyChannelSchema() // PolicyChannelSchema | 
};
apiInstance.postPolicyChannelsPost(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
requestBody PolicyChannelSchema [optional]

Return type

PolicyChannelSchema

Authorization

auth_token

HTTP request headers

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

postPolicyChannelsTest

PolicyChannelSchema postPolicyChannelsTest(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.ChannelsApi();
let opts = {
  'requestBody': new Alertmanager.PolicyChannelSchema() // PolicyChannelSchema | 
};
apiInstance.postPolicyChannelsTest(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
requestBody PolicyChannelSchema [optional]

Return type

PolicyChannelSchema

Authorization

auth_token

HTTP request headers

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

putPolicyChannelsPut

PolicyChannelSchema putPolicyChannelsPut(id, 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.ChannelsApi();
let id = "id_example"; // String | 
let opts = {
  'requestBody': new Alertmanager.PolicyChannelSchema() // PolicyChannelSchema | 
};
apiInstance.putPolicyChannelsPut(id, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
id String
requestBody PolicyChannelSchema [optional]

Return type

PolicyChannelSchema

Authorization

auth_token

HTTP request headers

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