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.0

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.0.tar.gz (58.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mailinabox_api-0.51.0-py3-none-any.whl (132.4 kB view details)

Uploaded Python 3

File details

Details for the file mailinabox-api-0.51.0.tar.gz.

File metadata

  • Download URL: mailinabox-api-0.51.0.tar.gz
  • Upload date:
  • Size: 58.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0

File hashes

Hashes for mailinabox-api-0.51.0.tar.gz
Algorithm Hash digest
SHA256 a8a82339c765a51a1c61225f277319e2f379f08c2155eb7c594f8a30c464d7ba
MD5 cc6e4798122d04ed9c73fe401d4a5af1
BLAKE2b-256 34186bc3b44d2e935eff22e6c9ec145c22cea983fc590f79f8ea4328382b6bf4

See more details on using hashes here.

File details

Details for the file mailinabox_api-0.51.0-py3-none-any.whl.

File metadata

  • Download URL: mailinabox_api-0.51.0-py3-none-any.whl
  • Upload date:
  • Size: 132.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0

File hashes

Hashes for mailinabox_api-0.51.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0dbb5ef3ac48ac85af3250668ef6de796a9aa1b37aef1722f225e131ed199487
MD5 f4d76ad502d257e8c30b1d5ec66340a0
BLAKE2b-256 5d9d98dcc74304d65772344294966ecd334d8de37674a44d6d5f9351a1d27239

See more details on using hashes here.

Supported by

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