mailslurp.api.InboxRulesetControllerApi
Load the API package
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
createNewInboxRuleset | POST /rulesets | Create an inbox ruleset |
deleteInboxRuleset | DELETE /rulesets/{id} | Delete an inbox ruleset |
deleteInboxRulesets | DELETE /rulesets | Delete inbox rulesets |
getInboxRuleset | GET /rulesets/{id} | Get an inbox ruleset |
getInboxRulesets | GET /rulesets | List inbox rulesets |
testInboxRuleset | POST /rulesets/{id}/test | Test an inbox ruleset |
testInboxRulesetsForInbox | PUT /rulesets | Test inbox rulesets for inbox |
testNewInboxRuleset | PATCH /rulesets | Test new inbox ruleset |
InboxRulesetDto createNewInboxRuleset(inboxId, createInboxRulesetOptions)
Create an inbox ruleset
Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = InboxRulesetControllerApi();
final inboxId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | Inbox id to attach ruleset to
final createInboxRulesetOptions = CreateInboxRulesetOptions(); // CreateInboxRulesetOptions |
try {
final result = api_instance.createNewInboxRuleset(inboxId, createInboxRulesetOptions);
print(result);
} catch (e) {
print('Exception when calling InboxRulesetControllerApi->createNewInboxRuleset: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | String | Inbox id to attach ruleset to | |
createInboxRulesetOptions | CreateInboxRulesetOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
deleteInboxRuleset(id)
Delete an inbox ruleset
Delete inbox ruleset
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = InboxRulesetControllerApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | ID of inbox ruleset
try {
api_instance.deleteInboxRuleset(id);
} catch (e) {
print('Exception when calling InboxRulesetControllerApi->deleteInboxRuleset: $en');
}
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 ]
deleteInboxRulesets(inboxId)
Delete inbox rulesets
Delete inbox rulesets. Accepts optional inboxId filter.
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = InboxRulesetControllerApi();
final inboxId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | Optional inbox id to attach ruleset to
try {
api_instance.deleteInboxRulesets(inboxId);
} catch (e) {
print('Exception when calling InboxRulesetControllerApi->deleteInboxRulesets: $en');
}
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 getInboxRuleset(id)
Get an inbox ruleset
Get inbox ruleset
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = InboxRulesetControllerApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | ID of inbox ruleset
try {
final result = api_instance.getInboxRuleset(id);
print(result);
} catch (e) {
print('Exception when calling InboxRulesetControllerApi->getInboxRuleset: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | String | ID of inbox ruleset |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageInboxRulesetDto getInboxRulesets(inboxId, page, size, sort, searchFilter, since, before)
List inbox rulesets
List all rulesets attached to an inbox
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = InboxRulesetControllerApi();
final inboxId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | Optional inbox id to get rulesets from
final page = 56; // int | Optional page in inbox ruleset list pagination
final size = 56; // int | Optional page size in inbox ruleset list pagination
final sort = sort_example; // String | Optional createdAt sort direction ASC or DESC
final searchFilter = searchFilter_example; // String | Optional search filter
final since = 2013-10-20T19:20:30+01:00; // DateTime | Filter by created at after the given timestamp
final before = 2013-10-20T19:20:30+01:00; // DateTime | Filter by created at before the given timestamp
try {
final result = api_instance.getInboxRulesets(inboxId, page, size, sort, searchFilter, since, before);
print(result);
} catch (e) {
print('Exception when calling InboxRulesetControllerApi->getInboxRulesets: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | String | Optional inbox id to get rulesets from | [optional] |
page | int | Optional page in inbox ruleset list pagination | [optional] [default to 0] |
size | int | 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 | DateTime | Filter by created at after the given timestamp | [optional] |
before | DateTime | Filter by created at before the given timestamp | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
InboxRulesetTestResult testInboxRuleset(id, inboxRulesetTestOptions)
Test an inbox ruleset
Test an inbox ruleset
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = InboxRulesetControllerApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | ID of inbox ruleset
final inboxRulesetTestOptions = InboxRulesetTestOptions(); // InboxRulesetTestOptions |
try {
final result = api_instance.testInboxRuleset(id, inboxRulesetTestOptions);
print(result);
} catch (e) {
print('Exception when calling InboxRulesetControllerApi->testInboxRuleset: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | String | ID of inbox ruleset | |
inboxRulesetTestOptions | InboxRulesetTestOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
InboxRulesetTestResult testInboxRulesetsForInbox(inboxId, inboxRulesetTestOptions)
Test inbox rulesets for inbox
Test inbox rulesets for inbox
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = InboxRulesetControllerApi();
final inboxId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | ID of inbox
final inboxRulesetTestOptions = InboxRulesetTestOptions(); // InboxRulesetTestOptions |
try {
final result = api_instance.testInboxRulesetsForInbox(inboxId, inboxRulesetTestOptions);
print(result);
} catch (e) {
print('Exception when calling InboxRulesetControllerApi->testInboxRulesetsForInbox: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | String | ID of inbox | |
inboxRulesetTestOptions | InboxRulesetTestOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
InboxRulesetTestResult testNewInboxRuleset(testNewInboxRulesetOptions)
Test new inbox ruleset
Test new inbox ruleset
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = InboxRulesetControllerApi();
final testNewInboxRulesetOptions = TestNewInboxRulesetOptions(); // TestNewInboxRulesetOptions |
try {
final result = api_instance.testNewInboxRuleset(testNewInboxRulesetOptions);
print(result);
} catch (e) {
print('Exception when calling InboxRulesetControllerApi->testNewInboxRuleset: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
testNewInboxRulesetOptions | TestNewInboxRulesetOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]