Den här sidan innehåller exempel på API-begäran och nyttolast som du kan använda för att hämta information om en befintlig målserverkonfiguration med /authoring/destination-servers
API-slutpunkt.
En detaljerad beskrivning av de funktioner som används av målservrar finns i följande artiklar:
Alla parameternamn och värden som stöds av Destinationen SDK är skiftlägeskänslig. Undvik skiftlägeskänslighetsfel genom att använda parameternamn och värden exakt som de visas i dokumentationen.
Läs igenom komma igång-guide för viktig information som du behöver känna till för att kunna anropa API:t, inklusive hur du får nödvändig behörighet för målredigering och obligatoriska huvuden.
Du kan hämta en befintlig målserverkonfiguration genom att skapa en GET
begäran till /authoring/destination-servers
slutpunkt.
API-slutpunkt: platform.adobe.io/data/core/activation/authoring/destination-servers
API-format
Använd följande API-format för att hämta alla målserverkonfigurationer för ditt konto.
GET /authoring/destination-servers
Använd följande API-format för att hämta en specifik målserverkonfiguration, som definieras av {INSTANCE_ID}
parameter.
GET /authoring/destination-servers/{INSTANCE_ID}
Följande två begäranden hämtar alla målserverkonfigurationer för din IMS-organisation, eller en viss målserverkonfiguration, beroende på om du skickar INSTANCE_ID
-parametern i begäran.
Välj varje flik nedan för att visa motsvarande nyttolast och deras svar.
Följande begäran hämtar listan över målserverkonfigurationer som du har åtkomst till, baserat på IMS Org ID och sandlådekonfiguration.
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}'
Ett lyckat svar returnerar HTTP-status 200 med en lista över målserverkonfigurationer som du har åtkomst till, baserat på IMS Org ID och namnet på sandlådan som du använde. Ett instanceId
motsvarar en målserver. Exemplet nedan innehåller två målserverkonfigurationer.
{
"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"
}
}
]
}
Följande begäran hämtar en specifik målserverkonfiguration som definieras av {INSTANCE_ID}
parameter.
curl -X GET https://platform.adobe.io/data/core/activation/authoring/destination-servers/{INSTANCE_ID} \
-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}'
Parameter | Beskrivning |
---|---|
{INSTANCE_ID} |
ID:t för målserverkonfigurationen som du vill hämta. |
Ett lyckat svar returnerar HTTP-status 200 med målserverns konfiguration som motsvarar {INSTANCE_ID}
du tillhandahöll.
{
"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"
}
}
]
}
Destination SDK-API-slutpunkter följer de allmänna felmeddelandeprinciperna för Experience Platform API. Se API-statuskoder och fel i begäranhuvudet i felsökningsguiden för plattformen.
När du har läst det här dokumentet vet du nu hur du hämtar en målserverkonfiguration via Destinationen SDK /authoring/destination-servers
API-slutpunkt.
Mer information om vad du kan göra med den här slutpunkten finns i följande artiklar: