Skip to main content

Mail-in-a-Box

Project description

mailinabox-api

Build & Publish

Python client SDK for the Mail-in-a-Box API.

  • API version: 0.51.0
  • Package version: 0.51.1

https://pypi.org/project/mailinabox-api

NOTE: This package is auto-generated from the Mail-In-A-Box OpenAPI spec.

Requirements

Python 2.7 and 3.4+

Installation & Usage

pip install

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

pip install git+https://github.com/badsyntax/mailinabox-api-py.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/badsyntax/mailinabox-api-py.git)

Then import the package:

import mailinabox_api

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 mailinabox_api

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function

import time
import mailinabox_api
from mailinabox_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://box.example.com/admin
# See configuration.py for a list of all supported configuration parameters.
configuration = mailinabox_api.Configuration(
    host = "https://box.example.com/admin"
)

# 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 HTTP basic authorization: basicAuth
configuration = mailinabox_api.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)


# Enter a context with an instance of the API client
with mailinabox_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailinabox_api.DNSApi(api_client)
    qname = 'qname_example' # str | DNS query name.
    body = 1.2.3.4 # str | 

    try:
        # Add DNS custom A record
        api_response = api_instance.add_dns_custom_a_record(qname, body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DNSApi->add_dns_custom_a_record: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://box.example.com/admin

Class Method HTTP request Description
DNSApi add_dns_custom_a_record POST /dns/custom/{qname} Add DNS custom A record
DNSApi add_dns_custom_record POST /dns/custom/{qname}/{rtype} Add DNS custom record
DNSApi add_dns_secondary_nameserver POST /dns/secondary-nameserver Add DNS secondary nameserver
DNSApi get_dns_custom_a_records_for_q_name GET /dns/custom/{qname} Get DNS custom A records
DNSApi get_dns_custom_records GET /dns/custom Get DNS custom records
DNSApi get_dns_custom_records_for_q_name_and_type GET /dns/custom/{qname}/{rtype} Get DNS custom records
DNSApi get_dns_dump GET /dns/dump Get DNS dump
DNSApi get_dns_secondary_nameserver GET /dns/secondary-nameserver Get DNS secondary nameserver
DNSApi get_dns_zonefile GET /dns/zonefile/{zone} Get DNS zonefile
DNSApi get_dns_zones GET /dns/zones Get DNS zones
DNSApi remove_dns_custom_a_record DELETE /dns/custom/{qname} Remove DNS custom A record
DNSApi remove_dns_custom_record DELETE /dns/custom/{qname}/{rtype} Remove DNS custom record
DNSApi update_dns POST /dns/update Update DNS
DNSApi update_dns_custom_a_record PUT /dns/custom/{qname} Update DNS custom A record
DNSApi update_dns_custom_record PUT /dns/custom/{qname}/{rtype} Update DNS custom record
MFAApi mfa_status POST /mfa/status Retrieve MFA status for you or another user
MFAApi mfa_totp_disable POST /mfa/disable Disable multi-factor authentication for you or another user
MFAApi mfa_totp_enable POST /mfa/totp/enable Enable TOTP authentication
MailApi add_mail_user POST /mail/users/add Add mail user
MailApi add_mail_user_privilege POST /mail/users/privileges/add Add mail user privilege
MailApi get_mail_aliases GET /mail/aliases Get mail aliases
MailApi get_mail_domains GET /mail/domains Get mail domains
MailApi get_mail_user_privileges GET /mail/users/privileges Get mail user privileges
MailApi get_mail_users GET /mail/users Get mail users
MailApi remove_mail_alias POST /mail/aliases/remove Remove mail alias
MailApi remove_mail_user POST /mail/users/remove Remove mail user
MailApi remove_mail_user_privilege POST /mail/users/privileges/remove Remove mail user privilege
MailApi set_mail_user_password POST /mail/users/password Set mail user password
MailApi upsert_mail_alias POST /mail/aliases/add Upsert mail alias
SSLApi generate_sslcsr POST /ssl/csr/{domain} Generate SSL CSR
SSLApi get_ssl_status GET /ssl/status Get SSL status
SSLApi install_ssl_certificate POST /ssl/install Install SSL certificate
SSLApi provision_ssl_certificates POST /ssl/provision Provision SSL certificates
SystemApi get_system_backup_config GET /system/backup/config Get system backup config
SystemApi get_system_backup_status GET /system/backup/status Get system backup status
SystemApi get_system_privacy_status GET /system/privacy Get system privacy status
SystemApi get_system_reboot_status GET /system/reboot Get system reboot status
SystemApi get_system_status POST /system/status Get system status
SystemApi get_system_updates GET /system/updates Get system updates
SystemApi get_system_upstream_version POST /system/latest-upstream-version Get system upstream version
SystemApi get_system_version GET /system/version Get system version
SystemApi reboot_system POST /system/reboot Reboot system
SystemApi update_system_backup_config POST /system/backup/config Update system backup config
SystemApi update_system_packages POST /system/update-packages Update system packages
SystemApi update_system_privacy POST /system/privacy Update system privacy
UserApi get_me GET /me Get user information
WebApi get_web_domains GET /web/domains Get web domains
WebApi update_web POST /web/update Update web

Documentation For Models

Documentation For Authorization

basicAuth

  • Type: HTTP basic authentication

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

mailinabox-api-0.51.1.tar.gz (58.4 kB view hashes)

Uploaded Source

Built Distribution

mailinabox_api-0.51.1-py3-none-any.whl (132.4 kB view hashes)

Uploaded Python 3

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