Tellen
De Adobe Campaign REST API kan het aantal records in een aanvraag tellen. Om dit te doen, gebruik URL die in de tellings knoop is teruggekeerd.
verzoek van de Steekproef
Om alle diensten te tellen die a messageType waarde die aan "sms"evenaart, een verzoek van GET met de byChannel filter uitvoeren.
-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>'
Het keert de diensten terug die aan de filter beantwoorden.
{
"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
}
Voer een verzoek van GET op de telling knoop URL uit om het aantal resultaten terug te winnen.
-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>'
Het retourneert het aantal records.
{
"count": 26
}
recommendation-more-help
3ef63344-7f3d-48f9-85ed-02bf569c4fff