Activity & User Logs
The logs/pathway-logs endpoint retrieves activities and user logs. Pathway logs provides a comprehensive log of each activity and each user log. Pathway activities are related to various content, off and on app activities.
Before working with this endpoint it is suggested to read through Activity & Fulfilment Types. This will give you a insight into how pathway logs work and what fulfilment references are available. Limits Due to number of users that could be enrolled on a pathway this endpoint is limited to 1 pathway being returned. If you need to query multiple pathways you will need to do multiple requests.
Parameters
The logs/pathway-logs endpoint has several parameters allowing you to filter by pathway, users, activities, activity types or a combination of all 4. This allows retrieving specific activities and user logs.
Key | Type |
pathway | String (ID or name of pathway) |
activities | Array String (ID or name of activity) |
types | Array String (Type of activity) |
groups | Array Sting (name of group) |
users | Array String (name or email) |
Examples
The examples below do not exhaust what is possible, but will give a good overview of different techniques and approaches.
Get All Activities & Logs
The example below will retrieve all activities and logs for a pathway. This is useful if you wish to see all logs from users and get an overall progress for a pathway.
Get Specific Activity Type & Logs
The example below will retrieve only Data Tracking activities and logs for a pathway. This is useful if you would like to get a an overview of just Data Activities and their results.
Get Specific Activity Types & Logs
The example below will retrieve several different activity types and logs for a pathway. This is useful if you want to get activities and logs of different types.
Get Specific OR Multiple Users & Logs
The examples below will retrieve all log for a single user or multiple users for a pathway. With the users
parameter you can search by email, first name, last name or full name. Remember you can use types
along with users
to filter user logs to specified activity types.
Specific User
Multiple Users
Get Specific OR Multiple Activities & Logs
The examples below will retrieve all log for a single activity or multiple activities for a pathway. With the activities parameter you can search by name or ID of an activity.
Single Activity
Multiple Activities
Tip You can use a combination of types, activities & users to retrieve what ever logs are needed.
Success Response
A successful response will return a pathway + activities item array.
Pathway + Activities Item
Key | Type |
pathway | Object |
pathway.ID | String (ID / SKU of the pathway) |
pathway.name | String |
activities | Array of Activity Items |
Activity Item
The activity item contains information about the activity and logs which provides all user logs.
Key | Type |
ID | String (ID / SKU of the activity) |
name | String |
type | Enum (Activity type see references) |
fulfilmentType | Enum (Fulfilment type see references) |
required | Bool (If the activity is required) |
level | Int (The level the activity is on 1 - 4) |
stats | Object |
stats.total | Int (Number of users) |
stats.completed | Int (Number of users completed this activity) |
logs | Array of Log Items |
Log Item
The log item contains user information, status
and fulfilment
. Status contains basic log information such as complete
, state
, timestamp
& progress
. Fulfilment has the same information as status but includes specific fulfilment
data that relates to the activity.
Depending on what information is needed and your use case. You should use status
if you do not need fulfilment data, otherwise use fulfilment to access status and fulfilment data. To understand fulfilment data and what's available see Fulfilment References.
Key | Type |
firstname | String |
lastname | String |
String | |
telephone | String |
country | String |
city | String |
groups | Array (String of groups) |
status | Object |
status.complete | bool (If the user completed the activity) |
status.state | Enum (not started, in progress, completed) |
status.timestamp | String (Last updated / completed time) |
status.progress | Float (User progress on the activity) |
fulfilment | Object (See references) |
Last updated