Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
GET | /webhook/messages | List webhook message |
---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
@ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
@ValidateRequest(Validator="IsAuthenticated")
open class ListWebhookMessages : ListMessagesRequestDto(), 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")
override var CompanyId:UUID? = null
}
open class ListMessagesRequestDto : ClientWebhookRequestBase()
{
open var Before:Date? = null
open var After:Date? = null
open var Channel:String? = null
open var Iterator:String? = null
open var Limit:Int? = null
open var Order:Ordering? = null
open var EventTypes:ArrayList<String>? = null
open var WithContent:Boolean? = null
}
open class ClientWebhookRequestBase
{
open var ClientId:UUID? = null
}
enum class Ordering(val value:Int)
{
Ascending(1),
Descending(2),
}
open class ListMessagesResponseDto
{
open var Data:ArrayList<GetMessageResponseDto> = ArrayList<GetMessageResponseDto>()
open var Done:Boolean? = null
open var Iterator:String? = null
}
open class GetMessageResponseDto
{
open var Id:String? = null
open var Channels:ArrayList<String> = ArrayList<String>()
open var EventType:String? = null
open var Metadata:HashMap<String,String>? = null
open var Payload:Object? = null
open var EventId:String? = null
open var Timestamp:Date? = null
}
Kotlin 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.bookmore.com 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 }