All URIs are relative to https://name.eliona.io/v2
Method | HTTP request | Description |
---|---|---|
DeleteAlarmById | Delete /alarms/{alarm-rule-id} | Removes an alarm |
GetAlarmById | Get /alarms/{alarm-rule-id} | Information about alarm |
GetAlarmHistoryById | Get /alarms-history/{alarm-rule-id} | Information about alarm history |
GetAlarms | Get /alarms | Information about alarms |
GetAlarmsHistory | Get /alarms-history | Information about alarms history |
GetHighestAlarms | Get /alarms-highest | Information about most prioritized alarms |
ListenAlarm | Get /alarm-listener | WebSocket connection for alarm changes |
PatchAlarmById | Patch /alarms/{alarm-rule-id} | Update alarm |
PutAlarm | Put /alarms | Create or update an alarm |
DeleteAlarmById(ctx, alarmRuleId).Execute()
Removes an alarm
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
alarmRuleId := int32(4711) // int32 | The id of the alarm rule
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AlarmsAPI.DeleteAlarmById(context.Background(), alarmRuleId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlarmsAPI.DeleteAlarmById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
alarmRuleId | int32 | The id of the alarm rule |
Other parameters are passed through a pointer to a apiDeleteAlarmByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Alarm GetAlarmById(ctx, alarmRuleId).Expansions(expansions).Execute()
Information about alarm
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
alarmRuleId := int32(4711) // int32 | The id of the alarm rule
expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AlarmsAPI.GetAlarmById(context.Background(), alarmRuleId).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlarmsAPI.GetAlarmById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAlarmById`: Alarm
fmt.Fprintf(os.Stdout, "Response from `AlarmsAPI.GetAlarmById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
alarmRuleId | int32 | The id of the alarm rule |
Other parameters are passed through a pointer to a apiGetAlarmByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
expansions | []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Alarm GetAlarmHistoryById(ctx, alarmRuleId).Expansions(expansions).Execute()
Information about alarm history
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
alarmRuleId := int32(4711) // int32 | The id of the alarm rule
expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AlarmsAPI.GetAlarmHistoryById(context.Background(), alarmRuleId).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlarmsAPI.GetAlarmHistoryById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAlarmHistoryById`: []Alarm
fmt.Fprintf(os.Stdout, "Response from `AlarmsAPI.GetAlarmHistoryById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
alarmRuleId | int32 | The id of the alarm rule |
Other parameters are passed through a pointer to a apiGetAlarmHistoryByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
expansions | []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Alarm GetAlarms(ctx).ProjectId(projectId).Expansions(expansions).Execute()
Information about alarms
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
projectId := "projectId_example" // string | Filter for a specific project (optional)
expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AlarmsAPI.GetAlarms(context.Background()).ProjectId(projectId).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlarmsAPI.GetAlarms``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAlarms`: []Alarm
fmt.Fprintf(os.Stdout, "Response from `AlarmsAPI.GetAlarms`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetAlarmsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
projectId | string | Filter for a specific project | |
expansions | []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Alarm GetAlarmsHistory(ctx).ProjectId(projectId).Expansions(expansions).Execute()
Information about alarms history
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
projectId := "projectId_example" // string | Filter for a specific project (optional)
expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AlarmsAPI.GetAlarmsHistory(context.Background()).ProjectId(projectId).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlarmsAPI.GetAlarmsHistory``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAlarmsHistory`: []Alarm
fmt.Fprintf(os.Stdout, "Response from `AlarmsAPI.GetAlarmsHistory`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetAlarmsHistoryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
projectId | string | Filter for a specific project | |
expansions | []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Alarm GetHighestAlarms(ctx).ProjectId(projectId).Expansions(expansions).Execute()
Information about most prioritized alarms
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
projectId := "projectId_example" // string | Filter for a specific project (optional)
expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AlarmsAPI.GetHighestAlarms(context.Background()).ProjectId(projectId).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlarmsAPI.GetHighestAlarms``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetHighestAlarms`: []Alarm
fmt.Fprintf(os.Stdout, "Response from `AlarmsAPI.GetHighestAlarms`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetHighestAlarmsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
projectId | string | Filter for a specific project | |
expansions | []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AlarmListen ListenAlarm(ctx).Execute()
WebSocket connection for alarm changes
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AlarmsAPI.ListenAlarm(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlarmsAPI.ListenAlarm``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListenAlarm`: AlarmListen
fmt.Fprintf(os.Stdout, "Response from `AlarmsAPI.ListenAlarm`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListenAlarmRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PatchAlarmById(ctx, alarmRuleId).Acknowledged(acknowledged).AcknowledgeText(acknowledgeText).Execute()
Update alarm
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
alarmRuleId := int32(4711) // int32 | The id of the alarm rule
acknowledged := true // bool | Marks the alarm as acknowledged or not acknowledged by setting the acknowledge timestamp to now or to null.
acknowledgeText := "acknowledgeText_example" // string | Sets the text for acknowledgement if acknowledged is set to true (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AlarmsAPI.PatchAlarmById(context.Background(), alarmRuleId).Acknowledged(acknowledged).AcknowledgeText(acknowledgeText).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlarmsAPI.PatchAlarmById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
alarmRuleId | int32 | The id of the alarm rule |
Other parameters are passed through a pointer to a apiPatchAlarmByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
acknowledged | bool | Marks the alarm as acknowledged or not acknowledged by setting the acknowledge timestamp to now or to null. | acknowledgeText | string | Sets the text for acknowledgement if acknowledged is set to true |
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Alarm PutAlarm(ctx).Alarm(alarm).Execute()
Create or update an alarm
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
alarm := *openapiclient.NewAlarm(int32(123), map[string]interface{}({})) // Alarm |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AlarmsAPI.PutAlarm(context.Background()).Alarm(alarm).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlarmsAPI.PutAlarm``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutAlarm`: Alarm
fmt.Fprintf(os.Stdout, "Response from `AlarmsAPI.PutAlarm`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPutAlarmRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
alarm | Alarm |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]