Peek into Adobe Edge Server API

The Edge Server API enables server-side applications to communicate with the AEP Edge Network. Apart from Web SDK / Mobile SDK , it’s another way to communicate to Edge Network. It can utilised for various purposes, including data collection, personalization, advertising, and marketing. This API can be implemented on servers, IoT devices, set-top boxes, and other technology.
Client-Side implementation (web/mobile SDK )

Edge Server-Side API implementation

Client or Server Side need not be aware of ECID being used in Adobe Experience Cloud. These applications need to maintain a single server side cookie (FPID).
Benefits of Edge Server API
- Secure : Enables sending data in authenticated manner.
- Flexible: Along with Mobile/Web SDK provides another way for customers to connect with Edge Network.
- Speedy: With less no of javascript ,SDK to load it’s fast with improved latency.
- Omnichannel: It is independent of browser and its policies. It enables implementation on IOT Devices /Set top boxes etc.
Deconstruction of API Endpoint for Edge Server API : POST

*The Edge Server API supports both authenticated and unauthenticated requests. The API endpoint depends on access type( configured in Datastream) and authentication/unauthentication requirements.

**Data collection can be of two types :-

A Datastream is the configurable part of the Edge network which include settings for which solutions will receive data (Adobe Analytics, Target, Audience Manager, Platform, Event forwarding, etc.), which datasets in AEP should receive data, and others.
Request Header
For authenticated calls to Edge Server API, follow the tutorial here to generate auth parameters that would be passed in call.
Authorization : Bearer {TOKEN}
x-gw-ims-org-id : {ORG_ID}
x-api-key : {API_KEY}
Content-Type: application/json
Body : (Eg snippet )
Request body is based on the schema created in AEP. FPID is a reserved namespace for first-party id.

Personalization using Edge Server-Side API
An edge server API allows for customising of a user’s experience by delivering content or recommendations based on their preferences, behaviours or context in real-time . This approach can improve the speed and responsiveness of the personalization experience, as well as the security of sensitive user data.
Unlike WebSDK, which automatically aopplies the content returned by Target in response, in Edge server side implementation we need to process the response returned by API and send it to client for rendering.
To enable personalization using Adobe Target, we need to configure Adobe Target as service in datastream (datastream id is used in API endpoint) that ensures the Edge Server API call is also sent to Adobe Target .

Form-based/VEC activity is created in Adobe Target which contains the personalized experience and audience mapping.
Adobe Target as a response to request API returns the personalized offer for the audience qualified based on the input received from the request body i.e custom data/profile/location/behaviour attributes.
Request object in API
1) Send Profile attributes / Custom parameters in Edge Server API Call which are then available in target for audience creation.
Profile Attributes ( custom attributes) can be sent as below :
(When prefixed with profile , its a profile attribute or else considered as custom property by Target)

2) Add below query section in request which determines what content is returned by Target. Under the personalization
object, schemas
determines the type of content to be returned by Target. ( add all 4 when not sure of response type)
Adobe Target mbox names should be included in the decisionScopes
array to return the appropriate content.
"query":{
"personalization":{
"schemas":[
"https://ns.adobe.com/personalization/html-content-item",
"https://ns.adobe.com/personalization/json-content-item",
"https://ns.adobe.com/personalization/redirect-item",
"https://ns.adobe.com/personalization/dom-action"
],
"decisionScopes":[
"serverapimbox"
]
}
}
- Target uses XFF (
X-Forwarded-For)
request header to determine the Target Audience attributes under the Geo Category. It utilizes NetAcuity which is a solution for global IP to location targeting .
Response
When we call Edge Server API as explained above , response object contains the relevant activity content found under the handle
object with the type as personalization:decisions
.


With Edge Server API lot of implementation which was automatically handled by Client (Web/Mobile SDK ) need to be implemented specifically by server side application eg. Rendering personalized content returned from response.
Why use Edge Server API?
Considering the advantages listed above like speed, security, etc., this approach is suitable for industries like finance/healthcare, which need to send sensitive customer data to AEP in a secured authenticated manner. (Configure to accept only authenticated request).
It is an alternate method for developers to send data to AEP Edge Network without Javascript / mobile SDK . Since there is no Javascript to load, it’s fast and secured with improved SEO scores.
It enables integration with IOT Devices, set top boxes or virtually any internet connected devices Eg sending data from a thermostat whenever temp is increased/decreased and do personalization magic .