PebblePad : API documentation

Course Criteria

Provides the mthods for interacting with Course Criteria in Data Island.

Methods

Method HTTP request Description
Create POST https://v3.pebblepad.co.uk/api/1.1/di/Course Criteria/Create/ Adds a new set of criteria to a course in Data Island.
Delete DELETE https://v3.pebblepad.co.uk/api/1.1/di/Course Criteria/Delete/ Delete all criteria for a course in Data Island.
Get GET https://v3.pebblepad.co.uk/api/1.1/di/Course Criteria/Get/{id} Returns the course criteria info for a course in Data Island.

Methods

Create

Adds a new set of criteria to a course in Data Island.

Scope Required

admin_courses:u

Request

POST https://v3.pebblepad.co.uk/api/1.1/di/Course Criteria/Create/

Remarks

Every criteria (value) must have a unique order (key). Duplicate orders will cause only the last criteria with the given order to be saved.

Parameters

Parameter name Value Required Description
courseCriteria coursecriteriainfo Yes The CourseCriteriaInfo course criteria

Example request

POST api/1.1/di/CourseCriteria/Create HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx
{
  "courseid":"aa85e6f1-67d4-4892-9102-2ea2e7dd7495",
  "coursecriteria": { 0 : 'this is a criteria', 1 : 'this is another criteria' }
} 

Response

HTTP / 1.1 200 (OK)
"aa85e6f1-67d4-4892-9102-2ea2e7dd7495" 

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"'CourseId' field is required"
} 

Delete

Delete all criteria for a course in Data Island.

Scope Required

admin_courses:u

Request

DELETE https://v3.pebblepad.co.uk/api/1.1/di/Course Criteria/Delete/

Example request

DELETE api/1.1/di/CourseCriteria/Delete/aa85e6f1-67d4-4892-9102-2ea2e7dd7495 HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx 

Response

HTTP / 1.1 200 (OK)
"aa85e6f1-67d4-4892-9102-2ea2e7dd7495" 

Example error response

Get

Returns the course criteria info for a course in Data Island.

Scope Required

admin_courses:r

Request

GET https://v3.pebblepad.co.uk/api/1.1/di/Course Criteria/Get/{id}

Remarks

Since course criteria is created as one object, it's returned as that object.

Parameters

Parameter name Value Required Description
id string Yes The id of the CourseInfo course

Example request

GET api/1.1/di/CourseCriteria/Get/aa85e6f1-67d4-4892-9102-2ea2e7dd7495 HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx 

Response

HTTP / 1.1 200 (OK)
{
  "courseid":"aa85e6f1-67d4-4892-9102-2ea2e7dd7495",
  "coursecriteria": { 0 : 'this is a criteria', 1 : 'this is another criteria' }
} 

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"'Id' field is required"
}