Skip to content

hydrozenio/hydrozen-node

Repository files navigation

hydrozen_api

HydrozenApi - JavaScript client for hydrozen_api 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 SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.21.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install hydrozen_api --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your hydrozen_api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var HydrozenApi = require('hydrozen_api');

var defaultClient = HydrozenApi.ApiClient.instance;
// Configure Bearer (API Key) access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

var api = new HydrozenApi.CustomDomainsApi()
var host = "host_example"; // {String} 
var opts = {
  'customIndexUrl': "customIndexUrl_example", // {String} 
  'customNotFoundUrl': "customNotFoundUrl_example" // {String} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createCustomDomain(host, opts, callback);

Documentation for API Endpoints

All URIs are relative to https://app.hydrozen.io/api

Class Method HTTP request Description
HydrozenApi.CustomDomainsApi createCustomDomain POST /domains Create custom domain
HydrozenApi.CustomDomainsApi deleteCustomDomain DELETE /domains/{domain_id} Delete custom domain
HydrozenApi.CustomDomainsApi getAllCustomDomains GET /domains Retrieve all custom domains
HydrozenApi.CustomDomainsApi getCustomDomain GET /domains/{domain_id} Retrieve one custom domain
HydrozenApi.CustomDomainsApi updateCustomDomain POST /domains/{domain_id} Update custom domain
HydrozenApi.DNSMonitorsApi deleteDNSMonitor DELETE /dns-monitors/{id} Delete DNS monitor
HydrozenApi.DNSMonitorsApi getAllDNSMonitors GET /dns-monitors Retrieve all DNS monitors
HydrozenApi.DNSMonitorsApi getDNSMonitor GET /dns-monitors/{id} Retrieve one DNS monitor
HydrozenApi.DomainMonitorsApi domainNamesDomainNameIdDelete DELETE /domain-names/{domain_name_id} Delete domain name monitor
HydrozenApi.DomainMonitorsApi domainNamesDomainNameIdGet GET /domain-names/{domain_name_id} Retrieve one domain name monitor
HydrozenApi.DomainMonitorsApi domainNamesDomainNameIdPost POST /domain-names/{domain_name_id} Update domain name monitor
HydrozenApi.DomainMonitorsApi domainNamesGet GET /domain-names Retrieve all domain name monitors
HydrozenApi.DomainMonitorsApi domainNamesPost POST /domain-names Create domain name monitor
HydrozenApi.HeartbeatMonitorsApi heartbeatsGet GET /heartbeats Retrieve all heartbeat monitors
HydrozenApi.HeartbeatMonitorsApi heartbeatsHeartbeatIdDelete DELETE /heartbeats/{heartbeat_id} Delete heartbeat monitor
HydrozenApi.HeartbeatMonitorsApi heartbeatsHeartbeatIdGet GET /heartbeats/{heartbeat_id} Retrieve one heartbeat monitor
HydrozenApi.HeartbeatMonitorsApi heartbeatsHeartbeatIdPost POST /heartbeats/{heartbeat_id} Update heartbeat monitor
HydrozenApi.HeartbeatMonitorsApi heartbeatsPost POST /heartbeats Create heartbeat monitor
HydrozenApi.LegacyTeamMembersApi deleteTeamMemberLegacy DELETE /teams-member/{team_member_id} Delete team member
HydrozenApi.LegacyTeamMembersApi getAllTeamMembersLegacy GET /teams-member Retrieve all team members
HydrozenApi.LegacyTeamMembersApi getTeamMemberLegacy GET /teams-member/{team_member_id} Retrieve one team member
HydrozenApi.LegacyTeamMembersApi updateTeamMemberLegacy POST /teams-member/{team_member_id} Update team member
HydrozenApi.LogsApi getAllLogs GET /logs Retrieve all logs
HydrozenApi.NotificationHandlersApi notificationHandlerGet GET /notification-handler Retrieve all notification handlers
HydrozenApi.NotificationHandlersApi notificationHandlerNotificationHandlerIdGet GET /notification-handler/{notification_handler_id} Retrieve one notification handler
HydrozenApi.NotificationHandlersApi notificationHandlersNotificationHandlerIdDelete DELETE /notification-handlers/{notification_handler_id} Delete notification handler
HydrozenApi.NotificationHandlersApi notificationHandlersNotificationHandlerIdPost POST /notification-handlers/{notification_handler_id} Update notification handler
HydrozenApi.NotificationHandlersApi notificationHandlersPost POST /notification-handlers Create notification handler
HydrozenApi.PaymentsApi getAllPayments GET /payments Retrieve all payments
HydrozenApi.PaymentsApi getPayment GET /payments/{payment_id} Retrieve one payment
HydrozenApi.ProjectsApi createProject POST /projects Create project
HydrozenApi.ProjectsApi deleteProject DELETE /projects/{project_id} Delete project
HydrozenApi.ProjectsApi getAllProjects GET /projects Retrieve all projects
HydrozenApi.ProjectsApi getProject GET /projects/{project_id} Retrieve one project
HydrozenApi.ProjectsApi updateProject POST /projects/{project_id} Update project
HydrozenApi.ServerMonitorsApi deleteServerMonitor DELETE /server-monitors/{server_monitor_id} Delete server monitor
HydrozenApi.ServerMonitorsApi getAllServerMonitors GET /server-monitors Retrieve all server monitors
HydrozenApi.ServerMonitorsApi getServerMonitor GET /server-monitors/{server_monitor_id} Retrieve one server monitor
HydrozenApi.StatusPageStatisticsApi getStatusPageStatistics GET /statistics/{status_page_id} Retrieve status page statistics
HydrozenApi.StatusPagesApi getAllStatusPages GET /status-pages Retrieve all status pages
HydrozenApi.StatusPagesApi getStatusPage GET /status-pages/{status_page_id} Retrieve one status page
HydrozenApi.TeamMembersApi createTeamMember POST /team-members Create team member
HydrozenApi.TeamMembersApi deleteTeamMember DELETE /team-members/{team_member_id} Delete team member
HydrozenApi.TeamMembersApi getTeamMembersByTeam GET /team-members/{team_id} Retrieve team members
HydrozenApi.TeamMembersApi updateTeamMember POST /team-members/{team_member_id} Update team member
HydrozenApi.TeamsApi createTeam POST /teams Create team
HydrozenApi.TeamsApi deleteTeam DELETE /teams/{team_id} Delete team
HydrozenApi.TeamsApi getAllTeams GET /teams Retrieve all teams
HydrozenApi.TeamsApi getTeam GET /teams/{team_id} Retrieve one team
HydrozenApi.TeamsApi updateTeam POST /teams/{team_id} Update team
HydrozenApi.UptimeMonitorsApi monitorsGet GET /monitors Retrieve all uptime monitors
HydrozenApi.UptimeMonitorsApi monitorsPost POST /monitors Create uptime monitor
HydrozenApi.UsersApi getUser GET /user Retrieve current user

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (API Key)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors