Skip to content

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

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

Method HTTP request Description
Get-ExpirationDefaults GET /expired/defaults Get default expiration settings
Get-ExpiredInboxByInboxId GET /expired/inbox/{inboxId} Get expired inbox record for a previously existing inbox
Get-ExpiredInboxRecord GET /expired/{expiredId} Get an expired inbox record
Get-ExpiredInboxes GET /expired List records of expired inboxes

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: /

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

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

Name Type Description Notes
InboxId String ID 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: /

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

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

Name Type Description Notes
ExpiredId 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

Return type

ExpiredInboxDto (PSCustomObject)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

PageExpiredInboxRecordProjection Get-ExpiredInboxes
        [-Page]
        [-Size]
        [-Sort]
        [-Since]
        [-Before]

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"

$Page = 987 # Int32 | Optional page  in inbox sent email list pagination (optional) (default to 0)
$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")
$Since = Get-Date # System.DateTime | Filter by created at after the given timestamp (optional)
$Before = Get-Date # System.DateTime | Filter by created at before the given timestamp (optional)

# List records of expired inboxes
try {
     $Result = Get-ExpiredInboxes -Page $Page -Size $Size -Sort $Sort -Since $Since -Before $Before
} 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

Name Type Description Notes
Page Int32 Optional page in inbox sent email list pagination [optional] [default to 0]
Size Int32 Optional page size in inbox sent email list pagination [optional] [default to 20]
Sort String Optional createdAt sort direction ASC or DESC [optional] [default to "ASC"]
Since System.DateTime Filter by created at after the given timestamp [optional]
Before System.DateTime Filter by created at before the given timestamp [optional]

Return type

PageExpiredInboxRecordProjection (PSCustomObject)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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