| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| GET | /webhook/messages/{MessageId}/attempts | List webhook message attempts |
|---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;
namespace BokaMera.API.ServiceModel.Dtos
{
public partial class ListMessageAttemptsResponse
{
public virtual List<WebhookMessageAttempt> Attempts { get; set; } = [];
public virtual bool Done { get; set; }
public virtual string? Iterator { get; set; }
}
[ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)]
[ValidateRequest("IsAuthenticated")]
public partial class ListWebhookMessageAttempts
: 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 virtual Guid CompanyId { get; set; }
///<summary>
///The ID of the webhook message.
///</summary>
[ApiMember(Description="The ID of the webhook message.", IsRequired=true, ParameterType="path")]
public virtual string MessageId { get; set; }
///<summary>
///Pagination iterator.
///</summary>
[ApiMember(Description="Pagination iterator.")]
public virtual string? Iterator { get; set; }
///<summary>
///Maximum number of attempts to return.
///</summary>
[ApiMember(Description="Maximum number of attempts to return.")]
public virtual int? Limit { get; set; }
///<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 virtual int? Status { get; set; }
///<summary>
///Filter by event types.
///</summary>
[ApiMember(Description="Filter by event types.")]
public virtual List<string>? EventTypes { get; set; }
///<summary>
///Filter by endpoint ID.
///</summary>
[ApiMember(Description="Filter by endpoint ID.")]
public virtual string? EndpointId { get; set; }
///<summary>
///Filter attempts before this date.
///</summary>
[ApiMember(Description="Filter attempts before this date.")]
public virtual DateTime? Before { get; set; }
///<summary>
///Filter attempts after this date.
///</summary>
[ApiMember(Description="Filter attempts after this date.")]
public virtual DateTime? After { get; set; }
}
public partial class WebhookMessageAttempt
{
public virtual string Id { get; set; }
public virtual string MessageId { get; set; }
public virtual string EndpointId { get; set; }
public virtual string Url { get; set; }
public virtual string Status { get; set; }
public virtual int? ResponseStatusCode { get; set; }
public virtual DateTime Timestamp { get; set; }
public virtual string TriggerType { get; set; }
}
}
C# ListWebhookMessageAttempts DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Attempts":[{"Id":"String","MessageId":"String","EndpointId":"String","Url":"String","Status":"String","ResponseStatusCode":0,"TriggerType":"String"}],"Done":false,"Iterator":"String"}