中繼資料機制

您可以使用 resourceType 在GET請求中:

GET /profileAndServices/resourceType/<resourceName>

回應會從資源傳回主要中繼資料(所有其他欄位都是描述性或內部欄位):

  • 內容 節點返回資源的欄位。 針對 內容 節點,我們可以找到下列欄位:

    • "apiName":API中使用的屬性名稱。

    • "type":這是高階類型定義(字串、數字、連結、集合、列舉……)。

    • "dataPolicy":欄位的值必須遵循指定的策略規則。 例如,如果dataPolicy規則設為「email」,則值必須是有效的電子郵件。 在PATCH或POST期間,dataPolicy可以檢查值或修改要轉換的值(例如,smartCase)。

    • "category":提供查詢編輯器中欄位的類別。

    • "resType":這是技術類型。

      如果以「link」或「collection」值完成「type」,resTarget值即為連結所定位之資源的名稱。
      如果以值「enumeration」完成「type」,則會新增「values」欄位,且每個分項清單在 節點。

  • 篩選器 node會傳回URL以擷取相關聯的篩選器。 如需篩選器的詳細資訊,請參閱 本節 區段。


範例要求

對資源執行GET請求。

-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/resourceType/profile \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'

它會傳回設定檔資源的完整說明。

{
...
"content": {
  "email": {...},
    ...
    },
"data": "/profileAndServices/profile/",
"filters": {
        "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/resourceType/<PKEY>"
    },
"help": "Identified profiles",
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/metadata",
"label": "Profiles",
"mandatory": false,
"name": "profile",
"pkgStatus": "never",
"readOnly": false,
"schema": "nms:recipient",
"type": "item"
}

本頁內容