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 classes:
//import com.sematext.cloud.ApiClient;
//import com.sematext.cloud.ApiException;
//import com.sematext.cloud.Configuration;
//import com.sematext.cloud.auth.*;
//import com.sematext.cloud.client.AlertsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AlertsApi apiInstance = new AlertsApi();
AlertRule body = new AlertRule(); // AlertRule | dto
try {
AlertRuleResponse result = apiInstance.createAlertUsingPOST(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlertsApi#createAlertUsingPOST");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | AlertRule | dto |
- Content-Type: application/json
- Accept: application/json
GenericMapBasedApiResponse deleteAlertRuleUsingDELETE(updateableAlertId)
Delete alert rule
// Import classes:
//import com.sematext.cloud.ApiClient;
//import com.sematext.cloud.ApiException;
//import com.sematext.cloud.Configuration;
//import com.sematext.cloud.auth.*;
//import com.sematext.cloud.client.AlertsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AlertsApi apiInstance = new AlertsApi();
Long updateableAlertId = 789L; // Long | updateableAlertId
try {
GenericMapBasedApiResponse result = apiInstance.deleteAlertRuleUsingDELETE(updateableAlertId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlertsApi#deleteAlertRuleUsingDELETE");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
updateableAlertId | Long | updateableAlertId |
- Content-Type: Not defined
- Accept: application/json
GenericMapBasedApiResponse disableAlertRuleUsingPUT1(updateableAlertId)
Disable alert rule
// Import classes:
//import com.sematext.cloud.ApiClient;
//import com.sematext.cloud.ApiException;
//import com.sematext.cloud.Configuration;
//import com.sematext.cloud.auth.*;
//import com.sematext.cloud.client.AlertsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AlertsApi apiInstance = new AlertsApi();
Long updateableAlertId = 789L; // Long | updateableAlertId
try {
GenericMapBasedApiResponse result = apiInstance.disableAlertRuleUsingPUT1(updateableAlertId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlertsApi#disableAlertRuleUsingPUT1");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
updateableAlertId | Long | updateableAlertId |
- Content-Type: Not defined
- Accept: application/json
GenericMapBasedApiResponse enableAlertRuleUsingPUT(updateableAlertId)
Enable alert rule
// Import classes:
//import com.sematext.cloud.ApiClient;
//import com.sematext.cloud.ApiException;
//import com.sematext.cloud.Configuration;
//import com.sematext.cloud.auth.*;
//import com.sematext.cloud.client.AlertsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AlertsApi apiInstance = new AlertsApi();
Long updateableAlertId = 789L; // Long | updateableAlertId
try {
GenericMapBasedApiResponse result = apiInstance.enableAlertRuleUsingPUT(updateableAlertId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlertsApi#enableAlertRuleUsingPUT");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
updateableAlertId | Long | updateableAlertId |
- Content-Type: Not defined
- Accept: application/json
AlertRulesResponse getAlertRulesForAppUsingGET(appId)
Get alert rules for an app
// Import classes:
//import com.sematext.cloud.ApiClient;
//import com.sematext.cloud.ApiException;
//import com.sematext.cloud.Configuration;
//import com.sematext.cloud.auth.*;
//import com.sematext.cloud.client.AlertsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AlertsApi apiInstance = new AlertsApi();
Long appId = 789L; // Long | appId
try {
AlertRulesResponse result = apiInstance.getAlertRulesForAppUsingGET(appId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlertsApi#getAlertRulesForAppUsingGET");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
appId | Long | appId |
- Content-Type: Not defined
- Accept: application/json