Retrieve all registration data

Last modified on February 24, 2014 at 11:48 pm

Overview

Retrieve a list of all registrations that have been created for offerings in your organization. The response will be contained in the results property of the response object, and represented as an array of registration objects. Fields with no value set will be omitted.

JSON Object Definition

The following is a full definition of all possible properties on the JSON object representing a registration. For more details, see the Registration Object Reference.

{
  "id" : "",
  "userId": "",
  "offeringId": "",
  "title": "",
  "status" : "", // one of "active", "passed", "failed", or "ejected"
  "grade": 0,
  "graderId": "",
  "graderComment": "",
  "createdDate": "",
  "beginDate": "",
  "lastActiveDate": "",
  "endDate": ""
}

Filtering

Filtering the result list can be accomplished by specifying value restrictions for some of the registration object properties. You may specify multiple value restrictions; note that all of the value restrictions you specify must evaluate to true on each item to be included in the results. You may filter on the following properties:

Parameter name Details
status Filter results to one of the four possible status values: active, passed, failed, or ejected.
userId Filter based on the user id of the user in the registration.
offeringId Filter based on the id of the offering in the registration.
createdDate Filter based on the date the registration was created. This must be a string representation of a date. This can be a precise timestamp, an imprecise date implying a range, or a range of dates. See the Date Filtering documentation for more detail.
beginDate Filter based on the date the user was first active within their course. For details on how this parameter should be specified, see createdDate above.
lastActiveDate Filter based on the date the user was last active within their course. For details on how this parameter should be specified, see createdDate above.
endDate Filter based on the date the user completed the course. For details on how this parameter should be specified, see createdDate above.

Example

This example demonstrates how registrations in various states will be represented. In the result set you can see examples of the following states:

  • New registration (status = active)
  • Completed registration with passing grade (status = passed)
  • Completed registration with failing grade (status = failed)
  • Manually graded registration (graderId property set)
  • Registration ended with ejection (status = ejected)
Request
GET /dc/api/v5/registrations
Host: api.digitalchalk.com
Accept: application/json

Response
HTTP/1.1 200 OK
Content-type: application/json
Content-length: 2212

{
	results: [
		{
			id: "65ade781cc98d136543678191005431a",
			userId: "6629aeada89133acedfad6d7d110123d",
			offeringId:"89cd2eada89133acedfad6d766a2d931",
			title: "Course 1 - Section 1",
			status: "active",
			createdDate: "2012-03-01T06:03:10Z",
			beginDate: "2012-03-05T13:24:42Z",
			lastActiveDate: "2012-03-20T19:13:05Z"
		},
		{
			id: "2319ac8de813d1365436781910787721",
			userId: "4893212a29887dcaedf0084472869c3d",
			offeringId:"89cd2eada89133acedfad6d766a2d931",
			title: "Course 2 - Section 1",
			status: "passed",
			grade: 97.15,
			createdDate: "2012-03-01T06:03:10Z",
			beginDate: "2012-03-05T13:24:42Z",
	lastActiveDate: "2012-03-20T19:13:05Z",
			endDate: "2012-03-20T19:13:05Z"
		},
		{
			id: "662aced329a5643571653571936735cc",
			userId: "82acedecafed2ac93ac877dea9921412",
			offeringId:"89cd2eada89133acedfad6d766a2d931",
			title: "Course 3 - Section 2",
			status: "failed",
			grade: 42.6,
			createdDate: "2012-03-01T06:03:10Z",
			beginDate: "2012-03-05T13:24:42Z",
		lastActiveDate: "2012-03-20T19:13:05Z",
			endDate: "2012-03-20T19:13:05Z"
		},
		{
			id: "ad2r922ab3bc7dc884677992923deec1",
			userId: "8792decaa79914345364861afed8a21d",
			offeringId:"89cd2eada89133acedfad6d766a2d931",
			title: "Course 4 - Section 1",
			status: "passed",
			grade: 100,
			graderId: "89213aadea92ef4abbc4861afed8a215",
			graderComment: "credit given for hard-copy of assessment received. -course admin",
			createdDate: "2012-03-01T06:03:10Z",
			endDate: "2012-03-20T19:13:05Z"
		},
		{
			id: "21439a7db2891cde5d2eb27751ca7c7a",
			userId: "8792decaa79914345364861afed8a21d",
			offeringId:"89cd2eada89133acedfad6d766a2d931",
			title: "Course 5 - Section 3",
			status: "ejected",
			createdDate: "2012-01-04T06:03:10Z",
			beginDate: "2012-01-04T06:07:14Z",
			lastActiveDate: "22012-01-04T06:07:14Z",
			endDate: "2012-03-20T19:13:05Z"
}
	]
}

Reference