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.46.0
  • Package version: 0.46.4

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)
    domain = 'domain_example' # str | DNS record domain
    type = mailinabox_api.DNSRecordType() # DNSRecordType | Record type
    body = 'body_example' # str | The value of the DNS record.

    try:
        api_response = api_instance.add_dns_custom_record(domain, type, body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DNSApi->add_dns_custom_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_record POST /dns/custom/{domain}/{type}
DNSApi add_dns_custom_record_for_type_a POST /dns/custom/{domain}
DNSApi add_dns_secondary_nameserver POST /dns/secondary-nameserver
DNSApi get_dns_custom_records GET /dns/custom
DNSApi get_dns_custom_records_for_domain_and_type GET /dns/custom/{domain}/{type}
DNSApi get_dns_custom_records_for_domain_and_type_a GET /dns/custom/{domain}
DNSApi get_dns_dump GET /dns/dump
DNSApi get_dns_secondary_nameserver GET /dns/secondary-nameserver
DNSApi get_dns_zones GET /dns/zones
DNSApi remove_dns_custom_record DELETE /dns/custom/{domain}/{type}
DNSApi remove_dns_custom_record_for_type_a DELETE /dns/custom/{domain}
DNSApi update_dns POST /dns/update
DNSApi update_dns_custom_record PUT /dns/custom/{domain}/{type}
DNSApi update_dns_custom_record_for_type_a PUT /dns/custom/{domain}
MailApi add_mail_user POST /mail/users/add
MailApi add_mail_user_privilege POST /mail/users/privileges/add
MailApi get_mail_aliases GET /mail/aliases
MailApi get_mail_domains GET /mail/domains
MailApi get_mail_user_privileges GET /mail/users/privileges
MailApi get_mail_users GET /mail/users
MailApi remove_mail_alias POST /mail/aliases/remove
MailApi remove_mail_user POST /mail/users/remove
MailApi remove_mail_user_privilege POST /mail/users/privileges/remove
MailApi set_mail_user_password POST /mail/users/password
MailApi upsert_mail_alias POST /mail/aliases/add
SSLApi generate_sslcsr POST /ssl/csr/{domain}
SSLApi get_ssl_status GET /ssl/status
SSLApi install_ssl_certificate POST /ssl/install
SSLApi provision_ssl_certificates POST /ssl/provision
SystemApi get_system_backup_config GET /system/backup/config
SystemApi get_system_backup_status GET /system/backup/status
SystemApi get_system_privacy_status GET /system/privacy
SystemApi get_system_reboot_status GET /system/reboot
SystemApi get_system_status POST /system/status
SystemApi get_system_updates GET /system/updates
SystemApi get_system_upstream_version POST /system/latest-upstream-version
SystemApi get_system_version GET /system/version
SystemApi reboot_system POST /system/reboot
SystemApi update_system_backup_config POST /system/backup/config
SystemApi update_system_packages POST /system/update-packages
SystemApi update_system_privacy POST /system/privacy
UserApi get_me GET /me
WebApi get_web_domains GET /web/domains
WebApi update_web POST /web/update

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.46.4.tar.gz (51.6 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.46.4-py3-none-any.whl (102.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mailinabox-api-0.46.4.tar.gz
  • Upload date:
  • Size: 51.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for mailinabox-api-0.46.4.tar.gz
Algorithm Hash digest
SHA256 ae4d6cce49d2c6bcdc6e37d9155f7865bd1646fa325c367552e1d58fc38bbb68
MD5 9d64c3f892429dd0782a19dac90a527f
BLAKE2b-256 aaee57a8c6821d09bd348ad871f50b6313ac2ac684d51f86e957e1143762e095

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mailinabox_api-0.46.4-py3-none-any.whl
  • Upload date:
  • Size: 102.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for mailinabox_api-0.46.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9c7c43181830697bf38d572be9e14c1d123ab19e2e322fc37604ddf0706ed34e
MD5 ce0060363216eb701923ea2705b4972a
BLAKE2b-256 febd4c00a13d322a03df71dc937bf054d698d3fcdb207027515f016af0cdbee9

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