Personalization
Entity API, ie Personalization or Profile API.
Retrieve attributes and segments an entity (most likely a user) is a member of.
The *Entity* is a *User* most likely, but since Lytics is organized as a Graph Database,
other types of entities may be modeled such as Accounts, or Company, Content, or custom.
``
# read a single user
curl -s -H "Authorization: $LIOKEY" \
-XGET "https://api.lytics.io/api/entity/user/user_id/user123" | jq '.'
``
User Me
https://api.lytics.io/api/me/{fieldname}/{fieldval}Get single User Entity. This is an alias for /api/entity/user.
{
"data": {
"segments": [
"email_us_based",
"web_users",
"all"
]
},
"message": "success",
"meta": {
"by_fields": [
"user_id",
"email",
"fbuid",
"_uids"
],
"format": "json",
"name": "user"
},
"status": 200
}Personalization
https://api.lytics.io/api/entity/{table}/{fieldname}/{fieldval}Get single User Entity.
``
# get user whose user_id = user123
curl -s -H "Authorization: $LIOKEY" \
-XGET "https://api.lytics.io/api/entity/user/user_id/user123" | jq '.'
# get user whose email = [email protected]
curl -s -H "Authorization: $LIOKEY" \
-XGET "https://api.lytics.io/api/entity/user/email/[email protected]" | jq '.'
``
{
"data": {
"segments": [
"email_us_based",
"web_users",
"all"
]
},
"message": "success",
"meta": {
"by_fields": [
"user_id",
"email",
"fbuid",
"_uids"
],
"format": "json",
"name": "user"
},
"status": 200
}Profile Delete Request
https://api.lytics.io/api/entity/{table}/{fieldname}/{fieldval}Deletes a single Entity (normally a user).
This API persists a deletion event for the particular profile provided. This operation is asynchronous; it will take
some time for the profile to be removed from downstream databases and indexes. This request returns a "request_id"
which may be used to determine the status of that deletion. While the profile may become unavailable quickly, it may
take a while for the full process to complete since it includes all archived historic data.
``
# Delete user whose "user_id" = "userdeleteme12"
# user_id can be any by-field
curl -s -H "Authorization: $LIOKEY" \
-XDELETE "https://api.lytics.io/api/entity/user/user_id/userdeleteme12" | jq '.'
``
**Use Cases**
* *GDPR* right to be forgotten, a user asks for profile to be deleted.
{
"status": 200,
"message": "delete request received",
"data": {
"request_id": "e9d5f2d3d2c7a7d0e801-1526083200",
"complete": false
}
}Web Personalization
https://api.lytics.io/api/entity/{table}/{fieldval}Get single User Entity using cookie id. This is same as entity api
but you don't specify a fieldname (user_id, email, etc) and instead it only uses the cookie identifier.
{
"data": {
"segments": [
"email_us_based",
"web_users",
"all"
]
},
"message": "success",
"meta": {
"by_fields": [
"user_id",
"email",
"fbuid",
"_uids"
],
"format": "json",
"name": "user"
},
"status": 200
}ProfileDeletion Status
https://api.lytics.io/api/entity/deletestatus/{request_id}Retrieves the status of a submitted deletion event.
{
"status": 200,
"message": "delete request received",
"data": {
"request_id": "e9d5f2d3d2c7a7d0e801-1526083200",
"complete": false
}
}