| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| GET | /webhook/endpoints/{EndpointId}/attempts | List webhook endpoint attempts |
|---|
import Foundation
import ServiceStack
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ValidateRequest(Validator="IsAuthenticated")
public class ListWebhookEndpointAttempts : ICompany, Codable
{
/**
* 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 var companyId:String?
/**
* The ID of the webhook endpoint.
*/
// @ApiMember(Description="The ID of the webhook endpoint.", IsRequired=true, ParameterType="path")
public var endpointId:String
/**
* Pagination iterator.
*/
// @ApiMember(Description="Pagination iterator.")
public var iterator:String
/**
* Maximum number of attempts to return.
*/
// @ApiMember(Description="Maximum number of attempts to return.")
public var limit:Int?
/**
* 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 var status:Int?
/**
* Filter by event types.
*/
// @ApiMember(Description="Filter by event types.")
public var eventTypes:[String]
/**
* Filter attempts before this date.
*/
// @ApiMember(Description="Filter attempts before this date.")
public var before:Date?
/**
* Filter attempts after this date.
*/
// @ApiMember(Description="Filter attempts after this date.")
public var after:Date?
required public init(){}
}
public class ListMessageAttemptsResponse : Codable
{
public var attempts:[WebhookMessageAttempt] = []
public var done:Bool
public var iterator:String
required public init(){}
}
public class WebhookMessageAttempt : Codable
{
public var id:String
public var messageId:String
public var endpointId:String
public var url:String
public var status:String
public var responseStatusCode:Int?
public var timestamp:Date
public var triggerType:String
required public init(){}
}
Swift ListWebhookEndpointAttempts 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/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
}