Adobe Campaign REST API可計算請求中的記錄數。 若要這麼做,請使用中傳回的URL count 節點。
範例請求
若要計算所有具有 messageType 等於「sms」的值,使用執行GET請求 byChannel 篩選。
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/byChannel?channel=sms \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'
它會傳回與篩選器對應的服務。
{
"content": [
{
...
"messageType": "sms",
"mode": "newsletter",
"name": "SVC6",
...
},
...
],
"count": {
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/byChannel/_count?channel=sms&_lineStart=@iKTZ2q3IiSEDqZ5Nw1vdoGnQCqF-8DAUJRaVwR9obqqTxhMy"
},
"serverSidePagination": true
}
對執行GET要求 count 用於擷取結果數的節點URL。
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/service/byChannel/_count?channel=sms&_lineStart=@iKTZ2q3IiSEDqZ5Nw1vdoGnQCqF-8DAUJRaVwR9obqqTxhMy \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'
它會傳回記錄數。
{
"count": 26
}