BokaMera.API.Host

<back to all web services

ListWebhookMessageAttempts

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/webhook/messages/{MessageId}/attemptsList webhook message attempts
// @ts-nocheck

export class WebhookMessageAttempt
{
    public Id: string;
    public MessageId: string;
    public EndpointId: string;
    public Url: string;
    public Status: string;
    public ResponseStatusCode?: number;
    public Timestamp: string;
    public TriggerType: string;

    public constructor(init?: Partial<WebhookMessageAttempt>) { (Object as any).assign(this, init); }
}

export class ListMessageAttemptsResponse
{
    public Attempts: WebhookMessageAttempt[] = [];
    public Done: boolean;
    public Iterator?: string;

    public constructor(init?: Partial<ListMessageAttemptsResponse>) { (Object as any).assign(this, init); }
}

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ValidateRequest(Validator="IsAuthenticated")
export class ListWebhookMessageAttempts 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;

    /** @description The ID of the webhook message. */
    // @ApiMember(Description="The ID of the webhook message.", IsRequired=true, ParameterType="path")
    public MessageId: string;

    /** @description Pagination iterator. */
    // @ApiMember(Description="Pagination iterator.")
    public Iterator?: string;

    /** @description Maximum number of attempts to return. */
    // @ApiMember(Description="Maximum number of attempts to return.")
    public Limit?: number;

    /** @description 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 Status?: number;

    /** @description Filter by event types. */
    // @ApiMember(Description="Filter by event types.")
    public EventTypes?: string[];

    /** @description Filter by endpoint ID. */
    // @ApiMember(Description="Filter by endpoint ID.")
    public EndpointId?: string;

    /** @description Filter attempts before this date. */
    // @ApiMember(Description="Filter attempts before this date.")
    public Before?: string;

    /** @description Filter attempts after this date. */
    // @ApiMember(Description="Filter attempts after this date.")
    public After?: string;

    public constructor(init?: Partial<ListWebhookMessageAttempts>) { (Object as any).assign(this, init); }
}

TypeScript ListWebhookMessageAttempts 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/messages/{MessageId}/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"}