Analytics

User Actions

List of actions for a user.

  • %Uid should be the user's Schoology UID.
  • A Unix timestamp is applied to {timestamp}.
  • Duration must be within the past week. Further data can be pulled via the School Analytics area of the UI. If the start_time is older than seven days, you will receive a "Time span is invalid" error message.
Path GET https://api.schoology.com/v1/analytics/users/%uid?start_time={timestamp}&end_time={timestamp}
Content None
Return

A collection of user actions with unix timestamp of last access and duration of time in minutes.

JSON
{
  "actions": [
    {
      "duration": 6,
      "action": "home/recent-activity",
      "time": 1488836487
    },
    {
      "duration": 0,
      "action": "user/11537545/updates",
      "time": 1488836493
    }
  ],
  "total": 2,
  "links": {
    "self": "https://api.schoology.com/v1/analytics/users/11537545?start_time=1488404529&end_time=1488836574&start=0&limit=20"
  }
}
XML
<root>
  <actions>
    <duration>6</duration>
    <action>home/recent-activity</action>
    <time>1488836487</time>
  </actions>
  <actions>
    <duration>0</duration>
    <action>user/11537545/updates</action>
    <time>1488836493</time>
  </actions>
  <total>2</total>
  <links>
    <self>https://api.schoology.com/v1/analytics/users/11537545?start_time=1488404529&end_time=1488836574&start=0&limit=20</self>
  </links>
</root>

Section Enrollment Highlights

Information about user interactions with a section.

Select months, weeks, or days for time_units

Path GET https://api.schoology.com/v1/analytics/schools/buildings/%building_id?time_units={months/weeks/days}&start_time={timestamp}&end_time={timestamp}
Content None
Return

A count of total visits, submissions, files uploaded, page views, and comments posted, along with average time per visit based on user role.

JSON
{
  "role_types": {
    "faculty": {
      "role_type": "faculty",
      "data": {
        "2016-05-01 00:00:00": {
          "total_visits": 5,
          "submissions": 0,
          "date": "2016-05-01 00:00:00",
          "files_uploaded": 0,
          "comments_posted": 0,
          "avg_time_per_visit": 0,
          "page_views": 0
        }
      }
    },
    "student": {
      "role_type": "student",
      "data": {
        "2016-05-01 00:00:00": {
          "total_visits": 0,
          "submissions": 0,
          "date": "2016-05-01 00:00:00",
          "files_uploaded": 0,
          "comments_posted": 0,
          "avg_time_per_visit": 0,
          "page_views": 0
        }
      }
    },
    "parent": {
      "role_type": "parent",
      "data": {
        "2016-05-01 00:00:00": {
          "total_visits": 0,
          "submissions": 0,
          "date": "2016-05-01 00:00:00",
          "files_uploaded": 0,
          "comments_posted": 0,
          "avg_time_per_visit": 0,
          "page_views": 0
        }
      },
      "roles_types": [
        
      ]
    }
  }
}

XML
<role_types>
  <faculty>
    <role_type>faculty</role_type>
    <data>
      <2016-05-01 00:00:00>
        <total_visits>5</total_visits>
        <submissions>0</submissions>
        <date>2016-05-01 00:00:00</date>
        <files_uploaded>0</files_uploaded>
        <comments_posted>0</comments_posted>
        <avg_time_per_visit>0</avg_time_per_visit>
        <page_views>0</page_views>
      </2016-05-01 00:00:00>
    </data>
  </faculty>
  <student>
    <role_type>student</role_type>
    <data>
      <2016-05-01 00:00:00>
        <total_visits>0</total_visits>
        <submissions>0</submissions>
        <date>2016-05-01 00:00:00</date>
        <files_uploaded>0</files_uploaded>
        <comments_posted>0</comments_posted>
        <avg_time_per_visit>0</avg_time_per_visit>
        <page_views>0</page_views>
      </2016-05-01 00:00:00>
    </data>
  </student>
  <parent>
    <role_type>parent</role_type>
    <data>
      <2016-05-01 00:00:00>
        <total_visits>0</total_visits>
        <submissions>0</submissions>
        <date>2016-05-01 00:00:00</date>
        <files_uploaded>0</files_uploaded>
        <comments_posted>0</comments_posted>
        <avg_time_per_visit>0</avg_time_per_visit>
        <page_views>0</page_views>
      </2016-05-01 00:00:00>
    </data>
    <roles_types/>
  </parent>
