The Hydrozen API allows developers to programmatically manage monitors, projects, teams, payments, and status pages. All endpoints require Bearer authentication using an API key.
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.0.0
- Package version: 1.0.0
- Generator version: 7.21.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Import the package in a go file in your project and run go mod tidy:
import openapi "github.com/GIT_USER_ID/GIT_REPO_ID"To use a proxy, set the environment variable HTTP_PROXY:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value openapi.ContextServerIndex of type int.
ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)Templated server URL is formatted using default variables from configuration or from context value openapi.ContextServerVariables of type map[string]string.
ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{
"basePath": "v2",
})Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers map in the Configuration.
An operation is uniquely identified by "{classname}Service.{nickname}" string.
Similar rules for overriding default operation server index and variables applies by using openapi.ContextOperationServerIndices and openapi.ContextOperationServerVariables context maps.
ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})All URIs are relative to https://app.hydrozen.io/api
| Class | Method | HTTP request | Description |
|---|---|---|---|
| CustomDomainsAPI | CreateCustomDomain | Post /domains | Create custom domain |
| CustomDomainsAPI | DeleteCustomDomain | Delete /domains/{domain_id} | Delete custom domain |
| CustomDomainsAPI | GetAllCustomDomains | Get /domains | Retrieve all custom domains |
| CustomDomainsAPI | GetCustomDomain | Get /domains/{domain_id} | Retrieve one custom domain |
| CustomDomainsAPI | UpdateCustomDomain | Post /domains/{domain_id} | Update custom domain |
| DNSMonitorsAPI | DeleteDNSMonitor | Delete /dns-monitors/{id} | Delete DNS monitor |
| DNSMonitorsAPI | GetAllDNSMonitors | Get /dns-monitors | Retrieve all DNS monitors |
| DNSMonitorsAPI | GetDNSMonitor | Get /dns-monitors/{id} | Retrieve one DNS monitor |
| DomainMonitorsAPI | DomainNamesDomainNameIdDelete | Delete /domain-names/{domain_name_id} | Delete domain name monitor |
| DomainMonitorsAPI | DomainNamesDomainNameIdGet | Get /domain-names/{domain_name_id} | Retrieve one domain name monitor |
| DomainMonitorsAPI | DomainNamesDomainNameIdPost | Post /domain-names/{domain_name_id} | Update domain name monitor |
| DomainMonitorsAPI | DomainNamesGet | Get /domain-names | Retrieve all domain name monitors |
| DomainMonitorsAPI | DomainNamesPost | Post /domain-names | Create domain name monitor |
| HeartbeatMonitorsAPI | HeartbeatsGet | Get /heartbeats | Retrieve all heartbeat monitors |
| HeartbeatMonitorsAPI | HeartbeatsHeartbeatIdDelete | Delete /heartbeats/{heartbeat_id} | Delete heartbeat monitor |
| HeartbeatMonitorsAPI | HeartbeatsHeartbeatIdGet | Get /heartbeats/{heartbeat_id} | Retrieve one heartbeat monitor |
| HeartbeatMonitorsAPI | HeartbeatsHeartbeatIdPost | Post /heartbeats/{heartbeat_id} | Update heartbeat monitor |
| HeartbeatMonitorsAPI | HeartbeatsPost | Post /heartbeats | Create heartbeat monitor |
| LegacyTeamMembersAPI | DeleteTeamMemberLegacy | Delete /teams-member/{team_member_id} | Delete team member |
| LegacyTeamMembersAPI | GetAllTeamMembersLegacy | Get /teams-member | Retrieve all team members |
| LegacyTeamMembersAPI | GetTeamMemberLegacy | Get /teams-member/{team_member_id} | Retrieve one team member |
| LegacyTeamMembersAPI | UpdateTeamMemberLegacy | Post /teams-member/{team_member_id} | Update team member |
| LogsAPI | GetAllLogs | Get /logs | Retrieve all logs |
| NotificationHandlersAPI | NotificationHandlerGet | Get /notification-handler | Retrieve all notification handlers |
| NotificationHandlersAPI | NotificationHandlerNotificationHandlerIdGet | Get /notification-handler/{notification_handler_id} | Retrieve one notification handler |
| NotificationHandlersAPI | NotificationHandlersNotificationHandlerIdDelete | Delete /notification-handlers/{notification_handler_id} | Delete notification handler |
| NotificationHandlersAPI | NotificationHandlersNotificationHandlerIdPost | Post /notification-handlers/{notification_handler_id} | Update notification handler |
| NotificationHandlersAPI | NotificationHandlersPost | Post /notification-handlers | Create notification handler |
| PaymentsAPI | GetAllPayments | Get /payments | Retrieve all payments |
| PaymentsAPI | GetPayment | Get /payments/{payment_id} | Retrieve one payment |
| ProjectsAPI | CreateProject | Post /projects | Create project |
| ProjectsAPI | DeleteProject | Delete /projects/{project_id} | Delete project |
| ProjectsAPI | GetAllProjects | Get /projects | Retrieve all projects |
| ProjectsAPI | GetProject | Get /projects/{project_id} | Retrieve one project |
| ProjectsAPI | UpdateProject | Post /projects/{project_id} | Update project |
| ServerMonitorsAPI | DeleteServerMonitor | Delete /server-monitors/{server_monitor_id} | Delete server monitor |
| ServerMonitorsAPI | GetAllServerMonitors | Get /server-monitors | Retrieve all server monitors |
| ServerMonitorsAPI | GetServerMonitor | Get /server-monitors/{server_monitor_id} | Retrieve one server monitor |
| StatusPageStatisticsAPI | GetStatusPageStatistics | Get /statistics/{status_page_id} | Retrieve status page statistics |
| StatusPagesAPI | GetAllStatusPages | Get /status-pages | Retrieve all status pages |
| StatusPagesAPI | GetStatusPage | Get /status-pages/{status_page_id} | Retrieve one status page |
| TeamMembersAPI | CreateTeamMember | Post /team-members | Create team member |
| TeamMembersAPI | DeleteTeamMember | Delete /team-members/{team_member_id} | Delete team member |
| TeamMembersAPI | GetTeamMembersByTeam | Get /team-members/{team_id} | Retrieve team members |
| TeamMembersAPI | UpdateTeamMember | Post /team-members/{team_member_id} | Update team member |
| TeamsAPI | CreateTeam | Post /teams | Create team |
| TeamsAPI | DeleteTeam | Delete /teams/{team_id} | Delete team |
| TeamsAPI | GetAllTeams | Get /teams | Retrieve all teams |
| TeamsAPI | GetTeam | Get /teams/{team_id} | Retrieve one team |
| TeamsAPI | UpdateTeam | Post /teams/{team_id} | Update team |
| UptimeMonitorsAPI | MonitorsGet | Get /monitors | Retrieve all uptime monitors |
| UptimeMonitorsAPI | MonitorsPost | Post /monitors | Create uptime monitor |
| UsersAPI | GetUser | Get /user | Retrieve current user |
- CustomDomain
- DNSMonitor
- DNSMonitorDns
- DNSMonitorSettings
- DNSRecordA
- DeleteDNSMonitor200Response
- DomainMonitor
- DomainMonitorSsl
- DomainMonitorWhois
- DomainNamesDomainNameIdGet200Response
- DomainNamesGet200Response
- GetAllCustomDomains200Response
- GetAllDNSMonitors200Response
- GetAllDNSMonitors200ResponseLinks
- GetAllLogs200Response
- GetAllPayments200Response
- GetAllProjects200Response
- GetAllServerMonitors200Response
- GetAllStatusPages200Response
- GetAllTeamMembersLegacy200Response
- GetAllTeams200Response
- GetCustomDomain200Response
- GetDNSMonitor200Response
- GetPayment200Response
- GetProject200Response
- GetServerMonitor200Response
- GetStatusPage200Response
- GetStatusPageStatistics200Response
- GetTeam200Response
- GetTeamMemberLegacy200Response
- GetTeamMembersByTeam200Response
- GetUser200Response
- HeartbeatMonitor
- HeartbeatMonitorSettings
- HeartbeatsGet200Response
- HeartbeatsHeartbeatIdGet200Response
- Log
- Monitor
- MonitorNotifications
- MonitorSettings
- MonitorsGet200Response
- MonitorsGet200ResponseLinks
- MonitorsGet200ResponseMeta
- MonitorsPost201Response
- MonitorsPost201ResponseData
- NotificationHandler
- NotificationHandlerGet200Response
- NotificationHandlerNotificationHandlerIdGet200Response
- NotificationHandlerSettings
- Payment
- Project
- ServerMonitor
- ServerMonitorSettings
- StatusPage
- StatusPageSocials
- StatusPageStatistic
- Team
- TeamMember
- TeamMemberAccess
- TeamMemberDetailed
- User
- UserBilling
Authentication schemes defined for the API:
- Type: HTTP Bearer token authentication
Example
auth := context.WithValue(context.Background(), openapi.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBoolPtrIntPtrInt32PtrInt64PtrFloatPtrFloat32PtrFloat64PtrStringPtrTime