Search Results for

    Show / Hide Table of Contents

    Interface IAttachmentControllerApiSync

    Represents a collection of functions to interact with the API endpoints

    Inherited Members
    IApiAccessor.Configuration
    IApiAccessor.GetBasePath()
    IApiAccessor.ExceptionFactory
    Namespace: mailslurp.Api
    Assembly: mailslurp.dll
    Syntax
    public interface IAttachmentControllerApiSync : IApiAccessor

    Methods

    View Source

    DeleteAllAttachments(int)

    Delete all attachments

    Declaration
    void DeleteAllAttachments(int operationIndex = 0)
    Parameters
    Type Name Description
    int operationIndex

    Index associated with the operation.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    DeleteAllAttachmentsWithHttpInfo(int)

    Delete all attachments

    Declaration
    ApiResponse<object> DeleteAllAttachmentsWithHttpInfo(int operationIndex = 0)
    Parameters
    Type Name Description
    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<object>

    ApiResponse of Object(void)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    DeleteAttachment(string, int)

    Delete an attachment

    Declaration
    void DeleteAttachment(string attachmentId, int operationIndex = 0)
    Parameters
    Type Name Description
    string attachmentId

    ID of attachment

    int operationIndex

    Index associated with the operation.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    DeleteAttachmentWithHttpInfo(string, int)

    Delete an attachment

    Declaration
    ApiResponse<object> DeleteAttachmentWithHttpInfo(string attachmentId, int operationIndex = 0)
    Parameters
    Type Name Description
    string attachmentId

    ID of attachment

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<object>

    ApiResponse of Object(void)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    DownloadAttachmentAsBase64Encoded(string, int)

    Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents.

    Declaration
    DownloadAttachmentDto DownloadAttachmentAsBase64Encoded(string attachmentId, int operationIndex = 0)
    Parameters
    Type Name Description
    string attachmentId

    ID of attachment

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    DownloadAttachmentDto

    DownloadAttachmentDto

    Remarks

    Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the downloadAttachment method but allows some clients to get around issues with binary responses.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    DownloadAttachmentAsBase64EncodedWithHttpInfo(string, int)

    Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents.

    Declaration
    ApiResponse<DownloadAttachmentDto> DownloadAttachmentAsBase64EncodedWithHttpInfo(string attachmentId, int operationIndex = 0)
    Parameters
    Type Name Description
    string attachmentId

    ID of attachment

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<DownloadAttachmentDto>

    ApiResponse of DownloadAttachmentDto

    Remarks

    Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the downloadAttachment method but allows some clients to get around issues with binary responses.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    DownloadAttachmentAsBytes(string, int)

    Download attachments. Get email attachment bytes. If you have trouble with byte responses try the downloadAttachmentBase64 response endpoints.

    Declaration
    byte[] DownloadAttachmentAsBytes(string attachmentId, int operationIndex = 0)
    Parameters
    Type Name Description
    string attachmentId

    ID of attachment

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    byte[]

    byte[]

    Remarks

    Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    DownloadAttachmentAsBytesWithHttpInfo(string, int)

    Download attachments. Get email attachment bytes. If you have trouble with byte responses try the downloadAttachmentBase64 response endpoints.

    Declaration
    ApiResponse<byte[]> DownloadAttachmentAsBytesWithHttpInfo(string attachmentId, int operationIndex = 0)
    Parameters
    Type Name Description
    string attachmentId

    ID of attachment

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<byte[]>

    ApiResponse of byte[]

    Remarks

    Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetAttachment(string, int)

    Get an attachment entity

    Declaration
    AttachmentEntity GetAttachment(string attachmentId, int operationIndex = 0)
    Parameters
    Type Name Description
    string attachmentId

    ID of attachment

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    AttachmentEntity

    AttachmentEntity

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetAttachmentInfo(string, int)

    Get email attachment metadata information

    Declaration
    AttachmentMetaData GetAttachmentInfo(string attachmentId, int operationIndex = 0)
    Parameters
    Type Name Description
    string attachmentId

    ID of attachment

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    AttachmentMetaData

    AttachmentMetaData

    Remarks

    Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties name and content-type and content-length in bytes for a given attachment.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetAttachmentInfoWithHttpInfo(string, int)

    Get email attachment metadata information

    Declaration
    ApiResponse<AttachmentMetaData> GetAttachmentInfoWithHttpInfo(string attachmentId, int operationIndex = 0)
    Parameters
    Type Name Description
    string attachmentId

    ID of attachment

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<AttachmentMetaData>

    ApiResponse of AttachmentMetaData

    Remarks

    Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties name and content-type and content-length in bytes for a given attachment.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetAttachments(int?, int?, string, string, DateTime?, DateTime?, Guid?, int)

    Get email attachments

    Declaration
    PageAttachmentEntity GetAttachments(int? page = null, int? size = null, string sort = null, string fileNameFilter = null, DateTime? since = null, DateTime? before = null, Guid? inboxId = null, int operationIndex = 0)
    Parameters
    Type Name Description
    int? page

    Optional page index for list pagination (optional, default to 0)

    int? size

    Optional page size for list pagination (optional, default to 20)

    string sort

    Optional createdAt sort direction ASC or DESC (optional, default to ASC)

    string fileNameFilter

    Optional file name and content type search filter (optional)

    DateTime? since

    Filter by created at after the given timestamp (optional)

    DateTime? before

    Filter by created at before the given timestamp (optional)

    System.Guid? inboxId

    Optional inboxId to filter attachments by (optional)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    PageAttachmentEntity

    PageAttachmentEntity

    Remarks

    Get all attachments in paginated response. Each entity contains meta data for the attachment such as name and content-type. Use the attachmentId and the download endpoints to get the file contents.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetAttachmentsWithHttpInfo(int?, int?, string, string, DateTime?, DateTime?, Guid?, int)

    Get email attachments

    Declaration
    ApiResponse<PageAttachmentEntity> GetAttachmentsWithHttpInfo(int? page = null, int? size = null, string sort = null, string fileNameFilter = null, DateTime? since = null, DateTime? before = null, Guid? inboxId = null, int operationIndex = 0)
    Parameters
    Type Name Description
    int? page

    Optional page index for list pagination (optional, default to 0)

    int? size

    Optional page size for list pagination (optional, default to 20)

    string sort

    Optional createdAt sort direction ASC or DESC (optional, default to ASC)

    string fileNameFilter

    Optional file name and content type search filter (optional)

    DateTime? since

    Filter by created at after the given timestamp (optional)

    DateTime? before

    Filter by created at before the given timestamp (optional)

    System.Guid? inboxId

    Optional inboxId to filter attachments by (optional)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<PageAttachmentEntity>

    ApiResponse of PageAttachmentEntity

    Remarks

    Get all attachments in paginated response. Each entity contains meta data for the attachment such as name and content-type. Use the attachmentId and the download endpoints to get the file contents.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetAttachmentWithHttpInfo(string, int)

    Get an attachment entity

    Declaration
    ApiResponse<AttachmentEntity> GetAttachmentWithHttpInfo(string attachmentId, int operationIndex = 0)
    Parameters
    Type Name Description
    string attachmentId

    ID of attachment

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<AttachmentEntity>

    ApiResponse of AttachmentEntity

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    UploadAttachment(UploadAttachmentOptions, int)

    Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment.

    Declaration
    List<string> UploadAttachment(UploadAttachmentOptions uploadAttachmentOptions, int operationIndex = 0)
    Parameters
    Type Name Description
    UploadAttachmentOptions uploadAttachmentOptions
    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    System.Collections.Generic.List<T><string>

    List<string>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    UploadAttachmentBytes(string, string, string, string, string, int)

    Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment.

    Declaration
    List<string> UploadAttachmentBytes(string contentType = null, string contentType2 = null, string contentId = null, string filename = null, string filename2 = null, int operationIndex = 0)
    Parameters
    Type Name Description
    string contentType

    (optional)

    string contentType2

    Optional contentType for file. For instance application/pdf (optional)

    string contentId

    Optional content ID (CID) to save upload with (optional)

    string filename

    Optional filename to save upload with (optional)

    string filename2

    (optional)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    System.Collections.Generic.List<T><string>

    List<string>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    UploadAttachmentBytesWithHttpInfo(string, string, string, string, string, int)

    Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment.

    Declaration
    ApiResponse<List<string>> UploadAttachmentBytesWithHttpInfo(string contentType = null, string contentType2 = null, string contentId = null, string filename = null, string filename2 = null, int operationIndex = 0)
    Parameters
    Type Name Description
    string contentType

    (optional)

    string contentType2

    Optional contentType for file. For instance application/pdf (optional)

    string contentId

    Optional content ID (CID) to save upload with (optional)

    string filename

    Optional filename to save upload with (optional)

    string filename2

    (optional)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<System.Collections.Generic.List<T><string>>

    ApiResponse of List<string>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    UploadAttachmentWithHttpInfo(UploadAttachmentOptions, int)

    Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment.

    Declaration
    ApiResponse<List<string>> UploadAttachmentWithHttpInfo(UploadAttachmentOptions uploadAttachmentOptions, int operationIndex = 0)
    Parameters
    Type Name Description
    UploadAttachmentOptions uploadAttachmentOptions
    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<System.Collections.Generic.List<T><string>>

    ApiResponse of List<string>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    UploadMultipartForm(string, string, string, string, UploadMultipartFormRequest, int)

    Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.

    Declaration
    List<string> UploadMultipartForm(string contentId = null, string contentType = null, string filename = null, string xFilename = null, UploadMultipartFormRequest uploadMultipartFormRequest = null, int operationIndex = 0)
    Parameters
    Type Name Description
    string contentId

    Optional content ID of attachment (optional)

    string contentType

    Optional content type of attachment (optional)

    string filename

    Optional name of file (optional)

    string xFilename

    Optional content type header of attachment (optional)

    UploadMultipartFormRequest uploadMultipartFormRequest

    (optional)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    System.Collections.Generic.List<T><string>

    List<string>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    UploadMultipartFormWithHttpInfo(string, string, string, string, UploadMultipartFormRequest, int)

    Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.

    Declaration
    ApiResponse<List<string>> UploadMultipartFormWithHttpInfo(string contentId = null, string contentType = null, string filename = null, string xFilename = null, UploadMultipartFormRequest uploadMultipartFormRequest = null, int operationIndex = 0)
    Parameters
    Type Name Description
    string contentId

    Optional content ID of attachment (optional)

    string contentType

    Optional content type of attachment (optional)

    string filename

    Optional name of file (optional)

    string xFilename

    Optional content type header of attachment (optional)

    UploadMultipartFormRequest uploadMultipartFormRequest

    (optional)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<System.Collections.Generic.List<T><string>>

    ApiResponse of List<string>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    • View Source
    In This Article
    Back to top See MailSlurp website for more information.