All URIs are relative to /
| Method | HTTP request | Description |
|---|---|---|
| createAlertUsingPOST | POST /users-web/api/v3/alerts | Create alert rule |
| deleteAlertRuleUsingDELETE | DELETE /users-web/api/v3/alerts/{updateableAlertId} | Delete alert rule |
| disableAlertRuleUsingPUT1 | PUT /users-web/api/v3/alerts/{updateableAlertId}/disable | Disable alert rule |
| enableAlertRuleUsingPUT | PUT /users-web/api/v3/alerts/{updateableAlertId}/enable | Enable alert rule |
| getAlertRulesForAppUsingGET | GET /users-web/api/v3/apps/{appId}/alerts | Get alert rules for an app |
AlertRuleResponse createAlertUsingPOST(body)
Create alert rule
import {SematextApiClientJavascript} from 'sematext-api-client-javascript';
let defaultClient = SematextApiClientJavascript.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
let apiInstance = new SematextApiClientJavascript.AlertsApi();
let body = new SematextApiClientJavascript.AlertRule(); // AlertRule | dto
apiInstance.createAlertUsingPOST(body).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| body | AlertRule | dto |
- Content-Type: application/json
- Accept: application/json
GenericMapBasedApiResponse deleteAlertRuleUsingDELETE(updateableAlertId)
Delete alert rule
import {SematextApiClientJavascript} from 'sematext-api-client-javascript';
let defaultClient = SematextApiClientJavascript.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
let apiInstance = new SematextApiClientJavascript.AlertsApi();
let updateableAlertId = 789; // Number | updateableAlertId
apiInstance.deleteAlertRuleUsingDELETE(updateableAlertId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| updateableAlertId | Number | updateableAlertId |
- Content-Type: Not defined
- Accept: application/json
GenericMapBasedApiResponse disableAlertRuleUsingPUT1(updateableAlertId)
Disable alert rule
import {SematextApiClientJavascript} from 'sematext-api-client-javascript';
let defaultClient = SematextApiClientJavascript.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
let apiInstance = new SematextApiClientJavascript.AlertsApi();
let updateableAlertId = 789; // Number | updateableAlertId
apiInstance.disableAlertRuleUsingPUT1(updateableAlertId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| updateableAlertId | Number | updateableAlertId |
- Content-Type: Not defined
- Accept: application/json
GenericMapBasedApiResponse enableAlertRuleUsingPUT(updateableAlertId)
Enable alert rule
import {SematextApiClientJavascript} from 'sematext-api-client-javascript';
let defaultClient = SematextApiClientJavascript.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
let apiInstance = new SematextApiClientJavascript.AlertsApi();
let updateableAlertId = 789; // Number | updateableAlertId
apiInstance.enableAlertRuleUsingPUT(updateableAlertId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| updateableAlertId | Number | updateableAlertId |
- Content-Type: Not defined
- Accept: application/json
AlertRulesResponse getAlertRulesForAppUsingGET(appId)
Get alert rules for an app
import {SematextApiClientJavascript} from 'sematext-api-client-javascript';
let defaultClient = SematextApiClientJavascript.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
let apiInstance = new SematextApiClientJavascript.AlertsApi();
let appId = 789; // Number | appId
apiInstance.getAlertRulesForAppUsingGET(appId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| appId | Number | appId |
- Content-Type: Not defined
- Accept: application/json