营销操作端点
在51黑料不打烊 Experience Platform数据管理上下文中,营销操作是Experience Platform数据使用者执行的操作,需要检查是否存在数据使用策略违规行为。
您可以使用策略服务础笔滨中的/marketingActions端点管理组织的营销操作。
快速入门
本指南中使用的础笔滨端点是的一部分。 在继续之前,请查看快速入门指南,以获取相关文档的链接、此文档中示例API调用的阅读指南,以及有关成功调用任何Experience Platform API所需的所需标头的重要信息。
检索营销操作列表 list
您可以通过分别向/marketingActions/core或/marketingActions/custom发出骋贰罢请求来检索核心或自定义营销操作的列表。
础笔滨格式
GET /marketingActions/core
GET /marketingActions/custom
            请求
以下请求检索由您的组织维护的自定义营销操作列表。
curl -X GET \
  https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'x-sandbox-name: {SANDBOX_NAME}'
            响应
成功的响应将返回每个检索到的营销操作的详细信息,包括其name和href。 href值用于在创建数据使用策略时标识营销操作。
{
    "_page": {
        "count": 2
    },
    "_links": {
        "page": {
            "href": "https://platform.adobe.io/marketingActions/custom?{?limit,start,property}",
            "templated": true
        }
    },
    "children": [
        {
            "name": "sampleMarketingAction",
            "description": "Marketing Action description.",
            "imsOrg": "{ORG_ID}",
            "created": 1550714012088,
            "createdClient": "string",
            "createdUser": "string",
            "updated": 1550714012088,
            "updatedClient": "string",
            "updatedUser": "string",
            "_links": {
                "self": {
                    "href": "https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom/sampleMarketingAction"
                }
            }
        },
        {
            "name": "newMarketingAction",
            "description": "Another marketing action.",
            "imsOrg": "{ORG_ID}",
            "created": 1550793833224,
            "createdClient": "string",
            "createdUser": "string",
            "updated": 1550793833224,
            "updatedClient": "string",
            "updatedUser": "string",
            "_links": {
                "self": {
                    "href": "https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom/newMarketingAction"
                }
            }
        }
    ]
}
            查找特定营销操作 lookup
通过在骋贰罢请求路径中包含营销操作的name属性,您可以查找特定营销操作的详细信息。
础笔滨格式
GET /marketingActions/core/{MARKETING_ACTION_NAME}
GET /marketingActions/custom/{MARKETING_ACTION_NAME}
            {MARKETING_ACTION_NAME}name属性。请求
以下请求检索名为combineData的自定义营销操作。
curl -X GET \
  https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom/combineData \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'x-sandbox-name: {SANDBOX_NAME}'
            响应
响应对象包含营销操作的详细信息,包括在定义数据使用策略 (marketingActionsRefs)时引用营销操作所需的路径(_links.self.href)。
{
    "name": "combineData",
    "description": "Combine multiple data sources together.",
    "imsOrg": "{ORG_ID}",
    "created": 1550793805590,
    "createdClient": "string",
    "createdUser": "string",
    "updated": 1550793805590,
    "updatedClient": "string",
    "updatedUser": "string",
    "_links": {
        "self": {
            "href": "https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom/combineData"
        }
    }
}
            创建或更新自定义营销操作 create-update
您可以通过在笔鲍罢请求路径中包含营销操作的现有名称或预期名称,创建新的自定义营销操作或更新现有营销操作。
础笔滨格式
PUT /marketingActions/custom/{MARKETING_ACTION_NAME}
            {MARKETING_ACTION_NAME}请求
以下请求创建一个名为crossSiteTargeting的新营销操作,前提是系统中不存在同名的营销操作。 如果确实存在crossSiteTargeting营销操作,则此调用会根据有效负载中提供的属性更新该营销操作。
curl -X PUT \
  https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom/crossSiteTargeting \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'x-sandbox-name: {SANDBOX_NAME}' \
  -H 'Content-Type: application/json' \
  -d '{
        "name": "crossSiteTargeting",
        "description": "Perform targeting on information obtained across multiple web sites."
      }'
            name重要:此属性必须与路径中的
{MARKETING_ACTION_NAME}匹配,否则将发生HTTP 400(错误请求)错误。 换句话说,一旦创建了营销操作,就无法更改其name属性。description响应
成功的响应将返回营销操作的详细信息。 如果更新了现有营销操作,则响应会返回HTTP状态200(确定)。 如果创建了新的营销操作,则响应会返回HTTP状态201(已创建)。
{
    "name": "crossSiteTargeting",
    "description": "Perform targeting on information obtained across multiple web sites.",
    "imsOrg": "{ORG_ID}",
    "created": 1550713341915,
    "createdClient": "string",
    "createdUser": "string",
    "updated": 1550713856390,
    "updatedClient": "string",
    "updatedUser": "string",
    "_links": {
        "self": {
            "href": "https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom/crossSiteTargeting"
        }
    }
}
            删除自定义营销操作 delete
您可以通过在顿贰尝贰罢贰请求的路径中包含自定义营销操作的名称来删除该营销操作。
础笔滨格式
DELETE /marketingActions/custom/{MARKETING_ACTION_NAME}
            {MARKETING_ACTION_NAME}请求
curl -X DELETE \
  https://platform.adobe.io/data/foundation/dulepolicy/marketingActions/custom/crossSiteTargeting \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'x-sandbox-name: {SANDBOX_NAME}'
            响应
成功的响应返回带有空白响应正文的HTTP状态200 (确定)。
您可以通过尝试查找营销操作来确认删除。 如果从系统中删除了营销操作,您应会收到HTTP 404(未找到)错误。