</role_types>

School by Buildings

Path GET https://api.schoology.com/v1/analytics/schools/buildings?time_units={months/weeks/days}&start_time={timestamp}&end_time={timestamp}
Content None
Return

A count of total visits, submissions, files uploaded, page views, and comments posted, along with average time per visit based on school building.

JSON
{
  "role_types": {
    "faculty": {
      "role_type": "faculty",
      "data": {
        "2016-05-01 00:00:00": {
          "total_visits": 0,
          "submissions": 0,
          "date": "2016-05-01 00:00:00",
          "files_uploaded": 0,
          "comments_posted": 0,
          "avg_time_per_visit": 0,
          "page_views": 0
        }
      }
    },
    "student": {
      "role_type": "student",
      "data": {
        "2016-05-01 00:00:00": {
          "total_visits": 0,
          "submissions": 0,
          "date": "2016-05-01 00:00:00",
          "files_uploaded": 0,
          "comments_posted": 0,
          "avg_time_per_visit": 0,
          "page_views": 0
        }
      }
    },
    "parent": {
      "role_type": "parent",
      "data": {
        "2016-05-01 00:00:00": {
          "total_visits": 0,
          "submissions": 0,
          "date": "2016-05-01 00:00:00",
          "files_uploaded": 0,
          "comments_posted": 0,
          "avg_time_per_visit": 0,
          "page_views": 0
        }
      },
      "roles_types": [
        
      ]
    }
  }
}
XML
<role_types>
  <faculty>
    <role_type>faculty</role_type>
    <data>
      <2016-05-01 00:00:00>
        <total_visits>0</total_visits>
        <submissions>0</submissions>
        <date>2016-05-01 00:00:00</date>
        <files_uploaded>0</files_uploaded>
        <comments_posted>0</comments_posted>
        <avg_time_per_visit>0</avg_time_per_visit>
        <page_views>0</page_views>
      </2016-05-01 00:00:00>
    </data>
  </faculty>
  <student>
    <role_type>student</role_type>
    <data>
      <2016-05-01 00:00:00>
        <total_visits>0</total_visits>
        <submissions>0</submissions>
        <date>2016-05-01 00:00:00</date>
        <files_uploaded>0</files_uploaded>
        <comments_posted>0</comments_posted>
        <avg_time_per_visit>0</avg_time_per_visit>
        <page_views>0</page_views>
      </2016-05-01 00:00:00>
    </data>
  </student>
  <parent>
    <role_type>parent</role_type>
    <data>
      <2016-05-01 00:00:00>
        <total_visits>0</total_visits>
        <submissions>0</submissions>
        <date>2016-05-01 00:00:00</date>
        <files_uploaded>0</files_uploaded>
        <comments_posted>0</comments_posted>
        <avg_time_per_visit>0</avg_time_per_visit>
        <page_views>0</page_views>
      </2016-05-01 00:00:00>
    </data>
    <roles_types/>
  </parent>
</role_types>

School Building by Role

Information about user interactions with a section.

Path GET https://api.schoology.com/v1/analytics/highlights/sections/%section_id
Content None
Return

Includes enrollment id, last login, time in course, UID, first and last access.

JSON
{
  "highlights": {
    "13387890": {
      "last_login": 1408388755,
      "time_in_course": 0,
      "uid": 13387890,
      "first_access": null,
      "last_access": null
    },
    "13391712": {
      "last_login": 1408389262,
      "time_in_course": 0,
      "uid": 13391712,
      "first_access": null,
      "last_access": null
    }
  }
}
XML
<highlights>
  <13387890>
    <last_login>1408388755</last_login>
    <time_in_course>0</time_in_course>
    <uid>13387890</uid>
    <first_access/>
    <last_access/>
  </13387890>
  <13391712>
    <last_login>1408389262</last_login>
    <time_in_course>0</time_in_course>
    <uid>13391712</uid>
    <first_access/>
    <last_access/>
  </13391712>
</highlights>