mailslurp_client.ExpiredControllerApi

All URIs are relative to https://api.mailslurp.com

MethodHTTP requestDescription
get_expiration_defaultsGET /expired/defaultsGet default expiration settings
get_expired_inbox_by_inbox_idGET /expired/inbox/{inboxId}Get expired inbox record for a previously existing inbox
get_expired_inbox_recordGET /expired/{expiredId}Get an expired inbox record
get_expired_inboxesGET /expiredList records of expired inboxes

get_expiration_defaults

ExpirationDefaults get_expiration_defaults()

Get default expiration settings

Return default times used for inbox expiration

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com"
)

# 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 API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.ExpiredControllerApi(api_client)
    
    try:
        # Get default expiration settings
        api_response = api_instance.get_expiration_defaults()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ExpiredControllerApi->get_expiration_defaults: %sn" % e)

Parameters

This endpoint does not need any parameter.

Return type

ExpirationDefaults

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
401Unauthorized-
403Forbidden-
404Not Found-

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

get_expired_inbox_by_inbox_id

ExpiredInboxDto get_expired_inbox_by_inbox_id(inbox_id)

Get expired inbox record for a previously existing inbox

Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com"
)

# 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 API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.ExpiredControllerApi(api_client)
    inbox_id = 'inbox_id_example' # str | ID of inbox you want to retrieve (not the inbox ID)

    try:
        # Get expired inbox record for a previously existing inbox
        api_response = api_instance.get_expired_inbox_by_inbox_id(inbox_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ExpiredControllerApi->get_expired_inbox_by_inbox_id: %sn" % e)

Parameters

NameTypeDescriptionNotes
inbox_idstrID of inbox you want to retrieve (not the inbox ID)

Return type

ExpiredInboxDto

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
401Unauthorized-
403Forbidden-
404Not Found-

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

get_expired_inbox_record

ExpiredInboxDto get_expired_inbox_record(expired_id)

Get an expired inbox record

Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com"
)

# 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 API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.ExpiredControllerApi(api_client)
    expired_id = 'expired_id_example' # str | ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId)

    try:
        # Get an expired inbox record
        api_response = api_instance.get_expired_inbox_record(expired_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ExpiredControllerApi->get_expired_inbox_record: %sn" % e)

Parameters

NameTypeDescriptionNotes
expired_idstrID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId)

Return type

ExpiredInboxDto

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
401Unauthorized-
403Forbidden-
404Not Found-

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

get_expired_inboxes

PageExpiredInboxRecordProjection get_expired_inboxes(page=page, size=size, sort=sort)

List records of expired inboxes

Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties

Example

  • Api Key Authentication (API_KEY):
from __future__ import print_function
import time
import mailslurp_client
from mailslurp_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mailslurp.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com"
)

# 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 API key authorization: API_KEY
configuration = mailslurp_client.Configuration(
    host = "https://api.mailslurp.com",
    api_key = {
        'x-api-key': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# Enter a context with an instance of the API client
with mailslurp_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailslurp_client.ExpiredControllerApi(api_client)
    page = 0 # int | Optional page  in inbox sent email list pagination (optional) (default to 0)
size = 20 # int | Optional page size in inbox sent email list pagination (optional) (default to 20)
sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC')

    try:
        # List records of expired inboxes
        api_response = api_instance.get_expired_inboxes(page=page, size=size, sort=sort)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ExpiredControllerApi->get_expired_inboxes: %sn" % e)

Parameters

NameTypeDescriptionNotes
pageintOptional page in inbox sent email list pagination[optional] [default to 0]
sizeintOptional page size in inbox sent email list pagination[optional] [default to 20]
sortstrOptional createdAt sort direction ASC or DESC[optional] [default to ‘ASC’]

Return type

PageExpiredInboxRecordProjection

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
401Unauthorized-
403Forbidden-
404Not Found-

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