dotcom-monitor API
Golang API client for https://www.dotcom-monitor.com/. Only cover Device and Task, other endpoints might be added in the future.
Put the package under your project folder and add the following in import:
import "github.com/gfleury/go-dotcom-monitor"
There is an example under cmd/main.go(cmd/main.go).
All URIs are relative to https://api.dotcom-monitor.com/config_api_v1
Class | Method | HTTP request | Description |
---|---|---|---|
DeviceApi | AddDevice | Put /devices | Get device list by platform. |
DeviceApi | DeleteDevice | Delete /device/{device_id} | Get Device info. |
DeviceApi | DisableDeviceAlert | Post /device/{device_id}/DisableAlert/ | Get Device info. |
DeviceApi | EditDevice | Post /device/{device_id} | Edit device list by platform. |
DeviceApi | GetDevice | Get /device/{device_id} | Get Device info. |
DeviceApi | GetDevicesPlataform | Get /devices/{platform} | Get device list by platform. |
DeviceApi | GetTasks | Get /device/{device_id}/tasks | Get Device tasks. |
PlatformsApi | GetPlataforms | Get /platforms | Return list of available platforms |
TaskApi | AddTask | Put /tasks | Create new task. |
TaskApi | DeleteTask | Delete /task/{task_id} | Delete Task info. |
TaskApi | EditTask | Post /task/{task_id} | Edit task. |
TaskApi | GetTask | Get /task/{task_id} | Get Task info. |
TaskApi | GetTasks | Get /device/{device_id}/tasks | Get Device tasks. |
- AlertSilencePeriod
- Device
- DeviceNotifications
- DeviceNotificationsNotificationGroups
- Platform
- PlatformPackages
- Result
- Task
- TaskGetParams
- Type: User/Password
Example
basicAuth := dotcommonitor.BasicAuth{UserName: "", Password: ""}
response, _, err := client.LoginApi.Login(ctx, basicAuth)
...
r, err := client.Service.Operation(ctx, args)
George Fleury