REST-API Endpoint Examples
This topic gives some Rest-API examples to help you understand how the APIs are used.
Get Lists
Use this endpoint to set the size of a page, fetch the desired page, and sort in ascending or descending order.
Try
curl -X GET --header 'Accept: application/json' \
--header X-LHQ-TOKEN: 1cdd894c-0fee-422b-8c7a-3351bb9a82fb' \ 'https://api.cam.aurea.com/f4fcdc86-ba2e-4ce0-81f0-cf1d5f2dd26d/lists/v2?page=1'
Response Body
{
"size": 30,
"page": 1,
"totalCount": 30,
"totalPages": 1,
"items": [
{
"id": 527727,
"name": "albertos",
"from": "Alberto",
"reply": "none@none.com",
"messages": 4,
"members": 0,
"status": "pending",
"lastSent": "2017-04-25T00:00:00Z",
"cacheTime": "2018-05-10T20:41:39Z"
},
{
…
}
}
Pause a Message Processing
Using this end point, you can pause a message from being processed.
Try
curl -X PUT \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-LHQ-TOKEN: 1cdd894c-0fee-422b-8c7a-3351bb9a82fb' 'https://api.cam.aurea.com/f4fcdc86-ba2e-4ce0-81f0-cf1d5f2dd26d/messages/1234/pause?mailingListId=527727'
Response Body
{
"message": "message paused"
}