Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
GET | /webhook/messages | List webhook message |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Imports Webhook.Service.External.Models.Models
Namespace Global
Namespace BokaMera.API.ServiceModel.Dtos
<ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
<ValidateRequest(Validator:="IsAuthenticated")>
Public Partial Class ListWebhookMessages
Inherits ListMessagesRequestDto
Implements ICompany
'''<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")>
Public Overridable Property CompanyId As Nullable(Of Guid)
End Class
End Namespace
Namespace Webhook.Service.External.Models.Models
Public Partial Class ClientWebhookRequestBase
Public Overridable Property ClientId As Guid
End Class
Public Partial Class GetMessageResponseDto
Public Sub New()
Channels = New List(Of String)
Metadata = New Dictionary(Of String, String)
End Sub
Public Overridable Property Id As String
Public Overridable Property Channels As List(Of String)
Public Overridable Property EventType As String
Public Overridable Property Metadata As Dictionary(Of String, String)
Public Overridable Property Payload As Object
Public Overridable Property EventId As String
Public Overridable Property Timestamp As Date
End Class
Public Partial Class ListMessagesRequestDto
Inherits ClientWebhookRequestBase
Public Sub New()
EventTypes = New List(Of String)
End Sub
Public Overridable Property Before As Nullable(Of Date)
Public Overridable Property After As Nullable(Of Date)
Public Overridable Property Channel As String
Public Overridable Property Iterator As String
Public Overridable Property Limit As Nullable(Of Integer)
Public Overridable Property Order As Nullable(Of Ordering)
Public Overridable Property EventTypes As List(Of String)
Public Overridable Property WithContent As Nullable(Of Boolean)
End Class
Public Partial Class ListMessagesResponseDto
Public Sub New()
Data = New GetMessageResponseDto(){}
End Sub
Public Overridable Property Data As GetMessageResponseDto()
Public Overridable Property Done As Boolean
Public Overridable Property Iterator As String
End Class
Public Enum Ordering
<EnumMember(Value:="ascending")>
Ascending = 1
<EnumMember(Value:="descending")>
Descending = 2
End Enum
End Namespace
End Namespace
VB.NET ListWebhookMessages DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=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"}