BokaMera.API.Host

<back to all web services

ListWebhookEndpointAttempts

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/webhook/endpoints/{EndpointId}/attemptsList webhook endpoint attempts
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos

Namespace Global

    Namespace BokaMera.API.ServiceModel.Dtos

        Public Partial Class ListMessageAttemptsResponse
            Public Overridable Property Attempts As List(Of WebhookMessageAttempt) = New List(Of WebhookMessageAttempt)
            Public Overridable Property Done As Boolean
            Public Overridable Property Iterator As String
        End Class

        <ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
        <ValidateRequest(Validator:="IsAuthenticated")>
        Public Partial Class ListWebhookEndpointAttempts
            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 Guid? Implements ICompany.CompanyId

            '''<Summary>
            '''The ID of the webhook endpoint.
            '''</Summary>
            <ApiMember(Description:="The ID of the webhook endpoint.", IsRequired:=true, ParameterType:="path")>
            Public Overridable Property EndpointId As String

            '''<Summary>
            '''Pagination iterator.
            '''</Summary>
            <ApiMember(Description:="Pagination iterator.")>
            Public Overridable Property Iterator As String

            '''<Summary>
            '''Maximum number of attempts to return.
            '''</Summary>
            <ApiMember(Description:="Maximum number of attempts to return.")>
            Public Overridable Property Limit As Integer?

            '''<Summary>
            '''Filter by message status. 0 = Success, 1 = Pending, 2 = Fail, 3 = Sending.
            '''</Summary>
            <ApiMember(Description:="Filter by message status. 0 = Success, 1 = Pending, 2 = Fail, 3 = Sending.")>
            Public Overridable Property Status As Integer?

            '''<Summary>
            '''Filter by event types.
            '''</Summary>
            <ApiMember(Description:="Filter by event types.")>
            Public Overridable Property EventTypes As List(Of String)

            '''<Summary>
            '''Filter attempts before this date.
            '''</Summary>
            <ApiMember(Description:="Filter attempts before this date.")>
            Public Overridable Property Before As Date?

            '''<Summary>
            '''Filter attempts after this date.
            '''</Summary>
            <ApiMember(Description:="Filter attempts after this date.")>
            Public Overridable Property After As Date?
        End Class

        Public Partial Class WebhookMessageAttempt
            Public Overridable Property Id As String
            Public Overridable Property MessageId As String
            Public Overridable Property EndpointId As String
            Public Overridable Property Url As String
            Public Overridable Property Status As String
            Public Overridable Property ResponseStatusCode As Integer?
            Public Overridable Property Timestamp As Date
            Public Overridable Property TriggerType As String
        End Class
    End Namespace
End Namespace

VB.NET ListWebhookEndpointAttempts DTOs

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

HTTP + OTHER

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

GET /webhook/endpoints/{EndpointId}/attempts HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Attempts":[{"Id":"String","MessageId":"String","EndpointId":"String","Url":"String","Status":"String","ResponseStatusCode":0,"TriggerType":"String"}],"Done":false,"Iterator":"String"}