API端点: platform.adobe.io/data/core/activation/authoring/destination-servers
本页列出并介绍了您可以使用 /authoring/destination-servers
API端点。 可通过公共端点在Adobe Experience Platform Destination SDK中配置目标的服务器和模板规范 /authoring/destination-servers
. 有关此端点提供的功能的描述,请阅读 服务器和模板规范.
在继续之前,请查看 入门指南 有关成功调用API所需的重要信息,包括如何获取所需的目标创作权限和所需标头。
您可以通过向 /authoring/destination-servers
端点。
API格式
POST /authoring/destination-servers
请求
以下请求会创建一个新的目标服务器配置,该配置由有效负载中提供的参数进行配置。 以下负载包括接受的所有参数 /authoring/destination-servers
端点。 请注意,您不必在调用中添加所有参数,并且该模板可根据您的API要求进行自定义。
curl -X POST https://platform.adobe.io/data/core/activation/authoring/destination-servers \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '
{
"name":"Moviestar destination server",
"destinationServerType":"URL_BASED",
"urlBasedDestination":{
"url":{
"templatingStrategy":"PEBBLE_V1",
"value":"https://api.moviestar.com/data/{{customerData.region}}/items"
}
},
"httpTemplate":{
"httpMethod":"POST",
"requestBody":{
"templatingStrategy":"PEBBLE_V1",
"value":"{ \"attributes\": [ {% for ns in [\"external_id\", \"yourdestination_id\"] %} {% if input.profile.identityMap[ns] is not empty and first_namespace_encountered %} , {% endif %} {% set first_namespace_encountered = true %} {% for identity in input.profile.identityMap[ns]%} { \"{{ ns }}\": \"{{ identity.id }}\" {% if input.profile.segmentMembership.ups is not empty %} , \"AEPSegments\": { \"add\": [ {% for segment in input.profile.segmentMembership.ups %} {% if segment.value.status == \"realized\" or segment.value.status == \"existing\" %} {% if added_segment_found %} , {% endif %} {% set added_segment_found = true %} \"{{ destination.segmentAliases[segment.key] }}\" {% endif %} {% endfor %} ], \"remove\": [ {% for segment in input.profile.segmentMembership.ups %} {% if segment.value.status == \"exited\" %} {% if removed_segment_found %} , {% endif %} {% set removed_segment_found = true %} \"{{ destination.segmentAliases[segment.key] }}\" {% endif %} {% endfor %} ] } {% set removed_segment_found = false %} {% set added_segment_found = false %} {% endif %} {% if input.profile.attributes is not empty %} , {% endif %} {% for attribute in input.profile.attributes %} \"{{ attribute.key }}\": {% if attribute.value is empty %} null {% else %} \"{{ attribute.value.value }}\" {% endif %} {% if not loop.last%} , {% endif %} {% endfor %} } {% if not loop.last %} , {% endif %} {% endfor %} {% endfor %} ] }"
},
"contentType":"application/json"
}
}
参数 | 类型 | 描述 |
---|---|---|
name |
字符串 | 必需。 表示服务器的友好名称,仅对Adobe可见。 合作伙伴或客户看不到此名称。 示例 Moviestar destination server . |
destinationServerType |
字符串 | 必需。 设置为 URL_BASED 用于流目标。 |
urlBasedDestination.url.templatingStrategy |
字符串 | 必需.
|
urlBasedDestination.url.value |
字符串 | 必需。 填写Experience Platform应连接到的API端点的地址。 |
httpTemplate.httpMethod |
字符串 | 必需。 Adobe在对服务器的调用中将使用的方法。 选项包括 GET , PUT , POST , DELETE , PATCH . |
httpTemplate.requestBody.templatingStrategy |
字符串 | 必需。 使用 PEBBLE_V1 . |
httpTemplate.requestBody.value |
字符串 | 必需。 此字符串是字符转义版本,可将Platform客户的数据转换为您的服务所需的格式。
|
httpTemplate.contentType |
字符串 | 必需。 服务器接受的内容类型。 此值极有可能 application/json . |
响应
成功响应会返回HTTP状态200,其中包含新创建的目标服务器配置的详细信息。
您可以通过向 /authoring/destination-servers
端点。
API格式
POST /authoring/destination-servers
请求
以下请求会创建一个新的目标服务器配置,该配置由有效负载中提供的参数进行配置。 以下负载包括接受的所有参数 /authoring/destination-servers
端点。 请注意,您不必在调用中添加所有参数,并且该模板可根据您的API要求进行自定义。
curl -X POST https://platform.adobe.io/data/core/activation/authoring/destination-servers \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '
{
"name":"File-based SFTP destination server",
"destinationServerType":"FILE_BASED_SFTP",
"fileBasedSftpDestination":{
"rootDirectory":{
"templatingStrategy":"PEBBLE_V1",
"value":"{{customerData.rootDirectory}}"
},
"port": 22,
"encryptionMode" : "PGP"
},
"fileConfigurations": {
"compression": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.compression}}"
},
"fileType": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.fileType}}"
},
"csvOptions": {
"quote": {
"templatingStrategy": "NONE",
"value": "\""
},
"quoteAll": {
"templatingStrategy": "NONE",
"value": "false"
},
"escape": {
"templatingStrategy": "NONE",
"value": "\\"
},
"escapeQuotes": {
"templatingStrategy": "NONE",
"value": "true"
},
"header": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreLeadingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreTrailingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"nullValue": {
"templatingStrategy": "NONE",
"value": ""
},
"dateFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd"
},
"timestampFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd'T':mm:ss[.SSS][XXX]"
},
"charToEscapeQuoteEscaping": {
"templatingStrategy": "NONE",
"value": "\\"
},
"emptyValue": {
"templatingStrategy": "NONE",
"value": ""
}
}
}
}
响应
成功响应会返回HTTP状态200,其中包含新创建的目标服务器配置的详细信息。
您可以通过向 /authoring/destination-servers
端点。
API格式
POST /authoring/destination-servers
请求
以下请求会创建一个新的目标服务器配置,该配置由有效负载中提供的参数进行配置。 以下负载包括接受的所有参数 /authoring/destination-servers
端点。 请注意,您不必在调用中添加所有参数,并且该模板可根据您的API要求进行自定义。
curl -X POST https://platform.adobe.io/data/core/activation/authoring/destination-servers \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '
{
"name": "S3 destination",
"destinationServerType": "FILE_BASED_S3",
"fileBasedS3Destination": {
"bucket": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.bucket}}"
},
"path": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.path}}"
}
},
"fileConfigurations": {
"compression": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.compression}}"
},
"fileType": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.fileType}}"
},
"csvOptions": {
"quote": {
"templatingStrategy": "NONE",
"value": "\""
},
"quoteAll": {
"templatingStrategy": "NONE",
"value": "false"
},
"escape": {
"templatingStrategy": "NONE",
"value": "\\"
},
"escapeQuotes": {
"templatingStrategy": "NONE",
"value": "true"
},
"header": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreLeadingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreTrailingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"nullValue": {
"templatingStrategy": "NONE",
"value": ""
},
"dateFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd"
},
"timestampFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd'T':mm:ss[.SSS][XXX]"
},
"charToEscapeQuoteEscaping": {
"templatingStrategy": "NONE",
"value": "\\"
},
"emptyValue": {
"templatingStrategy": "NONE",
"value": ""
}
}
}
}
响应
成功响应会返回HTTP状态200,其中包含新创建的目标服务器配置的详细信息。
您可以通过向 /authoring/destination-servers
端点。
API格式
POST /authoring/destination-servers
请求
以下请求会创建一个新的目标服务器配置,该配置由有效负载中提供的参数进行配置。 以下负载包括接受的所有参数 /authoring/destination-servers
端点。 请注意,您不必在调用中添加所有参数,并且该模板可根据您的API要求进行自定义。
curl -X POST https://platform.adobe.io/data/core/activation/authoring/destination-servers \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '
{
"name":"Blob destination server",
"destinationServerType":"FILE_BASED_AZURE_BLOB",
"fileBasedAzureBlobDestination":{
"path":{
"templatingStrategy":"PEBBLE_V1",
"value":"{{customerData.path}}"
},
"container":{
"templatingStrategy":"PEBBLE_V1",
"value":"{{customerData.container}}"
}
},
"fileConfigurations": {
"compression": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.compression}}"
},
"fileType": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.fileType}}"
},
"csvOptions": {
"quote": {
"templatingStrategy": "NONE",
"value": "\""
},
"quoteAll": {
"templatingStrategy": "NONE",
"value": "false"
},
"escape": {
"templatingStrategy": "NONE",
"value": "\\"
},
"escapeQuotes": {
"templatingStrategy": "NONE",
"value": "true"
},
"header": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreLeadingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreTrailingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"nullValue": {
"templatingStrategy": "NONE",
"value": ""
},
"dateFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd"
},
"timestampFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd'T':mm:ss[.SSS][XXX]"
},
"charToEscapeQuoteEscaping": {
"templatingStrategy": "NONE",
"value": "\\"
},
"emptyValue": {
"templatingStrategy": "NONE",
"value": ""
}
}
}
}
响应
成功响应会返回HTTP状态200,其中包含新创建的目标服务器配置的详细信息。
您可以通过向 /authoring/destination-servers
端点。
API格式
POST /authoring/destination-servers
请求
以下请求会创建一个新的目标服务器配置,该配置由有效负载中提供的参数进行配置。 以下负载包括接受的所有参数 /authoring/destination-servers
端点。 请注意,您不必在调用中添加所有参数,并且该模板可根据您的API要求进行自定义。
curl -X POST https://platform.adobe.io/data/core/activation/authoring/destination-servers \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '
{
"name":"ADLS destination server",
"destinationServerType":"FILE_BASED_ADLS_GEN2",
"fileBasedAdlsGen2Destination":{
"path":{
"templatingStrategy":"PEBBLE_V1",
"value":"{{customerData.path}}"
}
},
"fileConfigurations": {
"compression": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.compression}}"
},
"fileType": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.fileType}}"
},
"csvOptions": {
"quote": {
"templatingStrategy": "NONE",
"value": "\""
},
"quoteAll": {
"templatingStrategy": "NONE",
"value": "false"
},
"escape": {
"templatingStrategy": "NONE",
"value": "\\"
},
"escapeQuotes": {
"templatingStrategy": "NONE",
"value": "true"
},
"header": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreLeadingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreTrailingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"nullValue": {
"templatingStrategy": "NONE",
"value": ""
},
"dateFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd"
},
"timestampFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd'T':mm:ss[.SSS][XXX]"
},
"charToEscapeQuoteEscaping": {
"templatingStrategy": "NONE",
"value": "\\"
},
"emptyValue": {
"templatingStrategy": "NONE",
"value": ""
}
}
}
}
响应
成功响应会返回HTTP状态200,其中包含新创建的目标服务器配置的详细信息。
Data Landing Zone (DLZ)是 Azure Blob 由Adobe Experience Platform配置的存储界面,允许您访问基于云的安全文件存储工具,以将文件导入平台。
您可以通过向 /authoring/destination-servers
端点。
API格式
POST /authoring/destination-servers
请求
以下请求会创建一个新的目标服务器配置,该配置由有效负载中提供的参数进行配置。 以下负载包括接受的所有参数 /authoring/destination-servers
端点。 请注意,您不必在调用中添加所有参数,并且该模板可根据您的API要求进行自定义。
curl -X POST https://platform.adobe.io/data/core/activation/authoring/destination-servers \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '
{
"name":"DLZ destination server",
"destinationServerType":"FILE_BASED_DLZ",
"fileBasedDlzDestination":{
"path":{
"templatingStrategy":"PEBBLE_V1",
"value":"{{customerData.path}}"
},
"useCase": "Your use case"
},
"fileConfigurations": {
"compression": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.compression}}"
},
"fileType": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.fileType}}"
},
"csvOptions": {
"quote": {
"templatingStrategy": "NONE",
"value": "\""
},
"quoteAll": {
"templatingStrategy": "NONE",
"value": "false"
},
"escape": {
"templatingStrategy": "NONE",
"value": "\\"
},
"escapeQuotes": {
"templatingStrategy": "NONE",
"value": "true"
},
"header": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreLeadingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreTrailingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"nullValue": {
"templatingStrategy": "NONE",
"value": ""
},
"dateFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd"
},
"timestampFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd'T':mm:ss[.SSS][XXX]"
},
"charToEscapeQuoteEscaping": {
"templatingStrategy": "NONE",
"value": "\\"
},
"emptyValue": {
"templatingStrategy": "NONE",
"value": ""
}
}
}
}
响应
成功响应会返回HTTP状态200,其中包含新创建的目标服务器配置的详细信息。
您可以通过向 /authoring/destination-servers
端点。
API格式
GET /authoring/destination-servers
请求
以下请求将根据IMS组织和沙盒配置,检索您有权访问的目标服务器配置列表。
curl -X GET https://platform.adobe.io/data/core/activation/authoring/destination-servers \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
响应
以下响应会根据您使用的IMS组织ID和沙盒名称,返回HTTP状态200,其中包含您有权访问的目标服务器配置列表。 一个 instanceId
对应于一个目标服务器的模板。 响应因简短而被截断。
{
"items":[
{
"instanceId":"2307ec2b-4798-45a4-9239-5d0a2fb0ed67",
"createdDate":"2020-11-17T06:49:24.331012Z",
"lastModifiedDate":"2020-11-17T06:49:24.331012Z",
"name":"Moviestar Destination Server",
"destinationServerType":"URL_BASED",
"urlBasedDestination":{
"url":{
"templatingStrategy":"PEBBLE_V1",
"value":"https://go.{% if destination.config.domain == \"US\" %}moviestar.com{% else %}moviestar.eu{% endif%}/api/named_users/tags"
}
},
"httpTemplate":{
"requestBody":{
"templatingStrategy":"PEBBLE_V1",
"value":"{ \"audience\": { \"named_user_id\": [ {% for named_user in input.profile.identityMap.named_user_id %} \"{{ named_user.id }}\"{% if not loop.last %},{% endif %} {% endfor %} ] }, {% if addedSegments(input.profile.segmentMembership.ups) is not empty %} \"add\": { \"adobe-segments\": [ {% for added_segment in addedSegments(input.profile.segmentMembership.ups) %} \"{{ destination.segmentNames[added_segment.key] }}\"{% if not loop.last %},{% endif %} {% endfor %} ] } {% endif %} {% if addedSegments(input.profile.segmentMembership.ups) is not empty and removedSegments(input.profile.segmentMembership.ups) is not empty %} , {% endif %} {% if removedSegments(input.profile.segmentMembership.ups) is not empty %} \"remove\": { \"adobe-segments\": [ {% for removed_segment in removedSegments(input.profile.segmentMembership.ups) %} \"{{ destination.segmentNames[removed_segment.key] }}\"{% if not loop.last %},{% endif %} {% endfor %} ] } {% endif %} }"
},
"httpMethod":"POST",
"contentType":"application/json",
"headers":[
{
"header":"Accept",
"value":{
"templatingStrategy":"NONE",
"value":"application/vnd.moviestar+json; version=3;"
}
}
]
},
"qos":{
"name":"freeform"
}
},
{
"instanceId":"d88de647-a352-4824-8b46-354afc7acbff",
"createdDate":"2020-11-17T16:50:59.635228Z",
"lastModifiedDate":"2020-11-17T16:50:59.635228Z",
"name":"Test11 Destination Server",
"destinationServerType":"URL_BASED",
"urlBasedDestination":{
"url":{
"templatingStrategy":"PEBBLE_V1",
"value":"https://go.{% if destination.config.domain == \"US\" %}moviestar.com{% else %}moviestar.eu{% endif%}/api/named_users/tags"
}
},
"httpTemplate":{
"requestBody":{
"templatingStrategy":"PEBBLE_V1",
"value":"{ \"audience\": { \"named_user_id\": [ {% for named_user in input.profile.identityMap.named_user_id %} \"{{ named_user.id }}\"{% if not loop.last %},{% endif %} {% endfor %} ] }, {% if addedSegments(input.profile.segmentMembership.ups) is not empty %} \"add\": { \"adobe-segments\": [ {% for added_segment in addedSegments(input.profile.segmentMembership.ups) %} \"{{ destination.segmentNames[added_segment.key] }}\"{% if not loop.last %},{% endif %} {% endfor %} ] } {% endif %} {% if addedSegments(input.profile.segmentMembership.ups) is not empty and removedSegments(input.profile.segmentMembership.ups) is not empty %} , {% endif %} {% if removedSegments(input.profile.segmentMembership.ups) is not empty %} \"remove\": { \"adobe-segments\": [ {% for removed_segment in removedSegments(input.profile.segmentMembership.ups) %} \"{{ destination.segmentNames[removed_segment.key] }}\"{% if not loop.last %},{% endif %} {% endfor %} ] } {% endif %} }"
},
"httpMethod":"POST",
"contentType":"application/json",
"headers":[
{
"header":"Accept",
"value":{
"templatingStrategy":"NONE",
"value":"application/vnd.moviestar+json; version=3;"
}
}
]
},
"qos":{
"name":"freeform"
}
}
]
}
您可以通过向 /authoring/destination-servers
端点并提供要更新的目标服务器配置的实例ID。 在调用的正文中,提供更新的目标服务器配置。
API格式
PUT /authoring/destination-servers/{INSTANCE_ID}
参数 | 描述 |
---|---|
{INSTANCE_ID} |
要更新的目标服务器配置的ID。 |
请求
以下请求更新了由有效负载中提供的参数配置的现有目标服务器配置。
curl -X PUT https://platform.adobe.io/data/core/activation/authoring/destination-servers/bd4ec8f0-e98f-4b6a-8064-dd7adbfffec9 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '
{
"name":"Moviestar destination server",
"destinationServerType":"URL_BASED",
"urlBasedDestination":{
"url":{
"templatingStrategy":"PEBBLE_V1",
"value":"https://api.moviestar.com/data/{{customerData.region}}/items"
}
},
"httpTemplate":{
"httpMethod":"POST",
"requestBody":{
"templatingStrategy":"PEBBLE_V1",
"value":"{ \"attributes\": [ {% for ns in [\"external_id\", \"yourdestination_id\"] %} {% if input.profile.identityMap[ns] is not empty and first_namespace_encountered %} , {% endif %} {% set first_namespace_encountered = true %} {% for identity in input.profile.identityMap[ns]%} { \"{{ ns }}\": \"{{ identity.id }}\" {% if input.profile.segmentMembership.ups is not empty %} , \"AEPSegments\": { \"add\": [ {% for segment in input.profile.segmentMembership.ups %} {% if segment.value.status == \"realized\" or segment.value.status == \"existing\" %} {% if added_segment_found %} , {% endif %} {% set added_segment_found = true %} \"{{ destination.segmentAliases[segment.key] }}\" {% endif %} {% endfor %} ], \"remove\": [ {% for segment in input.profile.segmentMembership.ups %} {% if segment.value.status == \"exited\" %} {% if removed_segment_found %} , {% endif %} {% set removed_segment_found = true %} \"{{ destination.segmentAliases[segment.key] }}\" {% endif %} {% endfor %} ] } {% set removed_segment_found = false %} {% set added_segment_found = false %} {% endif %} {% if input.profile.attributes is not empty %} , {% endif %} {% for attribute in input.profile.attributes %} \"{{ attribute.key }}\": {% if attribute.value is empty %} null {% else %} \"{{ attribute.value.value }}\" {% endif %} {% if not loop.last%} , {% endif %} {% endfor %} } {% if not loop.last %} , {% endif %} {% endfor %} {% endfor %} ] }"
},
"contentType":"application/json"
}
}
您可以通过向 /authoring/destination-servers
端点并提供要更新的目标服务器配置的实例ID。
API格式
GET /authoring/destination-servers/{INSTANCE_ID}
参数 | 描述 |
---|---|
{INSTANCE_ID} |
要检索的目标服务器配置的ID。 |
请求
curl -X GET https://platform.adobe.io/data/core/activation/authoring/destination-servers/bd4ec8f0-e98f-4b6a-8064-dd7adbfffec9 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
响应
成功响应会返回HTTP状态200,其中包含有关指定目标服务器配置的详细信息。
{
"name":"Moviestar destination server",
"destinationServerType":"URL_BASED",
"urlBasedDestination":{
"url":{
"templatingStrategy":"PEBBLE_V1",
"value":"https://api.moviestar.com/data/{{customerData.region}}/items"
}
},
"httpTemplate":{
"httpMethod":"POST",
"requestBody":{
"templatingStrategy":"PEBBLE_V1",
"value":"{ \"attributes\": [ {% for ns in [\"external_id\", \"yourdestination_id\"] %} {% if input.profile.identityMap[ns] is not empty and first_namespace_encountered %} , {% endif %} {% set first_namespace_encountered = true %} {% for identity in input.profile.identityMap[ns]%} { \"{{ ns }}\": \"{{ identity.id }}\" {% if input.profile.segmentMembership.ups is not empty %} , \"AEPSegments\": { \"add\": [ {% for segment in input.profile.segmentMembership.ups %} {% if segment.value.status == \"realized\" or segment.value.status == \"existing\" %} {% if added_segment_found %} , {% endif %} {% set added_segment_found = true %} \"{{ destination.segmentAliases[segment.key] }}\" {% endif %} {% endfor %} ], \"remove\": [ {% for segment in input.profile.segmentMembership.ups %} {% if segment.value.status == \"exited\" %} {% if removed_segment_found %} , {% endif %} {% set removed_segment_found = true %} \"{{ destination.segmentAliases[segment.key] }}\" {% endif %} {% endfor %} ] } {% set removed_segment_found = false %} {% set added_segment_found = false %} {% endif %} {% if input.profile.attributes is not empty %} , {% endif %} {% for attribute in input.profile.attributes %} \"{{ attribute.key }}\": {% if attribute.value is empty %} null {% else %} \"{{ attribute.value.value }}\" {% endif %} {% if not loop.last%} , {% endif %} {% endfor %} } {% if not loop.last %} , {% endif %} {% endfor %} {% endfor %} ] }"
},
"contentType":"application/json"
}
}
您可以通过向 /authoring/destination-servers
端点和提供您希望在请求路径中删除的目标服务器配置的ID。
API格式
DELETE /authoring/destination-servers/{INSTANCE_ID}
参数 | 描述 |
---|---|
{INSTANCE_ID} |
的 id 要删除的目标服务器配置。 |
请求
curl -X DELETE https://platform.adobe.io/data/core/activation/authoring/destination-servers/bd4ec8f0-e98f-4b6a-8064-dd7adbfffec9 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
响应
成功的响应会返回HTTP状态200以及空的HTTP响应。
Destination SDKAPI端点遵循常规Experience PlatformAPI错误消息原则。 请参阅 API状态代码 和 请求标头错误 平台疑难解答指南中。
阅读本文档后,您现在知道如何使用配置目标服务器和模板 /authoring/destination-servers
API端点。 读取 如何使用Destination SDK配置目标 以了解此步骤在配置目标过程中的适用位置。