maislurp-client-powershell.maislurp-client-powershell/Api.InboxRulesetControllerApi

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

MethodHTTP requestDescription
New-NewInboxRulesetPOST /rulesetsCreate an inbox ruleset
Invoke-DeleteInboxRulesetDELETE /rulesets/{id}Delete an inbox ruleset
Invoke-DeleteInboxRulesetsDELETE /rulesetsDelete inbox rulesets
Get-InboxRulesetGET /rulesets/{id}Get an inbox ruleset
Get-InboxRulesetsGET /rulesetsList inbox rulesets
Test-InboxRulesetPOST /rulesets/{id}/testTest an inbox ruleset
Test-InboxRulesetsForInboxPUT /rulesetsTest inbox rulesets for inbox
Test-NewInboxRulesetPATCH /rulesetsTest new inbox ruleset

New-NewInboxRuleset

InboxRulesetDto New-NewInboxRuleset         [-CreateInboxRulesetOptions]         [-InboxId]

Create an inbox ruleset

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

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"

$CreateInboxRulesetOptions = (Initialize-CreateInboxRulesetOptions -Action "BLOCK" -Scope "RECEIVING_EMAILS" -Target "Target_example") # CreateInboxRulesetOptions | createInboxRulesetOptions
$InboxId = "InboxId_example" # String | Inbox id to attach ruleset to (optional)

