Retrieve Data For a Specific Registration

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

Overview

Retrieve data about for a specific registration record specified by the URL. A successful response will be indicated with HTTP status code 200, and the data will represented as a JSON object using the format shown below. 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": ""
}

Examples

Retrieve registration in progress

This example shows how a registration record would be represented when a user is actively taking a course, but has not yet finished. In this case, the status property is active, and endDate and all the grade-related fields are omitted.

Request
GET /dc/api/v5/registrations/65ade781cc98d136543678191005431a HTTP/1.1
Host: api.digitalchalk.com
Accept: application/json

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

{
	id: "65ade781cc98d136543678191005431a",
	userId: "6629aeada89133acedfad6d7d110123d",
	offeringId:"89cd2eada89133acedfad6d766a2d931",
	title:"Course 1",
	status: "active",
	createdDate: "2012-03-01T06:03:10Z",
	beginDate: "2012-03-05T13:24:42Z",
	lastActiveDate: "2012-03-20T19:13:05Z"
}

Retrieve completed registration

This example shows how a registration record would be represented when a user has completed a course, in this case with a passing grade indicated by the status property set to passed. A failed registration would have status set to failed instead. Note that it is not sufficient to check the gradePercentage property and compare against some passing threshold because pass/fail conditions can be modified on a course via the web interface. Therefore a grade which would qualify as passing on one registration could be a failing grade on another registration in the same offering based on how the course was configured at the time the user completed the course. In this example, there is no graderId property set because the user completed the course and had their grade computed automatically.

Request
GET /dc/api/v5/registrations/2319ac8de813d1365436781910787721 HTTP/1.1
Host: api.digitalchalk.com
Accept: application/json

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

{
	id: "2319ac8de813d1365436781910787721",
	userId: "4893212a29887dcaedf0084472869c3d",
	offeringId:"89cd2eada89133acedfad6d766a2d931",
	title:"Course 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"
}

Retrieve ejected registration

When a user is ejected from a course, their progress is halted and they receive no grade. This example shows a registration from which the user has been ejected.

Request
GET /dc/api/v5/registrations/21439a7db2891cde5d2eb27751ca7c7a HTTP/1.1
Host: api.digitalchalk.com
Accept: application/json

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

{
	id: "21439a7db2891cde5d2eb27751ca7c7a",
	userId: "8792decaa79914345364861afed8a21d",
	offeringId:"89cd2eada89133acedfad6d766a2d931",
	title:"Course 1",
	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