Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
GET | /webhook/messages | List webhook message |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
@ValidateRequest(Validator="IsAuthenticated")
public static class ListWebhookMessages extends ListMessagesRequestDto 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;
public UUID getCompanyId() { return CompanyId; }
public ListWebhookMessages setCompanyId(UUID value) { this.CompanyId = value; return this; }
}
public static class ListMessagesRequestDto extends ClientWebhookRequestBase
{
public Date Before = null;
public Date After = null;
public String Channel = null;
public String Iterator = null;
public Integer Limit = null;
public Ordering Order = null;
public ArrayList<String> EventTypes = null;
public Boolean WithContent = null;
public Date getBefore() { return Before; }
public ListMessagesRequestDto setBefore(Date value) { this.Before = value; return this; }
public Date getAfter() { return After; }
public ListMessagesRequestDto setAfter(Date value) { this.After = value; return this; }
public String getChannel() { return Channel; }
public ListMessagesRequestDto setChannel(String value) { this.Channel = value; return this; }
public String getIterator() { return Iterator; }
public ListMessagesRequestDto setIterator(String value) { this.Iterator = value; return this; }
public Integer getLimit() { return Limit; }
public ListMessagesRequestDto setLimit(Integer value) { this.Limit = value; return this; }
public Ordering getOrder() { return Order; }
public ListMessagesRequestDto setOrder(Ordering value) { this.Order = value; return this; }
public ArrayList<String> getEventTypes() { return EventTypes; }
public ListMessagesRequestDto setEventTypes(ArrayList<String> value) { this.EventTypes = value; return this; }
public Boolean isWithContent() { return WithContent; }
public ListMessagesRequestDto setWithContent(Boolean value) { this.WithContent = value; return this; }
}
public static class ClientWebhookRequestBase
{
public UUID ClientId = null;
public UUID getClientId() { return ClientId; }
public ClientWebhookRequestBase setClientId(UUID value) { this.ClientId = value; return this; }
}
public static enum Ordering
{
Ascending(1),
Descending(2);
private final int value;
Ordering(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static class ListMessagesResponseDto
{
public ArrayList<GetMessageResponseDto> Data = null;
public Boolean Done = null;
public String Iterator = null;
public ArrayList<GetMessageResponseDto> getData() { return Data; }
public ListMessagesResponseDto setData(ArrayList<GetMessageResponseDto> value) { this.Data = value; return this; }
public Boolean isDone() { return Done; }
public ListMessagesResponseDto setDone(Boolean value) { this.Done = value; return this; }
public String getIterator() { return Iterator; }
public ListMessagesResponseDto setIterator(String value) { this.Iterator = value; return this; }
}
public static class GetMessageResponseDto
{
public String Id = null;
public ArrayList<String> Channels = null;
public String EventType = null;
public HashMap<String,String> Metadata = null;
public Object Payload = null;
public String EventId = null;
public Date Timestamp = null;
public String getId() { return Id; }
public GetMessageResponseDto setId(String value) { this.Id = value; return this; }
public ArrayList<String> getChannels() { return Channels; }
public GetMessageResponseDto setChannels(ArrayList<String> value) { this.Channels = value; return this; }
public String getEventType() { return EventType; }
public GetMessageResponseDto setEventType(String value) { this.EventType = value; return this; }
public HashMap<String,String> getMetadata() { return Metadata; }
public GetMessageResponseDto setMetadata(HashMap<String,String> value) { this.Metadata = value; return this; }
public Object getPayload() { return Payload; }
public GetMessageResponseDto setPayload(Object value) { this.Payload = value; return this; }
public String getEventId() { return EventId; }
public GetMessageResponseDto setEventId(String value) { this.EventId = value; return this; }
public Date getTimestamp() { return Timestamp; }
public GetMessageResponseDto setTimestamp(Date value) { this.Timestamp = value; return this; }
}
}
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"}