maislurp-client-powershell.maislurp-client-powershell/Api.InboxRulesetControllerApi
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
New-NewInboxRuleset | POST /rulesets | Create an inbox ruleset |
Invoke-DeleteInboxRuleset | DELETE /rulesets/{id} | Delete an inbox ruleset |
Invoke-DeleteInboxRulesets | DELETE /rulesets | Delete inbox rulesets |
Get-InboxRuleset | GET /rulesets/{id} | Get an inbox ruleset |
Get-InboxRulesets | GET /rulesets | List inbox rulesets |
Test-InboxRuleset | POST /rulesets/{id}/test | Test an inbox ruleset |
Test-InboxRulesetsForInbox | PUT /rulesets | Test inbox rulesets for inbox |
Test-NewInboxRuleset | PATCH /rulesets | Test new inbox ruleset |
InboxRulesetDto New-NewInboxRuleset
[-InboxId]
[-CreateInboxRulesetOptions]
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"
$InboxId = "InboxId_example" # String | Inbox id to attach ruleset to
$CreateInboxRulesetOptions = (Initialize-CreateInboxRulesetOptions -Scope "RECEIVING_EMAILS" -Action "BLOCK" -Target "Target_example") # CreateInboxRulesetOptions |
# Create an inbox ruleset
try {
$Result = New-NewInboxRuleset -InboxId $InboxId -CreateInboxRulesetOptions $CreateInboxRulesetOptions
} 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
Name | Type | Description | Notes |
---|---|---|---|
InboxId | String | Inbox id to attach ruleset to | |
CreateInboxRulesetOptions | CreateInboxRulesetOptions |
Return type
InboxRulesetDto (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Name | Type | Description | Notes |
---|---|---|---|
Id | String | ID of inbox ruleset |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Name | Type | Description | Notes |
---|---|---|---|
InboxId | String | Optional inbox id to attach ruleset to | [optional] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Name | Type | Description | Notes |
---|---|---|---|
Id | String | ID of inbox ruleset |
Return type
InboxRulesetDto (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageInboxRulesetDto Get-InboxRulesets
[-InboxId]
[-Page]
[-Size]
[-Sort]
[-SearchFilter]
[-Since]
[-Before]
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"
$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)
$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")
$SearchFilter = "SearchFilter_example" # String | Optional search filter (optional)
$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 inbox rulesets
try {
$Result = Get-InboxRulesets -InboxId $InboxId -Page $Page -Size $Size -Sort $Sort -SearchFilter $SearchFilter -Since $Since -Before $Before
} 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
Name | Type | Description | Notes |
---|---|---|---|
InboxId | String | Optional inbox id to get rulesets from | [optional] |
Page | Int32 | Optional page in inbox ruleset list pagination | [optional] [default to 0] |
Size | Int32 | Optional page size in inbox ruleset list pagination | [optional] [default to 20] |
Sort | String | Optional createdAt sort direction ASC or DESC | [optional] [default to "ASC"] |
SearchFilter | String | Optional search filter | [optional] |
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
PageInboxRulesetDto (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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 |
# 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
Name | Type | Description | Notes |
---|---|---|---|
Id | String | ID of inbox ruleset | |
InboxRulesetTestOptions | InboxRulesetTestOptions |
Return type
InboxRulesetTestResult (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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 |
# 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
Name | Type | Description | Notes |
---|---|---|---|
InboxId | String | ID of inbox | |
InboxRulesetTestOptions | InboxRulesetTestOptions |
Return type
InboxRulesetTestResult (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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 -Scope "RECEIVING_EMAILS" -Action "BLOCK" -Target "Target_example")) # 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
Name | Type | Description | Notes |
---|---|---|---|
TestNewInboxRulesetOptions | TestNewInboxRulesetOptions |
Return type
InboxRulesetTestResult (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]