Real-Time Customer Profile
Inspecting the Profile Lab
Profile & Identity API's
profile entity api knowing how to utilize the profile api's is critical when it comes to working with the real time customer profile it unlocks the ability for fast triage and debug while also exposing you to endless possibilities around system integrations from call centers to kiosks one of the most important api's is the profile entity api this api allows you to lookup an individual profile (just like you saw in the ui) but uses param's to dictate whether you want to see the attributes or events of the profile below is the entire spec for the get method for the profile entity api api overview get get https //platform adobe io/data/core/ups/access/entities query parameters schema name string xed schema class name example " xdm context profile" relatedschema name string xed schema class name that the experience event is associated with used when looking up experience events example " xdm context profile" entityid string id of the entity for native xid lookup, use 'entityid=\<xid>' and leave 'entityidns' absent; for id\ ns lookup, use both 'entityid' and 'entityidns' fields example "gtghaufkdgvzdde" entityidns string identity namespace code used for id\ ns lookup if this field is used, 'entityid' cannot be empty example "ups1" relatedentityid string id of the entity that the experience events are associated with used when looking up experience events for native xid lookup, use ' relatedentityid=\<xid>' and leave ' relatedentityidns' absent; for id\ ns lookup, use both ' relatedentityid' and ' relatedentityidns' fields example "gtghaufkdgvzdde" relatedentityidns string identity namespace code of the related entity id of experience event used when looking up experience events if this field is used, ' entityid' cannot be empty example "ups1" fields string fields to be returned for the model object by default, all fields will be fetched for each field, paths are seprated by ' ' different fields are separated by ',' example "person name firstname,person name lastname" mergepolicyid string id of the mergepolicy mergepolicy includes information of identity stitching and key value xdm object merging if not present, default merge policy will be used example "example mergepolicy" starttime number start time of time range filter for experience events should be at millisecond granularity included default from beginning example "1539838505" endtime number end time of time range filter for experience events should be at millisecond granularity excluded default to the end example "1539838510" limit number number of records to return from the result only for time series objects default 1000 example 10 orderby string the sort order of retrieved experience events by timestamp syntax (+/ )timestsamp default +timestamp example " timestamp" property string filter by property value support evaluators \[=,!=,<,>,<=,>=] when more than 1 property filter is provided, it will be concantenated with and example paramter input of 'property=web webpagedetails ishomepage=false\&placecontext localtime<="2019 07 20" will result in a filter of ' placecontext geo city!="burns lake" and placecontext localtime<="2019 07 20"' date filters should be provided as a ' string' in the format of 'yyyy mm dd' notes url will need to be encoded maximum of 3 properties is supported only for experience events example "web webpagedetails ishomepage=false" withuisapi boolean you can use uis api to get identity map with this params equals to true withuiscache boolean you can use uis cached records in ups to get identity map with this params equals to true withuisdebug boolean when you are using uis cached records in ups to get identity map, with this params equals to true, you will get the union set of all the xids identity map header parameters x gw ims org id string ims organization id example "\<replace with your ims org>" x api key string api key example "\<replace with your api key>" authorization string authorization token example "bearer \<replace with your token you can learn more about the profile api's and others on the https //developer adobe com/experience platform apis/ website remember all api requests are sandbox specific so its important when working with the api's that you ensure your header param in each request called x sandbox name is correctly set the appropriate sandbox for this lab you already have the x sandbox name set in your environment file entity lookup (attributes) to get a feel the entity lookup api you'll use the depeche mode profile from the previous lab open up postman and navigate to the profile lab folder click on the entity lookup (attributes) request to open it execute the call by clicking the send button a successful request should respond with a 200 ok and you should see a result that contains all the attributes for the depeche mode profile by default if no merge policy is specified in a profile entity request it uses the default merge policy in the sandbox with the entity api there are a number of query parameters that you can utilize to change the what is returned in response in the entity lookup (attributes) request click on the params option for the request check the box next to key named fields execute the request by clicking the send button notice there is also a parameter for specifying the mergepolicyid you can find the value for this utilizing other api's or looking up the id using the ui a successful request should respond with a 200 ok and you should see only the fields specified in the param filter you just enabled first name, last name and an array of active products congratulations! you've successfully looked up a profile's attributes utilizing the profile entity api entity lookup (events) to lookup the events of a profile you use the same exact profile entity api the only difference is you have to tell the profile service that you want to change which class type use in the response click on the entity lookup (events) request to open it execute the call by clicking the send button a successful request should respond with a 200 ok and you should see a result that contains all the events for the depeche mode profile just like when looking up profile attributes the entity api has even more query parameters that can be utilized to change the what is returned in response you can try a few of them by turning enabling them in the params section and executing the request try it out and see how it works! sample query param definitions key value description mergepolicyid \<blank> if provided you can switch the merge policy used to perform the lookup for the lab leaving it blank means it will use the sandboxes default merge policy fields eventtype,timestamp,identitymap only displays these fields from each event regardless if the field specificed has a value property eventtype="order placed" filters down the events of the profile to only those that are of type "order placed" orderby +timestamp sorts the events in descending order limit 5 only shows 5 events in the response you can learn more about all the query parameter options here > https //developer adobe com/experience platform apis/references/profile/#tag/entities/operation/retrieveentity identity service cluster api at some point you may have a question about what identities are part of a specific profiles identity cluster within the identity graph this api allows you to pass a single identity namespace/value and in response you'll receive the full identity cluster for that profile try it yourself click on the list linked identities request to open it execute the call by clicking the send button note the parameters in the request are the identity namespace and id (i e value) a successful response should look like the below screenshot you'll notice the response contains all the identities of the profile depeche mode