Catalog
Catalog exposes info about the schema of the data in Lytics.
* **Entities** are Object Types, the primary one being a *User*
although most accounts also have *Content* and *Campaign* as well.
Custom object types may be created.
* **Streams** Streams are data sources collected from api or *Integrations* (aka *Work*).
* **Schema** Per entity type is list of field-types.
Think of it as describing columns on the user table in a database.
Streams
https://api.lytics.io/api/schema/_streamsGet list of streams, field info they contain.
Headers
Authorizationoptionalstring{
"data": [
{
"stream": "events",
"hidden": false,
"ct": 37,
"curct": 0,
"last_msg_ts": "1401216931893",
"last_update_ts": "1421167622683",
"fields": [
{
"avg": 4,
"card": 22,
"is_array": true,
"name": "utm_medium",
"sample": [
"cpc",
"adwords",
"blog",
"pricing-page",
"social",
"integrations-page",
"email",
"Integrations-page",
"docs",
"search",
"CPC",
"twitter",
"social_organic",
"card",
"social_paid",
"sponsored",
"mailchimp",
"facebook",
"infographic",
"lytics-reporting",
"retargeting",
"referral"
],
"smart": {
"coverage": 0,
"email": 0,
"noun": 13,
"time": 0,
"uid": 0,
"value": 0,
"verb": 13,
"ip": 0,
"phone": 0,
"url": 0,
"analyses": 315
},
"sumlen": 146221,
"type": "string",
"usage": 32484,
"first_seen": "2016-06-08T16:11:06Z",
"last_seen": "2016-06-24T18:00:40.871025224Z",
"hidden": false,
"column": [
{
"table": "campaign",
"as": "utm_mediums"
},
{
"table": "user",
"as": "utm_mediums"
}
]
}
]
}
]
}Stream Hide
https://api.lytics.io/api/schema/_streams/{stream},{hidden}The POST endpoint allows Stream to be hidden/un-hidden. A hidden stream is not visible from the Application
*Data > Streams* Web UI.
**CAVEAT's**
* This does not delete the data, only hides it from ui.
* If queries (LQL) still map this data into profiles it will still be added.
``
# Hide a temporary stream
curl -XPOST 'https://api.lytics.io/api/schema/_streams' \
-H 'Content-type: application/json' \
-H "Authorization: $LIOKEY" \
-d '{
"stream": "my_temp_upload",
"hidden": true
}' | jq '.'
``
URL Parameters
streamrequiredstringExample:
my_temp_uploadhiddenrequiredstringExample:
trueQuery Parameters
account_idoptionalstringHeaders
AuthorizationoptionalstringField Hide
https://api.lytics.io/api/schema/_streams/{stream},{name},{hidden}This POST endpoint allows specific fields belong to a stream to be hidden/un-hidden. A hidden field is not
visible from the Application *Data > Streams* Web UI.
**CAVEAT'S**
* This does not delete the data, only hides the field in the UI.
* If queries (LQL) stil map this field into profiles, it will still be added
``
# Hide the 'first-name' field from the 'default' stream
curl -XPUT 'https://api.lytics.io/api/schema/_streams/default' \
-H 'Content-type: application/json'
-H 'Authorization: $LIOKEY' \
-d '{
"name": "first_name",
"hidden": true
}' | jq '.'
``
URL Parameters
streamrequiredstringExample:
defaultnamerequiredstringExample:
first_namehiddenrequiredstringExample:
trueQuery Parameters
account_idoptionalstringHeaders
AuthorizationoptionalstringSchema Fields
https://api.lytics.io/api/schema/{table}Get Field information about a **NodeType(user)**. Eventually, we will extend beyond user.
URL Parameters
tablerequiredstringExample:
userQuery Parameters
account_idoptionalstringHeaders
Authorizationoptionalstring{
"data": {
"fields": [
{
"as": "created_ts",
"is_by": false,
"type": "date",
"shortdesc": "Created Date",
"longdesc": "First time usage for this user",
"froms": [
"default"
],
"identities": [
"min"
]
},
{
"as": "content",
"is_by": false,
"type": "string",
"shortdesc": "Site Content",
"longdesc": "Specific piece of content viewed",
"froms": [
"default"
],
"identities": [
"content"
]
},
{
"as": "location",
"is_by": false,
"type": "string",
"shortdesc": "Location",
"longdesc": "",
"froms": [
"linkedin_data"
],
"identities": [
"location"
]
}
]
}
}FieldInfo For Table
https://api.lytics.io/api/schema/{table}/fieldinfoFieldSuggest
https://api.lytics.io/api/schema/{table}/fieldsuggest/{field}Suggest Values for a field for auto-complete in webui
URL Parameters
tablerequiredstringExample:
userfieldrequiredstringExample:
emailQuery Parameters
account_idoptionalstringHeaders
Authorizationoptionalstringnull