Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
GET | /webhook/messages | List webhook message |
---|
import java.math.*
import java.util.*
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")
var CompanyId:UUID? = null
}
open class ListMessagesRequestDto : ClientWebhookRequestBase()
{
var Before:Date? = null
var After:Date? = null
var Channel:String? = null
var Iterator:String? = null
var Limit:Int? = null
var Order:Ordering? = null
var EventTypes:ArrayList<String> = ArrayList<String>()
var WithContent:Boolean? = null
}
open class ClientWebhookRequestBase
{
var ClientId:UUID? = null
}
enum class Ordering(val value:Int)
{
Ascending(1),
Descending(2),
}
open class ListMessagesResponseDto
{
var Data:ArrayList<GetMessageResponseDto>? = null
var Done:Boolean? = null
var Iterator:String? = null
}
open class GetMessageResponseDto
{
var Id:String? = null
var Channels:ArrayList<String> = ArrayList<String>()
var EventType:String? = null
var Metadata:HashMap<String,String> = HashMap<String,String>()
var Payload:Object? = null
var EventId:String? = null
var Timestamp:Date? = null
}
Kotlin ListWebhookMessages 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 HTTP/1.1 Host: api.bokamera.se Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Data":[{"Id":"String","Channels":["String"],"EventType":"String","Metadata":{"String":"String"},"Payload":{},"EventId":"String"}],"Done":false,"Iterator":"String"}