Skip to content

Latest commit

 

History

History
150 lines (110 loc) · 4.26 KB

WebApi.md

File metadata and controls

150 lines (110 loc) · 4.26 KB

mailinabox_api.WebApi

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

Method HTTP request Description
get_web_domains GET /web/domains Get web domains
update_web POST /web/update Update web

get_web_domains

list[WebDomain] get_web_domains()

Get web domains

Returns all static web domains.

Example

  • Basic Authentication (basicAuth):
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.WebApi(api_client)
    
    try:
        # Get web domains
        api_response = api_instance.get_web_domains()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebApi->get_web_domains: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

list[WebDomain]

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/html

HTTP response details

Status code Description Response headers
200 Successful operation -
403 Forbidden -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_web

str update_web()

Update web

Updates static websites, used for updating domain root directories.

Example

  • Basic Authentication (basicAuth):
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.WebApi(api_client)
    
    try:
        # Update web
        api_response = api_instance.update_web()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebApi->update_web: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

str

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/html

HTTP response details

Status code Description Response headers
200 Successful operation -
403 Forbidden -

[Back to top] [Back to API list] [Back to Model list] [Back to README]