カウント
Adobe Campaign REST API は、リクエスト内のレコード数をカウントできます。 それには、count ノードで返された URL を使用します。
リクエストのサンプル
messageType の値が「sms」と等しいすべてのサービスをカウントするには、byChannel フィルターを使用してGETリクエストを実行します。
-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
}
count ノードの URL でGETリクエストを実行し、結果の数を取得します。
-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
}
recommendation-more-help
3ef63344-7f3d-48f9-85ed-02bf569c4fff