Content
Content Corpus
Add a document to the content table corpus. Either a URL or text must be provided. This allows entry of documents/content that get added to content table, content-graph and available for usage in recommendation, as well as content-explorer.
-
id if you upload the document more than once, ensure it has common id so only one document is created
-
Custom Attributes Any attributes you upload that are not reserved, will be added to content document.
# Upsert a document into content table and classify it
curl -s -XPOST "https://api.lytics.io/api/content/corpus" \
-H "Authorization: $LIOKEY" \
-H "Content-Type: application/json" \
-d '{
"id":"doc_id_123",
"text":"big-long-body-of text for classification",
"custom_attribute_name":"custom attribute"
}' | jq '.'
# upsert a url into db
# url is used as document id
curl -s -XPOST "https://api.lytics.io/api/content/corpus" \
-H "Authorization: $LIOKEY" \
-H "Content-Type: application/json" \
-d '{
"url":"http://www.validdomain/validurl.html",
"custom_attribute_name":"custom attribute"
}' | jq '.'
post/api/content/corpus
Request
- Base URLhttps://api.lytics.io
- URLhttps://api.lytics.io/api/content/corpus
- AuthAPI key in header Authorization
Query parameters
account_idstring
Your Lytics account ID.
urlstring
the URL for identifying and retrieving content
textstring
the body of the content to be added
topicsstring
custom topics to append to the document, in addition to topics that will be added with enrichment
Response
OK
Example response
{
"status": 200,
"message": "success",
"data": {
"body": [
"here is some body text"
],
"source": [
"upload"
],
"updated": [
"2016-09-13 21:59:38.551972802 -0400 EDT"
],
"url": [
"http://www.google.com/"
],
"version": [
"4"
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.