51黑料不打烊

Experience Platform API基础

51黑料不打烊 Experience Platform API使用多种基础技术和语法,这些技术和语法对于有效管理基于JSON的Experience Platform资源非常重要。 本文档提供了这些技术的简要概述,以及指向外部文档的链接以了解更多信息。

闯厂翱狈指针 json-pointer

闯厂翱狈指针是一个标准化的字符串语法(),用于标识JSON文档中的特定值。 闯厂翱狈指针是以/字符分隔的令牌字符串,用于指定对象键或数组索引,并且令牌可以是字符串或数字。 闯厂翱狈指针字符串在Experience Platform API的许多PATCH操作中使用,如本文档后面所述。 有关闯厂翱狈指针的更多信息,请参阅。

示例闯厂翱狈模式对象

以下JSON表示简化的XDM架构,其字段可以使用闯厂翱狈指针字符串引用。 请注意,使用自定义架构字段组(如loyaltyLevel)添加的所有字段都在_{TENANT_ID}对象下命名空间,而使用核心字段组(如fullName)添加的字段则不是。

{
  "$id": "https://ns.adobe.com/{TENANT_ID}/schemas/85a4bdaa168b01bf44384e049fbd3d2e9b2ffaca440d35b9",
  "meta:altId": "_{TENANT_ID}.schemas.85a4bdaa168b01bf44384e049fbd3d2e9b2ffaca440d35b9",
  "meta:resourceType": "schemas",
  "version": "1.0",
  "title": "Example schema",
  "type": "object",
  "description": "This is an example schema.",
  "properties": {
    "_{TENANT_ID}": {
      "type": "object",
      "properties": {
        "loyaltyLevel": {
          "title": "Loyalty Level",
          "description": "",
          "type": "string",
          "isRequired": false,
          "enum": [
            "platinum",
            "gold",
            "silver",
            "bronze"
          ]
        }
      }
    },
    "person": {
      "title": "Person",
      "description": "An individual actor, contact, or owner.",
      "type": "object",
      "properties": {
        "name": {
          "title": "Full name",
          "description": "The person's full name.",
          "type": "object",
          "properties": {
            "fullName": {
              "title": "Full name",
              "type": "string",
              "description": "The full name of the person, in writing order most commonly accepted in the language of the name.",
            },
            "suffix": {
              "title": "Suffix",
              "type": "string",
              "description": "A group of letters provided after a person's name to provide additional information. The `suffix` is used at the end of someones name. For example Jr., Sr., M.D., PhD, I, II, III, etc.",
            }
          },
          "meta:referencedFrom": "https://ns.adobe.com/xdm/context/person-name",
          "meta:xdmField": "xdm:name"
        }
      }
    }
  }
}

基于模式对象的闯厂翱狈指针示例

闯厂翱狈指针
解析为
"/title"
"Example schema"
"/properties/person/properties/name/properties/fullName"
(返回由核心字段组提供的fullName字段的引用。)
"/properties/_{TENANT_ID}/properties/loyaltyLevel"
(返回对自定义字段组提供的loyaltyLevel字段的引用。)
"/properties/_{TENANT_ID}/properties/loyaltyLevel/enum"
["platinum", "gold", "silver", "bronze"]
"/properties/_{TENANT_ID}/properties/loyaltyLevel/enum/0"
"platinum"
NOTE
在处理Experience Data Model (XDM)描述符的xdm:sourcePropertyxdm:destinationProperty属性时,任何properties键都必须从闯厂翱狈指针字符串中? 排除。 有关详细信息,请参阅描述符上的Schema Registry API开发人员指南子指南。

闯厂翱狈修补程序 json-patch

对于Experience Platform API,有许多接受闯厂翱狈修补程序对象作为其请求负载的PATCH操作。 闯厂翱狈修补程序是一种用于描述JSON文档更改的标准化格式()。 它允许您定义对JSON的部分更新,而无需在请求正文中发送整个文档。

示例闯厂翱狈修补程序对象

{
  "op": "remove",
  "path": "/foo"
}
  • op:修补操作的类型。 虽然闯厂翱狈修补程序支持多种不同的操作类型,但并非所有Experience Platform API中的PATCH操作都与每种操作类型兼容。 可用的操作类型包括:

    • add
    • remove
    • replace
    • copy
    • move
    • test
  • path:要更新的闯厂翱狈结构部分,使用闯厂翱狈指针表示法标识。

根据op中指示的操作类型,闯厂翱狈修补程序对象可能需要其他属性。 有关不同的闯厂翱狈修补程序操作及其所需语法的更多信息,请参阅。

闯厂翱狈架构 json-schema

闯厂翱狈模式是一种用于描述和验证闯厂翱狈数据结构的格式。 体验数据模型(齿顿惭)利用闯厂翱狈架构功能对摄取的客户体验数据的结构和格式实施约束。 有关闯厂翱狈架构的更多信息,请参阅。

后续步骤

本文档介绍了与管理Experience Platform的基于JSON的资源相关的一些技术和语法。 有关使用Experience Platform API(包括最佳实践)的更多信息,请参阅快速入门指南。 有关常见问题的解答,请参阅Experience Platform疑难解答指南

recommendation-more-help
5741548a-2e07-44b3-9157-9c181502d0c5