mailslurp_client.InboxRulesetControllerApi

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

MethodHTTP requestDescription
create_new_inbox_rulesetPOST /rulesetsCreate an inbox ruleset
delete_inbox_rulesetDELETE /rulesets/{id}Delete an inbox ruleset
delete_inbox_rulesetsDELETE /rulesetsDelete inbox rulesets
get_inbox_rulesetGET /rulesets/{id}Get an inbox ruleset
get_inbox_rulesetsGET /rulesetsList inbox rulesets
test_inbox_rulesetPOST /rulesets/{id}/testTest an inbox ruleset
test_inbox_rulesets_for_inboxPUT /rulesetsTest inbox rulesets for inbox
test_new_inbox_rulesetPATCH /rulesetsTest new inbox ruleset

create_new_inbox_ruleset

InboxRulesetDto create_new_inbox_ruleset(create_inbox_ruleset_options, inbox_id=inbox_id)

Create an inbox ruleset

Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving

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.InboxRulesetControllerApi(api_client)
    create_inbox_ruleset_options = mailslurp_client.CreateInboxRulesetOptions() # CreateInboxRulesetOptions | createInboxRulesetOptions
inbox_id = 'inbox_id_example' # str | Inbox id to attach ruleset to (optional)

    try:
        # Create an inbox ruleset
        api_response = api_instance.create_new_inbox_ruleset(create_inbox_ruleset_options, inbox_id=inbox_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling InboxRulesetControllerApi->create_new_inbox_ruleset: %sn" % e)

Parameters

NameTypeDescriptionNotes
create_inbox_ruleset_optionsCreateInboxRulesetOptionscreateInboxRulesetOptions
inbox_idstrInbox id to attach ruleset to[optional]

Return type

InboxRulesetDto

Authorization

API_KEY

HTTP request headers

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

HTTP response details

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

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

delete_inbox_ruleset

delete_inbox_ruleset(id)

Delete an inbox ruleset

Delete inbox ruleset

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.InboxRulesetControllerApi(api_client)
    id = 'id_example' # str | ID of inbox ruleset

    try:
        # Delete an inbox ruleset
        api_instance.delete_inbox_ruleset(id)
    except ApiException as e:
        print("Exception when calling InboxRulesetControllerApi->delete_inbox_ruleset: %sn" % e)

Parameters

NameTypeDescriptionNotes
idstrID of inbox ruleset

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204No Content-
401Unauthorized-
403Forbidden-

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

delete_inbox_rulesets

delete_inbox_rulesets(inbox_id=inbox_id)

Delete inbox rulesets

Delete inbox rulesets. Accepts optional inboxId filter.

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.InboxRulesetControllerApi(api_client)
    inbox_id = 'inbox_id_example' # str | Optional inbox id to attach ruleset to (optional)

    try:
        # Delete inbox rulesets
        api_instance.delete_inbox_rulesets(inbox_id=inbox_id)
    except ApiException as e:
        print("Exception when calling InboxRulesetControllerApi->delete_inbox_rulesets: %sn" % e)

Parameters

NameTypeDescriptionNotes
inbox_idstrOptional inbox id to attach ruleset to[optional]

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204No Content-
401Unauthorized-
403Forbidden-

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

get_inbox_ruleset

InboxRulesetDto get_inbox_ruleset(id)

Get an inbox ruleset

Get inbox ruleset

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.InboxRulesetControllerApi(api_client)
    id = 'id_example' # str | ID of inbox ruleset

    try:
        # Get an inbox ruleset
        api_response = api_instance.get_inbox_ruleset(id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling InboxRulesetControllerApi->get_inbox_ruleset: %sn" % e)

Parameters

NameTypeDescriptionNotes
idstrID of inbox ruleset

Return type

InboxRulesetDto

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_inbox_rulesets

PageInboxRulesetDto get_inbox_rulesets(inbox_id=inbox_id, page=page, search_filter=search_filter, size=size, sort=sort)

List inbox rulesets

List all rulesets attached to an inbox

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.InboxRulesetControllerApi(api_client)
    inbox_id = 'inbox_id_example' # str | Optional inbox id to get rulesets from (optional)
page = 0 # int | Optional page  in inbox ruleset list pagination (optional) (default to 0)
search_filter = 'search_filter_example' # str | Optional search filter (optional)
size = 20 # int | Optional page size in inbox ruleset list pagination (optional) (default to 20)
sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC')

    try:
        # List inbox rulesets
        api_response = api_instance.get_inbox_rulesets(inbox_id=inbox_id, page=page, search_filter=search_filter, size=size, sort=sort)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling InboxRulesetControllerApi->get_inbox_rulesets: %sn" % e)

Parameters

NameTypeDescriptionNotes
inbox_idstrOptional inbox id to get rulesets from[optional]
pageintOptional page in inbox ruleset list pagination[optional] [default to 0]
search_filterstrOptional search filter[optional]
sizeintOptional page size in inbox ruleset list pagination[optional] [default to 20]
sortstrOptional createdAt sort direction ASC or DESC[optional] [default to ‘ASC’]

Return type

PageInboxRulesetDto

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 ]

test_inbox_ruleset

InboxRulesetTestResult test_inbox_ruleset(id, inbox_ruleset_test_options)

Test an inbox ruleset

Test an inbox ruleset

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.InboxRulesetControllerApi(api_client)
    id = 'id_example' # str | ID of inbox ruleset
inbox_ruleset_test_options = mailslurp_client.InboxRulesetTestOptions() # InboxRulesetTestOptions | inboxRulesetTestOptions

    try:
        # Test an inbox ruleset
        api_response = api_instance.test_inbox_ruleset(id, inbox_ruleset_test_options)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling InboxRulesetControllerApi->test_inbox_ruleset: %sn" % e)

Parameters

NameTypeDescriptionNotes
idstrID of inbox ruleset
inbox_ruleset_test_optionsInboxRulesetTestOptionsinboxRulesetTestOptions

Return type

InboxRulesetTestResult

Authorization

API_KEY

HTTP request headers

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

HTTP response details

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

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

test_inbox_rulesets_for_inbox

InboxRulesetTestResult test_inbox_rulesets_for_inbox(inbox_id, inbox_ruleset_test_options)

Test inbox rulesets for inbox

Test inbox rulesets for inbox

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.InboxRulesetControllerApi(api_client)
    inbox_id = 'inbox_id_example' # str | ID of inbox
inbox_ruleset_test_options = mailslurp_client.InboxRulesetTestOptions() # InboxRulesetTestOptions | inboxRulesetTestOptions

    try:
        # Test inbox rulesets for inbox
        api_response = api_instance.test_inbox_rulesets_for_inbox(inbox_id, inbox_ruleset_test_options)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling InboxRulesetControllerApi->test_inbox_rulesets_for_inbox: %sn" % e)

Parameters

NameTypeDescriptionNotes
inbox_idstrID of inbox
inbox_ruleset_test_optionsInboxRulesetTestOptionsinboxRulesetTestOptions

Return type

InboxRulesetTestResult

Authorization

API_KEY

HTTP request headers

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

HTTP response details

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

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

test_new_inbox_ruleset

InboxRulesetTestResult test_new_inbox_ruleset(test_new_inbox_ruleset_options)

Test new inbox ruleset

Test new inbox ruleset

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.InboxRulesetControllerApi(api_client)
    test_new_inbox_ruleset_options = mailslurp_client.TestNewInboxRulesetOptions() # TestNewInboxRulesetOptions | testNewInboxRulesetOptions

    try:
        # Test new inbox ruleset
        api_response = api_instance.test_new_inbox_ruleset(test_new_inbox_ruleset_options)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling InboxRulesetControllerApi->test_new_inbox_ruleset: %sn" % e)

Parameters

NameTypeDescriptionNotes
test_new_inbox_ruleset_optionsTestNewInboxRulesetOptionstestNewInboxRulesetOptions

Return type

InboxRulesetTestResult

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200OK-
204No Content-
401Unauthorized-
403Forbidden-

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