ClubManager.Api

<back to all web services

FindMessage

Requires Authentication
Required role:API
The following routes are available for this service:
All Verbs/api/Query/Message
namespace ClubManager.Api.Services.Query

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type MessageTemplateInstance() = 
        member val MessageTemplateId:Int32 = new Int32() with get,set
        member val Name:String = null with get,set
        member val Subject:String = null with get,set
        member val Body:String = null with get,set
        member val ReportId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val TemplateType:Int32 = new Int32() with get,set
        member val Created:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val CreatedBy:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val Modified:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val ModifiedBy:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val Deleted:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val DeletedBy:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val EventType:Int32 = new Int32() with get,set
        member val ContentType:Int32 = new Int32() with get,set
        member val Hidden:Nullable<Boolean> = new Nullable<Boolean>() with get,set
        member val ParentMessageTemplateId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val InclusionTags:String = null with get,set
        member val ExclusionTags:String = null with get,set

    [<AllowNullLiteral>]
    type UserInstance() = 
        member val UserId:Int32 = new Int32() with get,set
        member val UserName:String = null with get,set
        member val Name:String = null with get,set
        member val Email:String = null with get,set
        member val MobilePhone:String = null with get,set
        member val Enabled:Boolean = new Boolean() with get,set
        member val LastLogin:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val Created:DateTime = new DateTime() with get,set
        member val Training:Boolean = new Boolean() with get,set
        member val Deleted:Boolean = new Boolean() with get,set
        member val CoursesCompleted:Int32 = new Int32() with get,set
        member val DisplayHomeNotification:Nullable<Boolean> = new Nullable<Boolean>() with get,set
        member val TwoFactorEnabled:Boolean = new Boolean() with get,set
        member val EmailConfirmed:Boolean = new Boolean() with get,set
        member val MobilePhoneConfirmed:Boolean = new Boolean() with get,set
        member val Notifications:Boolean = new Boolean() with get,set
        member val ChangePassword:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val Activated:Nullable<DateTime> = new Nullable<DateTime>() with get,set

    [<AllowNullLiteral>]
    type MessageInstance() = 
        member val MessageId:Int32 = new Int32() with get,set
        member val DueDate:DateTime = new DateTime() with get,set
        member val SentDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val Processed:Boolean = new Boolean() with get,set
        member val Failures:Int32 = new Int32() with get,set
        member val InstanceId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val MessageSid:String = null with get,set
        member val MessageTemplate:MessageTemplateInstance = null with get,set
        [<References(typeof<MessageTemplateInstance>)>]
        member val MessageTemplateId:Nullable<Int32> = new Nullable<Int32>() with get,set

        member val OpenedDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val BouncedDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val DeliveredDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val UnsubscribedDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val SpamReportDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val User:UserInstance = null with get,set
        [<References(typeof<UserInstance>)>]
        member val UserId:Nullable<Int32> = new Nullable<Int32>() with get,set

        member val InstanceType:Nullable<Int32> = new Nullable<Int32>() with get,set

    [<AutoQueryViewer(Description="", IconUrl="octicon:database", Title="Message")>]
    [<AllowNullLiteral>]
    type FindMessage() = 
        inherit QueryDb<MessageInstance>()

    [<DataContract>]
    [<AllowNullLiteral>]
    type QueryBase() = 
        [<DataMember(Order=1)>]
        member val Skip:Nullable<Int32> = new Nullable<Int32>() with get,set

        [<DataMember(Order=2)>]
        member val Take:Nullable<Int32> = new Nullable<Int32>() with get,set

        [<DataMember(Order=3)>]
        member val OrderBy:String = null with get,set

        [<DataMember(Order=4)>]
        member val OrderByDesc:String = null with get,set

        [<DataMember(Order=5)>]
        member val Include:String = null with get,set

        [<DataMember(Order=6)>]
        member val Fields:String = null with get,set

        [<DataMember(Order=7)>]
        member val Meta:Dictionary<String, String> = new Dictionary<String, String>() with get,set

    [<AllowNullLiteral>]
    type QueryDb<'T>() = 
        inherit QueryBase()

    [<DataContract>]
    [<AllowNullLiteral>]
    type QueryResponse<'T>() = 
        [<DataMember(Order=1)>]
        member val Offset:Int32 = new Int32() with get,set

        [<DataMember(Order=2)>]
        member val Total:Int32 = new Int32() with get,set

        [<DataMember(Order=3)>]
        member val Results:ResizeArray<'T> = new ResizeArray<'T>() with get,set

        [<DataMember(Order=4)>]
        member val Meta:Dictionary<String, String> = new Dictionary<String, String>() with get,set

        [<DataMember(Order=5)>]
        member val ResponseStatus:ResponseStatus = null with get,set

F# FindMessage DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/Query/Message HTTP/1.1 
Host: api.clubmanagercentral.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"Skip":0,"Take":0,"OrderBy":"String","OrderByDesc":"String","Include":"String","Fields":"String","Meta":{"String":"String"}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Offset":0,"Total":0,"Results":[{"MessageId":0,"DueDate":"0001-01-01T00:00:00.0000000","SentDate":"0001-01-01T00:00:00.0000000","Processed":false,"Failures":0,"InstanceId":0,"MessageSid":"String","MessageTemplate":{"MessageTemplateId":0,"Name":"String","Subject":"String","Body":"String","ReportId":0,"TemplateType":0,"Created":"0001-01-01T00:00:00.0000000","CreatedBy":0,"Modified":"0001-01-01T00:00:00.0000000","ModifiedBy":0,"Deleted":"0001-01-01T00:00:00.0000000","DeletedBy":0,"EventType":0,"ContentType":0,"Hidden":false,"ParentMessageTemplateId":0,"InclusionTags":"String","ExclusionTags":"String"},"MessageTemplateId":0,"OpenedDate":"0001-01-01T00:00:00.0000000","BouncedDate":"0001-01-01T00:00:00.0000000","DeliveredDate":"0001-01-01T00:00:00.0000000","UnsubscribedDate":"0001-01-01T00:00:00.0000000","SpamReportDate":"0001-01-01T00:00:00.0000000","User":{"UserId":0,"UserName":"String","Name":"String","Email":"String","MobilePhone":"String","Enabled":false,"LastLogin":"0001-01-01T00:00:00.0000000","Created":"0001-01-01T00:00:00.0000000","Training":false,"Deleted":false,"CoursesCompleted":0,"DisplayHomeNotification":false,"TwoFactorEnabled":false,"EmailConfirmed":false,"MobilePhoneConfirmed":false,"Notifications":false,"ChangePassword":"0001-01-01T00:00:00.0000000","Activated":"0001-01-01T00:00:00.0000000"},"UserId":0,"InstanceType":0}],"Meta":{"String":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}