maislurp-client-powershell.maislurp-client-powershell/Api.ExpiredControllerApi

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

MethodHTTP requestDescription
Get-ExpirationDefaultsGET /expired/defaultsGet default expiration settings
Get-ExpiredInboxByInboxIdGET /expired/inbox/{inboxId}Get expired inbox record for a previously existing inbox
Get-ExpiredInboxRecordGET /expired/{expiredId}Get an expired inbox record
Get-ExpiredInboxesGET /expiredList records of expired inboxes

Get-ExpirationDefaults

ExpirationDefaults Get-ExpirationDefaults

Get default expiration settings

Return default times used for inbox expiration

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"


# Get default expiration settings
try {
     $Result = Get-ExpirationDefaults
} catch {
    Write-Host ("Exception occured when calling Get-ExpirationDefaults: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

This endpoint does not need any parameter.

Return type

ExpirationDefaults (PSCustomObject)

Authorization

API_KEY

HTTP request headers

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

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

Get-ExpiredInboxByInboxId

ExpiredInboxDto Get-ExpiredInboxByInboxId         [-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

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$InboxId = "InboxId_example" # String | ID of inbox you want to retrieve (not the inbox ID)

# Get expired inbox record for a previously existing inbox
try {
     $Result = Get-ExpiredInboxByInboxId -InboxId $InboxId
} catch {
    Write-Host ("Exception occured when calling Get-ExpiredInboxByInboxId: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

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

Return type

ExpiredInboxDto (PSCustomObject)

Authorization

API_KEY

HTTP request headers

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

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

Get-ExpiredInboxRecord

ExpiredInboxDto Get-ExpiredInboxRecord         [-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

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$ExpiredId = "ExpiredId_example" # String | 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)

# Get an expired inbox record
try {
     $Result = Get-ExpiredInboxRecord -ExpiredId $ExpiredId
} catch {
    Write-Host ("Exception occured when calling Get-ExpiredInboxRecord: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
ExpiredIdStringID 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 (PSCustomObject)

Authorization

API_KEY

HTTP request headers

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

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

Get-ExpiredInboxes

PageExpiredInboxRecordProjection Get-ExpiredInboxes         [-Before] <System.Nullable[System.DateTime]>         [-Page] <System.Nullable[Int32]>         [-Since] <System.Nullable[System.DateTime]>         [-Size] <System.Nullable[Int32]>         [-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

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$Before = Get-Date # System.DateTime | Filter by created at before the given timestamp (optional)
$Page = 987 # Int32 | Optional page  in inbox sent email list pagination (optional) (default to 0)
$Since = Get-Date # System.DateTime | Filter by created at after the given timestamp (optional)
$Size = 987 # Int32 | Optional page size in inbox sent email list pagination (optional) (default to 20)
$Sort = "ASC" # String | Optional createdAt sort direction ASC or DESC (optional) (default to "ASC")

# List records of expired inboxes
try {
     $Result = Get-ExpiredInboxes -Before $Before -Page $Page -Since $Since -Size $Size -Sort $Sort
} catch {
    Write-Host ("Exception occured when calling Get-ExpiredInboxes: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
BeforeSystem.DateTimeFilter by created at before the given timestamp[optional]
PageInt32Optional page in inbox sent email list pagination[optional] [default to 0]
SinceSystem.DateTimeFilter by created at after the given timestamp[optional]
SizeInt32Optional page size in inbox sent email list pagination[optional] [default to 20]
SortStringOptional createdAt sort direction ASC or DESC[optional] [default to “ASC”]

Return type

PageExpiredInboxRecordProjection (PSCustomObject)

Authorization

API_KEY

HTTP request headers

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

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