Skip to content

hydrozenio/hydrozen-python

Repository files navigation

openapi-client

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 Python package 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.PythonClientCodegen

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import openapi_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import openapi_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.hydrozen.io/api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://app.hydrozen.io/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (API Key): bearerAuth
configuration = openapi_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.CustomDomainsApi(api_client)
    host = 'host_example' # str | 
    custom_index_url = 'custom_index_url_example' # str |  (optional)
    custom_not_found_url = 'custom_not_found_url_example' # str |  (optional)

    try:
        # Create custom domain
        api_response = api_instance.create_custom_domain(host, custom_index_url=custom_index_url, custom_not_found_url=custom_not_found_url)
        print("The response of CustomDomainsApi->create_custom_domain:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CustomDomainsApi->create_custom_domain: %s\n" % e)

Documentation for API Endpoints

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

Class Method HTTP request Description
CustomDomainsApi create_custom_domain POST /domains Create custom domain
CustomDomainsApi delete_custom_domain DELETE /domains/{domain_id} Delete custom domain
CustomDomainsApi get_all_custom_domains GET /domains Retrieve all custom domains
CustomDomainsApi get_custom_domain GET /domains/{domain_id} Retrieve one custom domain
CustomDomainsApi update_custom_domain POST /domains/{domain_id} Update custom domain
DNSMonitorsApi delete_dns_monitor DELETE /dns-monitors/{id} Delete DNS monitor
DNSMonitorsApi get_all_dns_monitors GET /dns-monitors Retrieve all DNS monitors
DNSMonitorsApi get_dns_monitor GET /dns-monitors/{id} Retrieve one DNS monitor
DomainMonitorsApi domain_names_domain_name_id_delete DELETE /domain-names/{domain_name_id} Delete domain name monitor
DomainMonitorsApi domain_names_domain_name_id_get GET /domain-names/{domain_name_id} Retrieve one domain name monitor
DomainMonitorsApi domain_names_domain_name_id_post POST /domain-names/{domain_name_id} Update domain name monitor
DomainMonitorsApi domain_names_get GET /domain-names Retrieve all domain name monitors
DomainMonitorsApi domain_names_post POST /domain-names Create domain name monitor
HeartbeatMonitorsApi heartbeats_get GET /heartbeats Retrieve all heartbeat monitors
HeartbeatMonitorsApi heartbeats_heartbeat_id_delete DELETE /heartbeats/{heartbeat_id} Delete heartbeat monitor
HeartbeatMonitorsApi heartbeats_heartbeat_id_get GET /heartbeats/{heartbeat_id} Retrieve one heartbeat monitor
HeartbeatMonitorsApi heartbeats_heartbeat_id_post POST /heartbeats/{heartbeat_id} Update heartbeat monitor
HeartbeatMonitorsApi heartbeats_post POST /heartbeats Create heartbeat monitor
LegacyTeamMembersApi delete_team_member_legacy DELETE /teams-member/{team_member_id} Delete team member
LegacyTeamMembersApi get_all_team_members_legacy GET /teams-member Retrieve all team members
LegacyTeamMembersApi get_team_member_legacy GET /teams-member/{team_member_id} Retrieve one team member
LegacyTeamMembersApi update_team_member_legacy POST /teams-member/{team_member_id} Update team member
LogsApi get_all_logs GET /logs Retrieve all logs
NotificationHandlersApi notification_handler_get GET /notification-handler Retrieve all notification handlers
NotificationHandlersApi notification_handler_notification_handler_id_get GET /notification-handler/{notification_handler_id} Retrieve one notification handler
NotificationHandlersApi notification_handlers_notification_handler_id_delete DELETE /notification-handlers/{notification_handler_id} Delete notification handler
NotificationHandlersApi notification_handlers_notification_handler_id_post POST /notification-handlers/{notification_handler_id} Update notification handler
NotificationHandlersApi notification_handlers_post POST /notification-handlers Create notification handler
PaymentsApi get_all_payments GET /payments Retrieve all payments
PaymentsApi get_payment GET /payments/{payment_id} Retrieve one payment
ProjectsApi create_project POST /projects Create project
ProjectsApi delete_project DELETE /projects/{project_id} Delete project
ProjectsApi get_all_projects GET /projects Retrieve all projects
ProjectsApi get_project GET /projects/{project_id} Retrieve one project
ProjectsApi update_project POST /projects/{project_id} Update project
ServerMonitorsApi delete_server_monitor DELETE /server-monitors/{server_monitor_id} Delete server monitor
ServerMonitorsApi get_all_server_monitors GET /server-monitors Retrieve all server monitors
ServerMonitorsApi get_server_monitor GET /server-monitors/{server_monitor_id} Retrieve one server monitor
StatusPageStatisticsApi get_status_page_statistics GET /statistics/{status_page_id} Retrieve status page statistics
StatusPagesApi get_all_status_pages GET /status-pages Retrieve all status pages
StatusPagesApi get_status_page GET /status-pages/{status_page_id} Retrieve one status page
TeamMembersApi create_team_member POST /team-members Create team member
TeamMembersApi delete_team_member DELETE /team-members/{team_member_id} Delete team member
TeamMembersApi get_team_members_by_team GET /team-members/{team_id} Retrieve team members
TeamMembersApi update_team_member POST /team-members/{team_member_id} Update team member
TeamsApi create_team POST /teams Create team
TeamsApi delete_team DELETE /teams/{team_id} Delete team
TeamsApi get_all_teams GET /teams Retrieve all teams
TeamsApi get_team GET /teams/{team_id} Retrieve one team
TeamsApi update_team POST /teams/{team_id} Update team
UptimeMonitorsApi monitors_get GET /monitors Retrieve all uptime monitors
UptimeMonitorsApi monitors_post POST /monitors Create uptime monitor
UsersApi get_user GET /user Retrieve current user

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (API Key)

Author

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors