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
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
    @ValidateRequest(Validator="IsAuthenticated")
    public static class ListWebhookEndpointAttempts implements ICompany
    {
        /**
        * The company id, if empty will use the company id for the user you are logged in with.
        */
        @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 UUID CompanyId = null;

        /**
        * The ID of the webhook endpoint.
        */
        @ApiMember(Description="The ID of the webhook endpoint.", IsRequired=true, ParameterType="path")
        public String EndpointId = null;

        /**
        * Pagination iterator.
        */
        @ApiMember(Description="Pagination iterator.")
        public String Iterator = null;

        /**
        * Maximum number of attempts to return.
        */
        @ApiMember(Description="Maximum number of attempts to return.")
        public Integer Limit = null;

        /**
        * Filter by message status. 0 = Success, 1 = Pending, 2 = Fail, 3 = Sending.
        */
        @ApiMember(Description="Filter by message status. 0 = Success, 1 = Pending, 2 = Fail, 3 = Sending.")
        public Integer Status = null;

        /**
        * Filter by event types.
        */
        @ApiMember(Description="Filter by event types.")
        public ArrayList<String> EventTypes = null;

        /**
        * Filter attempts before this date.
        */
        @ApiMember(Description="Filter attempts before this date.")
        public Date Before = null;

        /**
        * Filter attempts after this date.
        */
        @ApiMember(Description="Filter attempts after this date.")
        public Date After = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public ListWebhookEndpointAttempts setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public String getEndpointId() { return EndpointId; }
        public ListWebhookEndpointAttempts setEndpointId(String value) { this.EndpointId = value; return this; }
        public String getIterator() { return Iterator; }
        public ListWebhookEndpointAttempts setIterator(String value) { this.Iterator = value; return this; }
        public Integer getLimit() { return Limit; }
        public ListWebhookEndpointAttempts setLimit(Integer value) { this.Limit = value; return this; }
        public Integer getStatus() { return Status; }
        public ListWebhookEndpointAttempts setStatus(Integer value) { this.Status = value; return this; }
        public ArrayList<String> getEventTypes() { return EventTypes; }
        public ListWebhookEndpointAttempts setEventTypes(ArrayList<String> value) { this.EventTypes = value; return this; }
        public Date getBefore() { return Before; }
        public ListWebhookEndpointAttempts setBefore(Date value) { this.Before = value; return this; }
        public Date getAfter() { return After; }
        public ListWebhookEndpointAttempts setAfter(Date value) { this.After = value; return this; }
    }

    public static class ListMessageAttemptsResponse
    {
        public ArrayList<WebhookMessageAttempt> Attempts = new ArrayList<WebhookMessageAttempt>();
        public Boolean Done = null;
        public String Iterator = null;
        
        public ArrayList<WebhookMessageAttempt> getAttempts() { return Attempts; }
        public ListMessageAttemptsResponse setAttempts(ArrayList<WebhookMessageAttempt> value) { this.Attempts = value; return this; }
        public Boolean isDone() { return Done; }
        public ListMessageAttemptsResponse setDone(Boolean value) { this.Done = value; return this; }
        public String getIterator() { return Iterator; }
        public ListMessageAttemptsResponse setIterator(String value) { this.Iterator = value; return this; }
    }

    public static class WebhookMessageAttempt
    {
        public String Id = null;
        public String MessageId = null;
        public String EndpointId = null;
        public String Url = null;
        public String Status = null;
        public Integer ResponseStatusCode = null;
        public Date Timestamp = null;
        public String TriggerType = null;
        
        public String getId() { return Id; }
        public WebhookMessageAttempt setId(String value) { this.Id = value; return this; }
        public String getMessageId() { return MessageId; }
        public WebhookMessageAttempt setMessageId(String value) { this.MessageId = value; return this; }
        public String getEndpointId() { return EndpointId; }
        public WebhookMessageAttempt setEndpointId(String value) { this.EndpointId = value; return this; }
        public String getUrl() { return Url; }
        public WebhookMessageAttempt setUrl(String value) { this.Url = value; return this; }
        public String getStatus() { return Status; }
        public WebhookMessageAttempt setStatus(String value) { this.Status = value; return this; }
        public Integer getResponseStatusCode() { return ResponseStatusCode; }
        public WebhookMessageAttempt setResponseStatusCode(Integer value) { this.ResponseStatusCode = value; return this; }
        public Date getTimestamp() { return Timestamp; }
        public WebhookMessageAttempt setTimestamp(Date value) { this.Timestamp = value; return this; }
        public String getTriggerType() { return TriggerType; }
        public WebhookMessageAttempt setTriggerType(String value) { this.TriggerType = value; return this; }
    }

}

Java ListWebhookEndpointAttempts DTOs

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

HTTP + JSV

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/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

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