mailslurp.Api.ExpiredControllerApi
All URIs are relative to https://csharp.api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
GetExpirationDefaults | GET /expired/defaults | Get default expiration settings |
GetExpiredInboxByInboxId | GET /expired/inbox/{inboxId} | Get expired inbox record for a previously existing inbox |
GetExpiredInboxRecord | GET /expired/{expiredId} | Get an expired inbox record |
GetExpiredInboxes | GET /expired | List records of expired inboxes |
ExpirationDefaults GetExpirationDefaults ()
Get default expiration settings
Return default times used for inbox expiration
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetExpirationDefaultsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.api.mailslurp.com";
// Configure API key authorization: API_KEY
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new ExpiredControllerApi(config);
try
{
// Get default expiration settings
ExpirationDefaults result = apiInstance.GetExpirationDefaults();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ExpiredControllerApi.GetExpirationDefaults: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetExpirationDefaultsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get default expiration settings
ApiResponse<ExpirationDefaults> response = apiInstance.GetExpirationDefaultsWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ExpiredControllerApi.GetExpirationDefaultsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
ExpiredInboxDto GetExpiredInboxByInboxId (Guid 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
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetExpiredInboxByInboxIdExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.api.mailslurp.com";
// Configure API key authorization: API_KEY
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new ExpiredControllerApi(config);
var inboxId = "inboxId_example"; // Guid | ID of inbox you want to retrieve (not the inbox ID)
try
{
// Get expired inbox record for a previously existing inbox
ExpiredInboxDto result = apiInstance.GetExpiredInboxByInboxId(inboxId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxByInboxId: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetExpiredInboxByInboxIdWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get expired inbox record for a previously existing inbox
ApiResponse<ExpiredInboxDto> response = apiInstance.GetExpiredInboxByInboxIdWithHttpInfo(inboxId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxByInboxIdWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | Guid | ID of inbox you want to retrieve (not the inbox ID) |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
ExpiredInboxDto GetExpiredInboxRecord (Guid 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
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetExpiredInboxRecordExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.api.mailslurp.com";
// Configure API key authorization: API_KEY
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new ExpiredControllerApi(config);
var expiredId = "expiredId_example"; // Guid | 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
try
{
// Get an expired inbox record
ExpiredInboxDto result = apiInstance.GetExpiredInboxRecord(expiredId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxRecord: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetExpiredInboxRecordWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get an expired inbox record
ApiResponse<ExpiredInboxDto> response = apiInstance.GetExpiredInboxRecordWithHttpInfo(expiredId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxRecordWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
expiredId | Guid | 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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageExpiredInboxRecordProjection GetExpiredInboxes (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null)
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
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetExpiredInboxesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.api.mailslurp.com";
// Configure API key authorization: API_KEY
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new ExpiredControllerApi(config);
var page = 0; // int? | Optional page in inbox sent email list pagination (optional) (default to 0)
var size = 20; // int? | Optional page size in inbox sent email list pagination (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional)
try
{
// List records of expired inboxes
PageExpiredInboxRecordProjection result = apiInstance.GetExpiredInboxes(page, size, sort, since, before);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxes: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetExpiredInboxesWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// List records of expired inboxes
ApiResponse<PageExpiredInboxRecordProjection> response = apiInstance.GetExpiredInboxesWithHttpInfo(page, size, sort, since, before);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
page | int? | Optional page in inbox sent email list pagination | [optional] [default to 0] |
size | int? | 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 | DateTime? | Filter by created at after the given timestamp | [optional] |
before | DateTime? | Filter by created at before the given timestamp | [optional] |
Return type
PageExpiredInboxRecordProjection
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]