Previous Next

Segments resource

The Segments resource fetches segments for a given visitor ID, visitor attributes, or Visitor Services profile name, in the following format. This resource is mainly used by a site developer to know the segments.

The following tables summarize the client request.

Query Parameters
Name Description Format
profileName Name of the Visitor Services profile based on which segments are evaluated string
visitor.{attribute} Name of the visitor attribute on the basis of which the segments are evaluated. You can submit multiple visitor attributes by - visitor.att1="value1"&visitor.attr2="value2". string
visitorid ID of the site visitor based on which segments are evaluated number

The following tables summarize the server response.

200 Response

List of segments.

The following example shows how to get segments, given visitor attributes in WebCenter Sites.

curl -i -H "Accept: application/json" -X GET "http://<host>:<port>/<context>/REST/resources/v1/engage/segments?visitor.gender=male

Example of Response Header

The following example shows the response header.

HTTP/1.1 200 OK
Cache-Control: max-age=0
ETag: "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945" 
Content-Type: application/json;charset=utf-8  

Example of Response Body