Relevance REST Services
Overview
The Relevance Module provides REST services that expose all relevance data collected about visitors. The Content audiences application in the CMS uses these REST endpoints to display audience information.
Security Handshake
Access to the Relevance Module's REST services is restricted. You must be logged in to the CMS, and a security handshake between the CMS and the site must be completed before you can use these endpoints.
To initiate the security handshake, open either the Content audiences application or a channel in the Channels perspective. These actions trigger Ajax requests from your browser to the site's REST API. The first Ajax request starts the security handshake process.
Available REST Services
After completing the security handshake, you can access the following REST services:
| URL | Output |
|---|---|
localhost:8080/cms/_targeting/visitors | Returns a list of all current visitors. |
localhost:8080/cms/_targeting/visitors/VISITOR_ID/details | Returns targeting data and matched segments for the specified visitor. |
localhost:8080/cms/_targeting/visitors/VISITOR_ID/requestlog | Returns the request log for the specified visitor. Each entry includes all targeting data collected for that request. |
localhost:8080/cms/_targeting/characteristics | Returns a list of all characteristics. |
localhost:8080/cms/_targeting/characteristics/CHARACTERISTIC_ID | Returns a list of all target groups within the specified characteristic. |
localhost:8080/cms/_targeting/personas | Returns a list of all segments. |
localhost:8080/cms/_targeting/personas/usingtargetgroup/CHARACTERISTIC_ID/TARGETGROUP_ID | Returns a list of all segments that use the specified target group. |
Replace localhost:8080 with your CMS host name in production environments.
If your CMS host is different from your site host (for example, cms.example.com and www.example.com), append the following query parameter to all REST URLs:
?FORCE_CLIENT_HOST=true