User Story Logs

The logs/user-story-logs endpoint is alternative to logs/story-logs endpoint. The main difference is the response output is broken down into users instead of stories. This endpoint is useful if you want to view story progress of particular users or groups of users.

Parameters

Key

Type

OPTIONAL

groups

Array of strings

emails

Array of strings

stories

Array of strings

app

String (e.g io.falkor.app)

Examples

Fetch all logs

The example below retrieves all users and all story logs

curl -X POST \
  v1/story-analytics/logs \
  -H 'Authorization: Basic <Your Base64 Encoded Token>'

Fetch logs for specific groups

The example below retrieves all users and stories for a given array of groups.

curl -X POST \
  v1/logs/user-story-logs \
  -H 'Authorization: Basic <Your Base64 Encoded Token>' \
  -d ' {
    "groups" : ["Group A","Group B",...etc]
  }'

Fetch logs for specific stories

The example below retrieves all users for a given array of stories.

curl -X POST \
  logs/user-story-logs \
  -H 'Authorization: Basic <Your Base64 Encoded Token>' \
  -d ' {
    "stories" : ["Story 1","Story 2",...etc]
  }'

Fetch logs for specific users

The example below retrieves logs users for a given array of emails.

curl -X POST \
  v1/logs/user-story-logs \
  -H 'Authorization: Basic <Your Base64 Encoded Token>' \
  -d ' {
    "emails" : ["one@example.com","two@example",...etc]
  }'

Full Example

The example below retrieves logs for specific users & stories in certain groups.

curl -X POST \
  v1/logs/user-story-logs \
  -H 'Authorization: Basic <Your Base64 Encoded Token>' \
  -d ' {
    "groups" : ["Group A"],
    "stories" : ["Story 1","Story 2"],
    "emails" : ["one@example.com","two@example",...etc]
  }'

Success Response

The response returns a list of users with a list of groups and stories completed or in progress.

{
    "status": "success",
    "data": {
        "users": [
            {
                "firstname": "Test",
                "lastname": "User",
                "email": "one@example.com",
                "groups": [
                    "Group A",
                    "Group B",
                    ...etc
                ],
                "rank": "7",
                "stories": [
                    {
                        "name": "Story 1",
                        "category": "Business",
                        "sku": "FA34-MMMV-61VD",
                        "type": "Survey",
                        "state": {
                            "complete": true,
                            "duration": 7,
                            "attempts": 1,
                            "started": "2020-09-08T13:10:36+02:00",
                            "updated": "2020-09-08T13:10:39+02:00"
                        }
                    },
                    {
                        "name": "Story 2",
                        "category": "Business",
                        "sku": "FA25-XSYK-20YL",
                        "type": "Assessment",
                        "state": {
                            "complete": true,
                            "score": 100,
                            "passed": true,
                            "duration": 4,
                            "attempts": 2,
                            "started": "2020-09-06T12:48:27+02:00",
                            "updated": "2020-09-06T12:48:30+02:00"
                        }
                    },
                    ...etc
                ]
            }
        ]
    },
    "hash": "bea7506b44e6a6804d3d8e09993c0382",
    "response_time": 0.15078997611999512
}

User Object

The user object contains the users details, leaderboard rank, groups and stories completed.

Key

Type

firstname

String

lastname

String

email

String

rank

String

groups

Array of strings

stories

Array of user stories

User Story Object

The story object contains the name, SKU, category, type and user's log

Key

Type

name

String

category

String

sku

String

type

String

state

Object

State Object

The state object contains the log information of the user's progress on the story.

Please Note: Only assessment or stories that have assessment activities will have a passed and score parameter. Non-scoring stories such as surveys will not have these parameters.

Key

Type

FOR ALL STORY TYPES

complete

Bool. If the story has been completed.

duration

Int. Entire time spent on the story in seconds

attempts

Int. Total attempts made.

started

String. Timestamp when the first attempt was started.

updated

String. Timestamp when the last attempt was updated.

SCORING BASED STORY TYPES

score

Float. Percentage scored

passed

Bool. If the pass mark was achieved.

Last updated