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} |
open class func getAlert( id: Int) -> Promise<Alert>
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK
let id = 987 // Int | A unique integer value identifying this alert.
StatusAPI.getAlert(id: id).then {
// when the promise is fulfilled
}.always {
// regardless of whether the promise is fulfilled, or rejected
}.catch { errorType in
// when the promise is rejected
}
Name | Type | Description | Notes |
---|---|---|---|
id | Int | A unique integer value identifying this alert. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func getAllAlerts( isOpen: String? = nil, id: Double? = nil, ordering: String? = nil, limit: Int? = nil, offset: Int? = nil) -> Promise<[Alert]>
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK
let isOpen = "isOpen_example" // String | Filter the returned list by `is_open`. (optional)
let id = 987 // Double | Filter the returned list by `id`. (optional)
let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional)
let limit = 987 // Int | Number of results to return per page. (optional)
let offset = 987 // Int | The initial index from which to return the results. (optional)
StatusAPI.getAllAlerts(isOpen: isOpen, id: id, ordering: ordering, limit: limit, offset: offset).then {
// when the promise is fulfilled
}.always {
// regardless of whether the promise is fulfilled, or rejected
}.catch { errorType in
// when the promise is rejected
}
Name | Type | Description | Notes |
---|---|---|---|
isOpen | String | Filter the returned list by `is_open`. | [optional] |
id | Double | 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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func getTelegrafStats() -> Promise<Void>
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK
StatusAPI.getTelegrafStats().then {
// when the promise is fulfilled
}.always {
// regardless of whether the promise is fulfilled, or rejected
}.catch { errorType in
// when the promise is rejected
}
This endpoint does not need any parameter.
Void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func patchAlert( id: Int, alertPartialUpdate: AlertPartialUpdate) -> Promise<Alert>
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK
let id = 987 // Int | A unique integer value identifying this alert.
let alertPartialUpdate = AlertPartialUpdate(name: "name_example", message: "message_example", level: "level_example", isOpen: false, closedAt: Date()) // AlertPartialUpdate |
StatusAPI.patchAlert(id: id, alertPartialUpdate: alertPartialUpdate).then {
// when the promise is fulfilled
}.always {
// regardless of whether the promise is fulfilled, or rejected
}.catch { errorType in
// when the promise is rejected
}
Name | Type | Description | Notes |
---|---|---|---|
id | Int | A unique integer value identifying this alert. | |
alertPartialUpdate | AlertPartialUpdate |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func submitKapacitorAlert( kapacitorAlert: KapacitorAlert) -> Promise<Void>
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK
let kapacitorAlert = KapacitorAlert(id: "id_example", level: "level_example", message: "message_example", details: "details_example", data: "TODO") // KapacitorAlert |
StatusAPI.submitKapacitorAlert(kapacitorAlert: kapacitorAlert).then {
// when the promise is fulfilled
}.always {
// regardless of whether the promise is fulfilled, or rejected
}.catch { errorType in
// when the promise is rejected
}
Name | Type | Description | Notes |
---|---|---|---|
kapacitorAlert | KapacitorAlert |
Void (empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func updateAlert( id: Int, alert: Alert) -> Promise<Alert>
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK
let id = 987 // Int | A unique integer value identifying this alert.
let alert = Alert(id: 123, name: "name_example", message: "message_example", level: "level_example", isOpen: false, node: StorageNodeMini(id: 123, name: "name_example", address: "address_example", type: 123), openedAt: Date(), closedAt: Date(), duration: "duration_example") // Alert |
StatusAPI.updateAlert(id: id, alert: alert).then {
// when the promise is fulfilled
}.always {
// regardless of whether the promise is fulfilled, or rejected
}.catch { errorType in
// when the promise is rejected
}
Name | Type | Description | Notes |
---|---|---|---|
id | Int | A unique integer value identifying this alert. | |
alert | Alert |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]