文件CampaignCampaign Standard 文件

計數

最後更新: 2024年7月19日
  • 適用對象:
  • Campaign Standard
  • 主題:
  • API

建立對象:

  • 經驗豐富
  • 開發人員

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