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.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = InboxRulesetControllerApi()
val createInboxRulesetOptions : CreateInboxRulesetOptions =  // CreateInboxRulesetOptions | createInboxRulesetOptions
val inboxId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | Inbox id to attach ruleset to
try {
    val result : InboxRulesetDto = apiInstance.createNewInboxRuleset(createInboxRulesetOptions, inboxId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling InboxRulesetControllerApi#createNewInboxRuleset")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling InboxRulesetControllerApi#createNewInboxRuleset")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
createInboxRulesetOptionsCreateInboxRulesetOptionscreateInboxRulesetOptions
inboxIdjava.util.UUIDInbox id to attach ruleset to[optional]

Return type

InboxRulesetDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

deleteInboxRuleset

deleteInboxRuleset(id)

Delete an inbox ruleset

Delete inbox ruleset

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = InboxRulesetControllerApi()
val id : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | ID of inbox ruleset
try {
    apiInstance.deleteInboxRuleset(id)
} catch (e: ClientException) {
    println("4xx response calling InboxRulesetControllerApi#deleteInboxRuleset")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling InboxRulesetControllerApi#deleteInboxRuleset")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
idjava.util.UUIDID of inbox ruleset

Return type

null (empty response body)

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

deleteInboxRulesets

deleteInboxRulesets(inboxId)

Delete inbox rulesets

Delete inbox rulesets. Accepts optional inboxId filter.

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = InboxRulesetControllerApi()
val inboxId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | Optional inbox id to attach ruleset to
try {
    apiInstance.deleteInboxRulesets(inboxId)
} catch (e: ClientException) {
    println("4xx response calling InboxRulesetControllerApi#deleteInboxRulesets")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling InboxRulesetControllerApi#deleteInboxRulesets")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
inboxIdjava.util.UUIDOptional inbox id to attach ruleset to[optional]

Return type

null (empty response body)

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getInboxRuleset

InboxRulesetDto getInboxRuleset(id)

Get an inbox ruleset

Get inbox ruleset

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = InboxRulesetControllerApi()
val id : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | ID of inbox ruleset
try {
    val result : InboxRulesetDto = apiInstance.getInboxRuleset(id)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling InboxRulesetControllerApi#getInboxRuleset")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling InboxRulesetControllerApi#getInboxRuleset")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
idjava.util.UUIDID of inbox ruleset

Return type

InboxRulesetDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getInboxRulesets

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

List inbox rulesets

List all rulesets attached to an inbox

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = InboxRulesetControllerApi()
val before : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at before the given timestamp
val inboxId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | Optional inbox id to get rulesets from
val page : kotlin.Int = 56 // kotlin.Int | Optional page  in inbox ruleset list pagination
val searchFilter : kotlin.String = searchFilter_example // kotlin.String | Optional search filter
val since : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at after the given timestamp
val size : kotlin.Int = 56 // kotlin.Int | Optional page size in inbox ruleset list pagination
val sort : kotlin.String = sort_example // kotlin.String | Optional createdAt sort direction ASC or DESC
try {
    val result : PageInboxRulesetDto = apiInstance.getInboxRulesets(before, inboxId, page, searchFilter, since, size, sort)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling InboxRulesetControllerApi#getInboxRulesets")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling InboxRulesetControllerApi#getInboxRulesets")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
beforejava.time.OffsetDateTimeFilter by created at before the given timestamp[optional]
inboxIdjava.util.UUIDOptional inbox id to get rulesets from[optional]
pagekotlin.IntOptional page in inbox ruleset list pagination[optional] [default to 0]
searchFilterkotlin.StringOptional search filter[optional]
sincejava.time.OffsetDateTimeFilter by created at after the given timestamp[optional]
sizekotlin.IntOptional page size in inbox ruleset list pagination[optional] [default to 20]
sortkotlin.StringOptional createdAt sort direction ASC or DESC[optional] [default to ASC] [enum: ASC, DESC]

Return type

PageInboxRulesetDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

testInboxRuleset

InboxRulesetTestResult testInboxRuleset(id, inboxRulesetTestOptions)

Test an inbox ruleset

Test an inbox ruleset

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = InboxRulesetControllerApi()
val id : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | ID of inbox ruleset
val inboxRulesetTestOptions : InboxRulesetTestOptions =  // InboxRulesetTestOptions | inboxRulesetTestOptions
try {
    val result : InboxRulesetTestResult = apiInstance.testInboxRuleset(id, inboxRulesetTestOptions)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling InboxRulesetControllerApi#testInboxRuleset")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling InboxRulesetControllerApi#testInboxRuleset")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
idjava.util.UUIDID of inbox ruleset
inboxRulesetTestOptionsInboxRulesetTestOptionsinboxRulesetTestOptions

Return type

InboxRulesetTestResult

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

testInboxRulesetsForInbox

InboxRulesetTestResult testInboxRulesetsForInbox(inboxId, inboxRulesetTestOptions)

Test inbox rulesets for inbox

Test inbox rulesets for inbox

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = InboxRulesetControllerApi()
val inboxId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | ID of inbox
val inboxRulesetTestOptions : InboxRulesetTestOptions =  // InboxRulesetTestOptions | inboxRulesetTestOptions
try {
    val result : InboxRulesetTestResult = apiInstance.testInboxRulesetsForInbox(inboxId, inboxRulesetTestOptions)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling InboxRulesetControllerApi#testInboxRulesetsForInbox")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling InboxRulesetControllerApi#testInboxRulesetsForInbox")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
inboxIdjava.util.UUIDID of inbox
inboxRulesetTestOptionsInboxRulesetTestOptionsinboxRulesetTestOptions

Return type

InboxRulesetTestResult

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

testNewInboxRuleset

InboxRulesetTestResult testNewInboxRuleset(testNewInboxRulesetOptions)

Test new inbox ruleset

Test new inbox ruleset

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = InboxRulesetControllerApi()
val testNewInboxRulesetOptions : TestNewInboxRulesetOptions =  // TestNewInboxRulesetOptions | testNewInboxRulesetOptions
try {
    val result : InboxRulesetTestResult = apiInstance.testNewInboxRuleset(testNewInboxRulesetOptions)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling InboxRulesetControllerApi#testNewInboxRuleset")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling InboxRulesetControllerApi#testNewInboxRuleset")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
testNewInboxRulesetOptionsTestNewInboxRulesetOptionstestNewInboxRulesetOptions

Return type

InboxRulesetTestResult

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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