Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
GET | /webhook/messages | List webhook message |
---|
export class ClientWebhookRequestBase
{
public ClientId: string;
public constructor(init?: Partial<ClientWebhookRequestBase>) { (Object as any).assign(this, init); }
}
export enum Ordering
{
Ascending = 'ascending',
Descending = 'descending',
}
export class ListMessagesRequestDto extends ClientWebhookRequestBase
{
public Before?: string;
public After?: string;
public Channel?: string;
public Iterator?: string;
public Limit?: number;
public Order?: Ordering;
public EventTypes?: string[];
public WithContent?: boolean;
public constructor(init?: Partial<ListMessagesRequestDto>) { super(init); (Object as any).assign(this, init); }
}
export class ListMessagesResponseDto
{
public Data: GetMessageResponseDto[];
public Done: boolean;
public Iterator: string;
public constructor(init?: Partial<ListMessagesResponseDto>) { (Object as any).assign(this, init); }
}
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ValidateRequest(Validator="IsAuthenticated")
export class ListWebhookMessages extends ListMessagesRequestDto implements ICompany
{
/** @description 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 CompanyId: string;
public constructor(init?: Partial<ListWebhookMessages>) { super(init); (Object as any).assign(this, init); }
}
export class GetMessageResponseDto
{
public Id: string;
public Channels: string[];
public EventType: string;
public Metadata?: { [index: string]: string; };
public Payload: Object;
public EventId: string;
public Timestamp: string;
public constructor(init?: Partial<GetMessageResponseDto>) { (Object as any).assign(this, init); }
}
TypeScript ListWebhookMessages DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Data: [ { Id: String, Channels: [ String ], EventType: String, Metadata: { String: String }, Payload: {}, EventId: String } ], Done: False, Iterator: String }