Skip to content

Latest commit

 

History

History
221 lines (155 loc) · 6.78 KB

File metadata and controls

221 lines (155 loc) · 6.78 KB

nexus_api_python_client.EmailApi

All URIs are relative to http://localhost/service/rest

Method HTTP request Description
delete_email_configuration DELETE /beta/email Disable and clear the email configuration
get_email_configuration GET /beta/email Retrieve the current email configuration
set_email_configuration PUT /beta/email Set the current email configuration
test_email_configuration POST /beta/email/verify Send a test email to the email address provided in the request body

delete_email_configuration

delete_email_configuration()

Disable and clear the email configuration

Example

from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint

# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = nexus_api_python_client.EmailApi(api_client)
    
    try:
        # Disable and clear the email configuration
        api_instance.delete_email_configuration()
    except ApiException as e:
        print("Exception when calling EmailApi->delete_email_configuration: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Email configuration was successfully cleared -

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

get_email_configuration

ApiEmailConfiguration get_email_configuration()

Retrieve the current email configuration

Example

from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint

# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = nexus_api_python_client.EmailApi(api_client)
    
    try:
        # Retrieve the current email configuration
        api_response = api_instance.get_email_configuration()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling EmailApi->get_email_configuration: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

ApiEmailConfiguration

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation -
403 Insufficient permissions to retrieve the email configuration -

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

set_email_configuration

set_email_configuration(body)

Set the current email configuration

Example

from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint

# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = nexus_api_python_client.EmailApi(api_client)
    body = nexus_api_python_client.ApiEmailConfiguration() # ApiEmailConfiguration | 

    try:
        # Set the current email configuration
        api_instance.set_email_configuration(body)
    except ApiException as e:
        print("Exception when calling EmailApi->set_email_configuration: %s\n" % e)

Parameters

Name Type Description Notes
body ApiEmailConfiguration

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Email configuration was successfully updated -
400 Invalid request -
403 Insufficient permissions to update the email configuration -

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

test_email_configuration

test_email_configuration(body)

Send a test email to the email address provided in the request body

Example

from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint

# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = nexus_api_python_client.EmailApi(api_client)
    body = 'body_example' # str | An email address to send a test email to

    try:
        # Send a test email to the email address provided in the request body
        api_instance.test_email_configuration(body)
    except ApiException as e:
        print("Exception when calling EmailApi->test_email_configuration: %s\n" % e)

Parameters

Name Type Description Notes
body str An email address to send a test email to

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Validation was complete, look at the body to determine success -
403 Insufficient permissions to verify the email configuration -

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