InboxRulesetControllerApi

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

MethodHTTP requestDescription
createNewInboxRulesetPOST /rulesetsCreate an inbox ruleset
deleteInboxRulesetDELETE /rulesets/{id}Delete an inbox ruleset
deleteInboxRulesetsDELETE /rulesetsDelete inbox rulesets
getInboxRulesetGET /rulesets/{id}Get an inbox ruleset
getInboxRulesetsGET /rulesetsList inbox rulesets
testInboxRulesetPOST /rulesets/{id}/testTest an inbox ruleset
testInboxRulesetsForInboxPUT /rulesetsTest inbox rulesets for inbox
testNewInboxRulesetPATCH /rulesetsTest new inbox ruleset

createNewInboxRuleset

InboxRulesetDto createNewInboxRuleset(createInboxRulesetOptions, inboxId)

Create an inbox ruleset

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

Example

// Import classes:
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.auth.*;
import com.mailslurp.clients.models.*;
import com.mailslurp.apis.InboxRulesetControllerApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.mailslurp.com");
    
    // Configure API key authorization: API_KEY
    ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
    API_KEY.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //API_KEY.setApiKeyPrefix("Token");

    InboxRulesetControllerApi apiInstance = new InboxRulesetControllerApi(defaultClient);
    CreateInboxRulesetOptions createInboxRulesetOptions = new CreateInboxRulesetOptions(); // CreateInboxRulesetOptions | createInboxRulesetOptions
    UUID inboxId = new UUID(); // UUID | Inbox id to attach ruleset to
    try {
      InboxRulesetDto result = apiInstance.createNewInboxRuleset(createInboxRulesetOptions, inboxId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling InboxRulesetControllerApi#createNewInboxRuleset");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
createInboxRulesetOptionsCreateInboxRulesetOptionscreateInboxRulesetOptions
inboxIdUUIDInbox 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-

deleteInboxRuleset

deleteInboxRuleset(id)

Delete an inbox ruleset

Delete inbox ruleset

Example

// Import classes:
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.auth.*;
import com.mailslurp.clients.models.*;
import com.mailslurp.apis.InboxRulesetControllerApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.mailslurp.com");
    
    // Configure API key authorization: API_KEY
    ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
    API_KEY.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //API_KEY.setApiKeyPrefix("Token");

    InboxRulesetControllerApi apiInstance = new InboxRulesetControllerApi(defaultClient);
    UUID id = new UUID(); // UUID | ID of inbox ruleset
    try {
      apiInstance.deleteInboxRuleset(id);
    } catch (ApiException e) {
      System.err.println("Exception when calling InboxRulesetControllerApi#deleteInboxRuleset");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
idUUIDID of inbox ruleset

Return type

null (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-

deleteInboxRulesets

deleteInboxRulesets(inboxId)

Delete inbox rulesets

Delete inbox rulesets. Accepts optional inboxId filter.

Example

// Import classes:
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.auth.*;
import com.mailslurp.clients.models.*;
import com.mailslurp.apis.InboxRulesetControllerApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.mailslurp.com");
    
    // Configure API key authorization: API_KEY
    ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
    API_KEY.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //API_KEY.setApiKeyPrefix("Token");

    InboxRulesetControllerApi apiInstance = new InboxRulesetControllerApi(defaultClient);
    UUID inboxId = new UUID(); // UUID | Optional inbox id to attach ruleset to
    try {
      apiInstance.deleteInboxRulesets(inboxId);
    } catch (ApiException e) {
      System.err.println("Exception when calling InboxRulesetControllerApi#deleteInboxRulesets");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
inboxIdUUIDOptional inbox id to attach ruleset to[optional]

Return type

null (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-

getInboxRuleset

InboxRulesetDto getInboxRuleset(id)

Get an inbox ruleset

Get inbox ruleset

Example

// Import classes:
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.auth.*;
import com.mailslurp.clients.models.*;
import com.mailslurp.apis.InboxRulesetControllerApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.mailslurp.com");
    
    // Configure API key authorization: API_KEY
    ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
    API_KEY.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //API_KEY.setApiKeyPrefix("Token");

    InboxRulesetControllerApi apiInstance = new InboxRulesetControllerApi(defaultClient);
    UUID id = new UUID(); // UUID | ID of inbox ruleset
    try {
      InboxRulesetDto result = apiInstance.getInboxRuleset(id);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling InboxRulesetControllerApi#getInboxRuleset");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
idUUIDID 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-

getInboxRulesets

PageInboxRulesetDto getInboxRulesets(inboxId, page, searchFilter, size, sort)

List inbox rulesets

List all rulesets attached to an inbox

Example

// Import classes:
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.auth.*;
import com.mailslurp.clients.models.*;
import com.mailslurp.apis.InboxRulesetControllerApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.mailslurp.com");
    
    // Configure API key authorization: API_KEY
    ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
    API_KEY.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //API_KEY.setApiKeyPrefix("Token");

    InboxRulesetControllerApi apiInstance = new InboxRulesetControllerApi(defaultClient);
    UUID inboxId = new UUID(); // UUID | Optional inbox id to get rulesets from
    Integer page = 0; // Integer | Optional page  in inbox ruleset list pagination
    String searchFilter = "searchFilter_example"; // String | Optional search filter
    Integer size = 20; // Integer | Optional page size in inbox ruleset list pagination
    String sort = "ASC"; // String | Optional createdAt sort direction ASC or DESC
    try {
      PageInboxRulesetDto result = apiInstance.getInboxRulesets(inboxId, page, searchFilter, size, sort);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling InboxRulesetControllerApi#getInboxRulesets");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
inboxIdUUIDOptional inbox id to get rulesets from[optional]
pageIntegerOptional page in inbox ruleset list pagination[optional] [default to 0]
searchFilterStringOptional search filter[optional]
sizeIntegerOptional page size in inbox ruleset list pagination[optional] [default to 20]
sortStringOptional createdAt sort direction ASC or DESC[optional] [default to ASC] [enum: ASC, DESC]

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-

testInboxRuleset

InboxRulesetTestResult testInboxRuleset(id, inboxRulesetTestOptions)

Test an inbox ruleset

Test an inbox ruleset

Example

// Import classes:
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.auth.*;
import com.mailslurp.clients.models.*;
import com.mailslurp.apis.InboxRulesetControllerApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.mailslurp.com");
    
    // Configure API key authorization: API_KEY
    ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
    API_KEY.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //API_KEY.setApiKeyPrefix("Token");

    InboxRulesetControllerApi apiInstance = new InboxRulesetControllerApi(defaultClient);
    UUID id = new UUID(); // UUID | ID of inbox ruleset
    InboxRulesetTestOptions inboxRulesetTestOptions = new InboxRulesetTestOptions(); // InboxRulesetTestOptions | inboxRulesetTestOptions
    try {
      InboxRulesetTestResult result = apiInstance.testInboxRuleset(id, inboxRulesetTestOptions);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling InboxRulesetControllerApi#testInboxRuleset");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
idUUIDID of inbox ruleset
inboxRulesetTestOptionsInboxRulesetTestOptionsinboxRulesetTestOptions

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-

testInboxRulesetsForInbox

InboxRulesetTestResult testInboxRulesetsForInbox(inboxId, inboxRulesetTestOptions)

Test inbox rulesets for inbox

Test inbox rulesets for inbox

Example

// Import classes:
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.auth.*;
import com.mailslurp.clients.models.*;
import com.mailslurp.apis.InboxRulesetControllerApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.mailslurp.com");
    
    // Configure API key authorization: API_KEY
    ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
    API_KEY.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //API_KEY.setApiKeyPrefix("Token");

    InboxRulesetControllerApi apiInstance = new InboxRulesetControllerApi(defaultClient);
    UUID inboxId = new UUID(); // UUID | ID of inbox
    InboxRulesetTestOptions inboxRulesetTestOptions = new InboxRulesetTestOptions(); // InboxRulesetTestOptions | inboxRulesetTestOptions
    try {
      InboxRulesetTestResult result = apiInstance.testInboxRulesetsForInbox(inboxId, inboxRulesetTestOptions);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling InboxRulesetControllerApi#testInboxRulesetsForInbox");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
inboxIdUUIDID of inbox
inboxRulesetTestOptionsInboxRulesetTestOptionsinboxRulesetTestOptions

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-

testNewInboxRuleset

InboxRulesetTestResult testNewInboxRuleset(testNewInboxRulesetOptions)

Test new inbox ruleset

Test new inbox ruleset

Example

// Import classes:
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.auth.*;
import com.mailslurp.clients.models.*;
import com.mailslurp.apis.InboxRulesetControllerApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.mailslurp.com");
    
    // Configure API key authorization: API_KEY
    ApiKeyAuth API_KEY = (ApiKeyAuth) defaultClient.getAuthentication("API_KEY");
    API_KEY.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //API_KEY.setApiKeyPrefix("Token");

    InboxRulesetControllerApi apiInstance = new InboxRulesetControllerApi(defaultClient);
    TestNewInboxRulesetOptions testNewInboxRulesetOptions = new TestNewInboxRulesetOptions(); // TestNewInboxRulesetOptions | testNewInboxRulesetOptions
    try {
      InboxRulesetTestResult result = apiInstance.testNewInboxRuleset(testNewInboxRulesetOptions);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling InboxRulesetControllerApi#testNewInboxRuleset");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

NameTypeDescriptionNotes
testNewInboxRulesetOptionsTestNewInboxRulesetOptionstestNewInboxRulesetOptions

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-