Content
Content APIs for Lytics Content Affinity Engine, allow for
adding content into lytics, getting lists of content, and
understanding the content and content-topics.
**Content Classification**
Content classification refers to the Lytics automated
process of taking text, URL, image based content
and classifying it to attach topics to content documents.
* *Content* A list of content (URLs, Email Documents, Uploaded Documents, Campaigns) and
the topics, created dates, etc for each.
* *ContentTopics* Categories/Topics are applied to each piece of content.
* *User Content Affinity* Based on user interacting with content, the topics
(derived from the content they interact with) is enriched into their
profile.
First, an overview of How this content gets here.
* *Observed URLs* Once the lytics tag is on a Website, as users
use the website any new URL they interact with is collected.
* *Crawling* we can proactively crawl a site.
* *Email Tools* We see URLs inside of email campaigns and proactively classify
those URLs, as well as the emails themselves.
* *Uploaded Content* You may upload content to the **Classify**.
**Use Cases**
*1) User Content Recomendations* Find content for a user
based on their content-affinity.
*2) Get List of Content* Rich query api to get content.
**Examples**
``
# ad-hoc segment scan from content table
# get a list of content documents that
# - have aspects=article (aspects = article,product, etc)
# - has imageurl
curl -s -H "Authorization: $LIOKEY" \
-XGET "https://api.lytics.io/api/segment/scan?sortfield=created&limit=10" -d '
FILTER AND (
EXISTS imageurls
aspects = "article"
)
FROM content
' | jq '.'
# Create a content-segment
# - uses "ALIAS" as id for create/update, must be unique
curl -s -H "Authorization: $LIOKEY" -H "Content-Type: text/plain" \
-XPOST "$LIOAPI/api/segment" -d '
FILTER AND (
EXISTS imageurls
aspects = "article"
)
FROM content
WITH name = "My Articles"
ALIAS my_articles
' | jq '.'
# grab just those content-docs using named segment scan
curl -s -H "Authorization: $LIOKEY" \
-XGET "https://api.lytics.io/api/segment/my_articles/scan?sortfield=created&limit=10" \
| jq '.'
# grab recommended articles for single user
curl -s -H "Authorization: $LIODATAKEY" \
-XGET "https://api.lytics.io/api/content/recommend/:your_account_id/user/user_id/123456" \
| jq '.'
``
ContentTopics
https://api.lytics.io/api/content/topicGet a list of topics in the content graph.
``
curl -s -H "Authorization: $LIOKEY" \
-XGET "https://api.lytics.io/api/content/topic?limit=10" | jq '.'
``