ExpiredControllerApi

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

MethodHTTP requestDescription
getExpirationDefaultsGET /expired/defaultsGet default expiration settings
getExpiredInboxByInboxIdGET /expired/inbox/{inboxId}Get expired inbox record for a previously existing inbox
getExpiredInboxRecordGET /expired/{expiredId}Get an expired inbox record
getExpiredInboxesGET /expiredList records of expired inboxes

getExpirationDefaults

ExpirationDefaults getExpirationDefaults()

Get default expiration settings

Return default times used for inbox expiration

Example

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

val apiInstance = ExpiredControllerApi()
try {
    val result : ExpirationDefaults = apiInstance.getExpirationDefaults()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ExpiredControllerApi#getExpirationDefaults")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ExpiredControllerApi#getExpirationDefaults")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

ExpirationDefaults

Authorization

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

HTTP request headers

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

getExpiredInboxByInboxId

ExpiredInboxDto getExpiredInboxByInboxId(inboxId)

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

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

val apiInstance = ExpiredControllerApi()
val inboxId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | ID of inbox you want to retrieve (not the inbox ID)
try {
    val result : ExpiredInboxDto = apiInstance.getExpiredInboxByInboxId(inboxId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ExpiredControllerApi#getExpiredInboxByInboxId")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ExpiredControllerApi#getExpiredInboxByInboxId")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
inboxIdjava.util.UUIDID of inbox you want to retrieve (not the inbox ID)

Return type

ExpiredInboxDto

Authorization

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

HTTP request headers

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

getExpiredInboxRecord

ExpiredInboxDto getExpiredInboxRecord(expiredId)

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

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

val apiInstance = ExpiredControllerApi()
val expiredId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 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 {
    val result : ExpiredInboxDto = apiInstance.getExpiredInboxRecord(expiredId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ExpiredControllerApi#getExpiredInboxRecord")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ExpiredControllerApi#getExpiredInboxRecord")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
expiredIdjava.util.UUIDID 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

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

HTTP request headers

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

getExpiredInboxes

PageExpiredInboxRecordProjection getExpiredInboxes(before, page, since, size, 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

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

val apiInstance = ExpiredControllerApi()
val before : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at before the given timestamp
val page : kotlin.Int = 56 // kotlin.Int | Optional page  in inbox sent email list pagination
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 sent email list pagination
val sort : kotlin.String = sort_example // kotlin.String | Optional createdAt sort direction ASC or DESC
try {
    val result : PageExpiredInboxRecordProjection = apiInstance.getExpiredInboxes(before, page, since, size, sort)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ExpiredControllerApi#getExpiredInboxes")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ExpiredControllerApi#getExpiredInboxes")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
beforejava.time.OffsetDateTimeFilter by created at before the given timestamp[optional]
pagekotlin.IntOptional page in inbox sent email list pagination[optional] [default to 0]
sincejava.time.OffsetDateTimeFilter by created at after the given timestamp[optional]
sizekotlin.IntOptional page size in inbox sent email list pagination[optional] [default to 20]
sortkotlin.StringOptional createdAt sort direction ASC or DESC[optional] [default to ASC] [enum: ASC, DESC]

Return type

PageExpiredInboxRecordProjection

Authorization

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

HTTP request headers

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