System Events

System Events Query

Get list of system events.

# get the dashboard news items
curl -s -H "Authorization: $LIOKEY" \
  -XGET "https://api.lytics.io/api/event?query=dashboard_news" | jq '.'

# get list of all segments created in last 2 weeks
curl -s -H "Authorization: $LIOKEY" \
  -XGET "https://api.lytics.io/api/event?type=segment&start=now-2w&limit=100&verb=created" | jq '.'


# get list of all events performed by user X

# 1) first find a user id
curl -s -H "Authorization: $LIOKEY" \
  -XGET "https://api.lytics.io/api/user/user.email@yourdomain.com" | jq '.'

# 2) get the id for that user
curl -s -H "Authorization: $LIOKEY" \
  -XGET "https://api.lytics.io/api/event?type=user&id=USER_ID_FROM_PREVIOUS" | jq '.'


get/api/event

Request

  • Base URL
    https://api.lytics.io
  • URL
    https://api.lytics.io/api/event
  • Auth
    API key in header Authorization

Query parameters

account_idstring

Your Lytics account ID.

beforestring

Start fetching items with dates older than: "now-3d" (now-2h, now-1w, "2016-03-03"). Date math, or absolute date.

afterstring

Start fetching items with dates after: "now-3d" (now-2h, now-1w, "2016-03-03"). Date math, or absolute date.

limitinteger

Should segments this user is member of be included?

verbstring

Verb (created, updated, deleted, status, clustered)

typestring

Type of Object (entity, segment, work, account, user)

idstring

Id of Object (entity, segment, work, account, user)

Response

OK

messagestring
statusnumber

Example response

{
  "data": [
    {
      "id": "13564999017e8b0e9994ff16411fd19b",
      "ts": "1465584982676",
      "priority": 2,
      "subject_type": "topic-document",
      "subject_id": "-1894399319812759219",
      "verb": "created",
      "account_id": "1234abcdefgh"
    },
    {
      "id": "c57172d7d22e1c7ac4c80ce713e6e7cb",
      "ts": "1465844458666",
      "priority": 2,
      "subject_type": "entity",
      "subject_id": "user/email/a.user@gmail.com",
      "verb": "clustered",
      "related": [
        {
          "type": "segment",
          "id": "791734b084019d99c82a475264464304"
        }
      ],
      "account_id": "1234abcdefgh",
      "context": {
        "in": "2016-06-13T18:58:29Z"
      }
    }
  ],
  "message": "success",
  "status": 200
}

Changes

No recorded changes to this operation across all 1 revision of this API.