Skip to main content

Diahook

Project description

diahook

The Diahook server API documentation

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.8.1
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python >= 3.6

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 diahook.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 diahook.openapi_client

Getting Started

Please follow the installation procedure and then run the following:

import time
import diahook.openapi_client
from pprint import pprint
from diahook.openapi_client.api import application_api
from diahook.openapi_client.model.application_in import ApplicationIn
from diahook.openapi_client.model.application_out import ApplicationOut
from diahook.openapi_client.model.http_validation_error import HTTPValidationError
from diahook.openapi_client.model.http_error_out import HttpErrorOut
from diahook.openapi_client.model.list_response_application_out import ListResponseApplicationOut
# Defining the host is optional and defaults to https://api.diahook.com
# See configuration.py for a list of all supported configuration parameters.
configuration = diahook.openapi_client.Configuration(
    host = "https://api.diahook.com"
)

# 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: HTTPBearer
configuration = diahook.openapi_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)


# Enter a context with an instance of the API client
with diahook.openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = application_api.ApplicationApi(api_client)
    application_in = ApplicationIn(
        name="name_example",
    ) # ApplicationIn | 

    try:
        # Create Application
        api_response = api_instance.create_application_api_v1_app_post(application_in)
        pprint(api_response)
    except diahook.openapi_client.ApiException as e:
        print("Exception when calling ApplicationApi->create_application_api_v1_app_post: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.diahook.com

Class Method HTTP request Description
ApplicationApi create_application_api_v1_app_post POST /api/v1/app/ Create Application
ApplicationApi delete_application_api_v1_app_app_id_delete DELETE /api/v1/app/{app_id}/ Delete Application
ApplicationApi get_application_api_v1_app_app_id_get GET /api/v1/app/{app_id}/ Get Application
ApplicationApi list_applications_api_v1_app_get GET /api/v1/app/ List Applications
AuthenticationApi get_dashboard_access_api_v1_auth_dashboard_access_app_id_post POST /api/v1/auth/dashboard_access/{app_id}/ Get Dashboard Access
AuthenticationApi logout_api_v1_auth_logout_post POST /api/v1/auth/logout/ Logout
DevelopmentApi echo_api_v1_development_echo_post POST /api/v1/development/echo/ Echo
EndpointApi create_endpoint_api_v1_app_app_id_endpoint_post POST /api/v1/app/{app_id}/endpoint/ Create Endpoint
EndpointApi delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete DELETE /api/v1/app/{app_id}/endpoint/{endpoint_id}/ Delete Endpoint
EndpointApi get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get GET /api/v1/app/{app_id}/endpoint/{endpoint_id}/ Get Endpoint
EndpointApi get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get GET /api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/ Get Endpoint Secret
EndpointApi list_endpoints_api_v1_app_app_id_endpoint_get GET /api/v1/app/{app_id}/endpoint/ List Endpoints
HealthApi health_api_v1_health_get GET /api/v1/health/ Health
MessageApi create_message_api_v1_app_app_id_msg_post POST /api/v1/app/{app_id}/msg/ Create Message
MessageApi get_message_api_v1_app_app_id_msg_msg_id_get GET /api/v1/app/{app_id}/msg/{msg_id}/ Get Message
MessageApi list_messages_api_v1_app_app_id_msg_get GET /api/v1/app/{app_id}/msg/ List Messages
MessageAttemptApi get_attempt_api_v1_app_app_id_msg_msg_id_attempt_attempt_id_get GET /api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/ Get Attempt
MessageAttemptApi list_attempted_destinations_api_v1_app_app_id_msg_msg_id_endpoint_get GET /api/v1/app/{app_id}/msg/{msg_id}/endpoint/ List Attempted Destinations
MessageAttemptApi list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get GET /api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/ List Attempted Messages
MessageAttemptApi list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get GET /api/v1/app/{app_id}/msg/{msg_id}/attempt/ List Attempts
MessageAttemptApi list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get GET /api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/attempt/ List Attempts For Endpoint

Documentation For Models

Documentation For Authorization

HTTPBearer

  • Type: Bearer authentication

Author

Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in diahook.openapi_client.apis and diahook.openapi_client.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1: Use specific imports for apis and models like:

  • from diahook.openapi_client.api.default_api import DefaultApi
  • from diahook.openapi_client.model.pet import Pet

Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:

import sys
sys.setrecursionlimit(1500)
import diahook.openapi_client
from diahook.openapi_client.apis import *
from diahook.openapi_client.models import *

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diahook-0.8.3.tar.gz (53.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page