All URIs are relative to https://elements.local
Method | HTTP request | Description |
---|---|---|
GetAlert | GET /api/2/alerts/{id} | |
GetAllAlerts | GET /api/2/alerts | |
GetTelegrafStats | GET /api/2/telegraf-stats | |
PatchAlert | PATCH /api/2/alerts/{id} | |
SubmitKapacitorAlert | POST /api/2/alerts/submit | |
UpdateAlert | PUT /api/2/alerts/{id} |
Alert GetAlert (int id)
using System.Collections.Generic;
using System.Diagnostics;
using ElementsSDK.Api;
using ElementsSDK.Client;
using ElementsSDK.Model;
namespace Example
{
public class GetAlertExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://elements.local";
// Configure API key authorization: Bearer
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new StatusApi(config);
var id = 56; // int | A unique integer value identifying this alert.
try
{
Alert result = apiInstance.GetAlert(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling StatusApi.GetAlert: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | A unique integer value identifying this alert. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<Alert> GetAllAlerts (string isOpen = null, decimal? id = null, string ordering = null, int? limit = null, int? offset = null)
using System.Collections.Generic;
using System.Diagnostics;
using ElementsSDK.Api;
using ElementsSDK.Client;
using ElementsSDK.Model;
namespace Example
{
public class GetAllAlertsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://elements.local";
// Configure API key authorization: Bearer
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new StatusApi(config);
var isOpen = isOpen_example; // string | Filter the returned list by `is_open`. (optional)
var id = 8.14; // decimal? | Filter the returned list by `id`. (optional)
var ordering = ordering_example; // string | Which field to use when ordering the results. (optional)
var limit = 56; // int? | Number of results to return per page. (optional)
var offset = 56; // int? | The initial index from which to return the results. (optional)
try
{
List<Alert> result = apiInstance.GetAllAlerts(isOpen, id, ordering, limit, offset);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling StatusApi.GetAllAlerts: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
isOpen | string | Filter the returned list by `is_open`. | [optional] |
id | decimal? | Filter the returned list by `id`. | [optional] |
ordering | string | Which field to use when ordering the results. | [optional] |
limit | int? | Number of results to return per page. | [optional] |
offset | int? | The initial index from which to return the results. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void GetTelegrafStats ()
using System.Collections.Generic;
using System.Diagnostics;
using ElementsSDK.Api;
using ElementsSDK.Client;
using ElementsSDK.Model;
namespace Example
{
public class GetTelegrafStatsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://elements.local";
// Configure API key authorization: Bearer
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new StatusApi(config);
try
{
apiInstance.GetTelegrafStats();
}
catch (ApiException e)
{
Debug.Print("Exception when calling StatusApi.GetTelegrafStats: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | No body | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Alert PatchAlert (int id, AlertPartialUpdate alertPartialUpdate)
using System.Collections.Generic;
using System.Diagnostics;
using ElementsSDK.Api;
using ElementsSDK.Client;
using ElementsSDK.Model;
namespace Example
{
public class PatchAlertExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://elements.local";
// Configure API key authorization: Bearer
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new StatusApi(config);
var id = 56; // int | A unique integer value identifying this alert.
var alertPartialUpdate = new AlertPartialUpdate(); // AlertPartialUpdate |
try
{
Alert result = apiInstance.PatchAlert(id, alertPartialUpdate);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling StatusApi.PatchAlert: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | A unique integer value identifying this alert. | |
alertPartialUpdate | AlertPartialUpdate |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void SubmitKapacitorAlert (KapacitorAlert kapacitorAlert)
using System.Collections.Generic;
using System.Diagnostics;
using ElementsSDK.Api;
using ElementsSDK.Client;
using ElementsSDK.Model;
namespace Example
{
public class SubmitKapacitorAlertExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://elements.local";
// Configure API key authorization: Bearer
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new StatusApi(config);
var kapacitorAlert = new KapacitorAlert(); // KapacitorAlert |
try
{
apiInstance.SubmitKapacitorAlert(kapacitorAlert);
}
catch (ApiException e)
{
Debug.Print("Exception when calling StatusApi.SubmitKapacitorAlert: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
kapacitorAlert | KapacitorAlert |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | No body | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Alert UpdateAlert (int id, Alert alert)
using System.Collections.Generic;
using System.Diagnostics;
using ElementsSDK.Api;
using ElementsSDK.Client;
using ElementsSDK.Model;
namespace Example
{
public class UpdateAlertExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://elements.local";
// Configure API key authorization: Bearer
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new StatusApi(config);
var id = 56; // int | A unique integer value identifying this alert.
var alert = new Alert(); // Alert |
try
{
Alert result = apiInstance.UpdateAlert(id, alert);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling StatusApi.UpdateAlert: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | A unique integer value identifying this alert. | |
alert | Alert |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]