BokaMera.API.Host

<back to all web services

ListWebhookMessages

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/webhook/messagesList webhook message
namespace BokaMera.API.ServiceModel.Dtos

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

    [<AllowNullLiteral>]
    type ListMessagesResponseDto() = 
        member val Data:GetMessageResponseDto[] = [||] with get,set
        member val Done:Boolean = new Boolean() with get,set
        member val Iterator:String = null with get,set

    [<AllowNullLiteral>]
    type ClientWebhookRequestBase() = 
        member val ClientId:Guid = new Guid() with get,set

    type Ordering =
        | Ascending = 1
        | Descending = 2

    [<AllowNullLiteral>]
    type ListMessagesRequestDto() = 
        inherit ClientWebhookRequestBase()
        member val Before:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val After:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val Channel:String = null with get,set
        member val Iterator:String = null with get,set
        member val Limit:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val Order:Nullable<Ordering> = new Nullable<Ordering>() with get,set
        member val EventTypes:ResizeArray<String> = new ResizeArray<String>() with get,set
        member val WithContent:Nullable<Boolean> = new Nullable<Boolean>() with get,set

    [<ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)>]
    [<ValidateRequest(Validator="IsAuthenticated")>]
    [<AllowNullLiteral>]
    type ListWebhookMessages() = 
        inherit ListMessagesRequestDto()
        ///<summary>
        ///The company id, if empty will use the company id for the user you are logged in with.
        ///</summary>
        [<ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.", IsRequired=true, ParameterType="query")>]
        member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set

    [<AllowNullLiteral>]
    type GetMessageResponseDto() = 
        member val Id:String = null with get,set
        member val Channels:ResizeArray<String> = new ResizeArray<String>() with get,set
        member val EventType:String = null with get,set
        member val Metadata:Dictionary<String, String> = new Dictionary<String, String>() with get,set
        member val Payload:Object = null with get,set
        member val EventId:String = null with get,set
        member val Timestamp:DateTime = new DateTime() with get,set

F# ListWebhookMessages 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.

GET /webhook/messages HTTP/1.1 
Host: api.bokamera.se 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Data":[{"Id":"String","Channels":["String"],"EventType":"String","Metadata":{"String":"String"},"Payload":{},"EventId":"String"}],"Done":false,"Iterator":"String"}