# Create an inbox ruleset
try {
     $Result = New-NewInboxRuleset -CreateInboxRulesetOptions $CreateInboxRulesetOptions -InboxId $InboxId
} catch {
    Write-Host ("Exception occured when calling New-NewInboxRuleset: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
CreateInboxRulesetOptionsCreateInboxRulesetOptionscreateInboxRulesetOptions
InboxIdStringInbox id to attach ruleset to[optional]

Return type

InboxRulesetDto (PSCustomObject)

Authorization

API_KEY

HTTP request headers

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

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

Invoke-DeleteInboxRuleset

void Invoke-DeleteInboxRuleset         [-Id]

Delete an inbox ruleset

Delete inbox ruleset

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"

$Id = "Id_example" # String | ID of inbox ruleset

# Delete an inbox ruleset
try {
     $Result = Invoke-DeleteInboxRuleset -Id $Id
} catch {
    Write-Host ("Exception occured when calling Invoke-DeleteInboxRuleset: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
IdStringID of inbox ruleset

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

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

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

Invoke-DeleteInboxRulesets

void Invoke-DeleteInboxRulesets         [-InboxId]

Delete inbox rulesets

Delete inbox rulesets. Accepts optional inboxId filter.

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 | Optional inbox id to attach ruleset to (optional)

# Delete inbox rulesets
try {
     $Result = Invoke-DeleteInboxRulesets -InboxId $InboxId
} catch {
    Write-Host ("Exception occured when calling Invoke-DeleteInboxRulesets: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
InboxIdStringOptional inbox id to attach ruleset to[optional]

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

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

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

Get-InboxRuleset

InboxRulesetDto Get-InboxRuleset         [-Id]

Get an inbox ruleset

Get inbox ruleset

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"

$Id = "Id_example" # String | ID of inbox ruleset

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

Parameters

NameTypeDescriptionNotes
IdStringID of inbox ruleset

Return type

InboxRulesetDto (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-InboxRulesets

PageInboxRulesetDto Get-InboxRulesets         [-Before] <System.Nullable[System.DateTime]>         [-InboxId]         [-Page] <System.Nullable[Int32]>         [-SearchFilter]         [-Since] <System.Nullable[System.DateTime]>         [-Size] <System.Nullable[Int32]>         [-Sort]

List inbox rulesets

List all rulesets attached to an inbox

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)
$InboxId = "InboxId_example" # String | Optional inbox id to get rulesets from (optional)
$Page = 987 # Int32 | Optional page  in inbox ruleset list pagination (optional) (default to 0)
$SearchFilter = "SearchFilter_example" # String | Optional search filter (optional)
$Since = Get-Date # System.DateTime | Filter by created at after the given timestamp (optional)
$Size = 987 # Int32 | Optional page size in inbox ruleset list pagination (optional) (default to 20)
$Sort = "ASC" # String | Optional createdAt sort direction ASC or DESC (optional) (default to "ASC")

# List inbox rulesets
try {
     $Result = Get-InboxRulesets -Before $Before -InboxId $InboxId -Page $Page -SearchFilter $SearchFilter -Since $Since -Size $Size -Sort $Sort
} catch {
    Write-Host ("Exception occured when calling Get-InboxRulesets: {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]
InboxIdStringOptional inbox id to get rulesets from[optional]
PageInt32Optional page in inbox ruleset list pagination[optional] [default to 0]
SearchFilterStringOptional search filter[optional]
SinceSystem.DateTimeFilter by created at after the given timestamp[optional]
SizeInt32Optional page size in inbox ruleset list pagination[optional] [default to 20]
SortStringOptional createdAt sort direction ASC or DESC[optional] [default to “ASC”]

Return type

PageInboxRulesetDto (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 ]

Test-InboxRuleset

InboxRulesetTestResult Test-InboxRuleset         [-Id]         [-InboxRulesetTestOptions]

Test an inbox ruleset

Test an inbox ruleset

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"

$Id = "Id_example" # String | ID of inbox ruleset
$InboxRulesetTestOptions = (Initialize-InboxRulesetTestOptions -TestTarget "TestTarget_example") # InboxRulesetTestOptions | inboxRulesetTestOptions

# Test an inbox ruleset
try {
     $Result = Test-InboxRuleset -Id $Id -InboxRulesetTestOptions $InboxRulesetTestOptions
} catch {
    Write-Host ("Exception occured when calling Test-InboxRuleset: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
IdStringID of inbox ruleset
InboxRulesetTestOptionsInboxRulesetTestOptionsinboxRulesetTestOptions

Return type

InboxRulesetTestResult (PSCustomObject)

Authorization

API_KEY

HTTP request headers

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

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

Test-InboxRulesetsForInbox

InboxRulesetTestResult Test-InboxRulesetsForInbox         [-InboxId]         [-InboxRulesetTestOptions]

Test inbox rulesets for inbox

Test inbox rulesets for inbox

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
$InboxRulesetTestOptions = (Initialize-InboxRulesetTestOptions -TestTarget "TestTarget_example") # InboxRulesetTestOptions | inboxRulesetTestOptions

# Test inbox rulesets for inbox
try {
     $Result = Test-InboxRulesetsForInbox -InboxId $InboxId -InboxRulesetTestOptions $InboxRulesetTestOptions
} catch {
    Write-Host ("Exception occured when calling Test-InboxRulesetsForInbox: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
InboxIdStringID of inbox
InboxRulesetTestOptionsInboxRulesetTestOptionsinboxRulesetTestOptions

Return type

InboxRulesetTestResult (PSCustomObject)

Authorization

API_KEY

HTTP request headers

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

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

Test-NewInboxRuleset

InboxRulesetTestResult Test-NewInboxRuleset         [-TestNewInboxRulesetOptions]

Test new inbox ruleset

Test new inbox ruleset

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"

$TestNewInboxRulesetOptions = (Initialize-TestNewInboxRulesetOptions -InboxRulesetTestOptions  -CreateInboxRulesetOptions (Initialize-CreateInboxRulesetOptions -Action "BLOCK" -Scope "RECEIVING_EMAILS" -Target "Target_example")) # TestNewInboxRulesetOptions | testNewInboxRulesetOptions

# Test new inbox ruleset
try {
     $Result = Test-NewInboxRuleset -TestNewInboxRulesetOptions $TestNewInboxRulesetOptions
} catch {
    Write-Host ("Exception occured when calling Test-NewInboxRuleset: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
TestNewInboxRulesetOptionsTestNewInboxRulesetOptionstestNewInboxRulesetOptions

Return type

InboxRulesetTestResult (PSCustomObject)

Authorization

API_KEY

HTTP request headers

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

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