All URIs are relative to https://app.hydrozen.io/api
| Method | HTTP request | Description |
|---|---|---|
| create_project | POST /projects | Create project |
| delete_project | DELETE /projects/{project_id} | Delete project |
| get_all_projects | GET /projects | Retrieve all projects |
| get_project | GET /projects/{project_id} | Retrieve one project |
| update_project | POST /projects/{project_id} | Update project |
MonitorsPost201Response create_project(name, color=color)
Create project
Creates a new project.
- Bearer (API Key) Authentication (bearerAuth):
import openapi_client
from openapi_client.models.monitors_post201_response import MonitorsPost201Response
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.ProjectsApi(api_client)
name = 'name_example' # str |
color = 'color_example' # str | (optional)
try:
# Create project
api_response = api_instance.create_project(name, color=color)
print("The response of ProjectsApi->create_project:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectsApi->create_project: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | ||
| color | str | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Project created | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_project(project_id)
Delete project
Deletes a project.
- Bearer (API Key) Authentication (bearerAuth):
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.ProjectsApi(api_client)
project_id = 56 # int |
try:
# Delete project
api_instance.delete_project(project_id)
except Exception as e:
print("Exception when calling ProjectsApi->delete_project: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | int |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 204 | Project deleted successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetAllProjects200Response get_all_projects(page=page, results_per_page=results_per_page)
Retrieve all projects
Returns a paginated list of projects.
- Bearer (API Key) Authentication (bearerAuth):
import openapi_client
from openapi_client.models.get_all_projects200_response import GetAllProjects200Response
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.ProjectsApi(api_client)
page = 56 # int | (optional)
results_per_page = 56 # int | (optional)
try:
# Retrieve all projects
api_response = api_instance.get_all_projects(page=page, results_per_page=results_per_page)
print("The response of ProjectsApi->get_all_projects:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectsApi->get_all_projects: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| page | int | [optional] | |
| results_per_page | int | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List of projects | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetProject200Response get_project(project_id)
Retrieve one project
Returns details of a specific project.
- Bearer (API Key) Authentication (bearerAuth):
import openapi_client
from openapi_client.models.get_project200_response import GetProject200Response
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.ProjectsApi(api_client)
project_id = 56 # int |
try:
# Retrieve one project
api_response = api_instance.get_project(project_id)
print("The response of ProjectsApi->get_project:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectsApi->get_project: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | int |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project details | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MonitorsPost201Response update_project(project_id, name=name, color=color)
Update project
Updates an existing project.
- Bearer (API Key) Authentication (bearerAuth):
import openapi_client
from openapi_client.models.monitors_post201_response import MonitorsPost201Response
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.ProjectsApi(api_client)
project_id = 56 # int |
name = 'name_example' # str | (optional)
color = 'color_example' # str | (optional)
try:
# Update project
api_response = api_instance.update_project(project_id, name=name, color=color)
print("The response of ProjectsApi->update_project:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectsApi->update_project: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | int | ||
| name | str | [optional] | |
| color | str | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project updated | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]