PebblePad : API documentation

Provides the methods for interacting with the membership of courses held in Data Island.

Methods

Method HTTP request Description
Create POST https://v3.pebblepad.co.uk/api/1.1/di//Create/ Adds a member to a course Note: a user's role may be "moderator", "tutor" or "leadtutor".
Get GET https://v3.pebblepad.co.uk/api/1.1/di//Get/{id} Gets all the memberships of a course in Data Island.
GetMemberCourses GET https://v3.pebblepad.co.uk/api/1.1/di//GetMemberCourses/{id} Gets all the courses for which the user is a member.
RemoveCourseMember POST https://v3.pebblepad.co.uk/api/1.1/di//RemoveCourseMember/ Removes a course membership for a user on a course.

Methods

Create

Adds a member to a course Note: a user's role may be "moderator", "tutor" or "leadtutor".

Scope Required

admin_courses:c

Request

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

Parameters

Parameter name Value Required Description
courseMember coursememberinfo Yes Course member

Example request

POST api/1.1/di/CourseMember/Create HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx
{
  "courseid":"aa85e6f1-67d4-4892-9102-2ea2e7dd7475",
  "username":"johnX11",
  "role":"tutor"
} 

Response

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

Example error response

Get

Gets all the memberships of a course in Data Island.

Scope Required

admin_courses:r

Request

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

Parameters

Parameter name Value Required Description
id string Yes Data Island Course Id

Example request

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

Response

HTTP / 1.1 200 (OK)
[
  {
    "courseid":"aa85e6f1-67d4-4892-9102-2ea2e7dd7475",
    "username":"johnX11",
    "role":"tutor"
  },
  {
    "courseid":"aa85e6f1-67d4-4892-9102-2ea2e7dd7475",
    "username":"willK13",
    "role":"leadtutor"
  }
] 

Example error response

GetMemberCourses

Gets all the courses for which the user is a member.

Scope Required

admin_courses:r

Request

GET https://v3.pebblepad.co.uk/api/1.1/di//GetMemberCourses/{id}

Parameters

Parameter name Value Required Description
id string Yes Username

Example request

GET api/1.1/di/CourseMember/GetMemberCourses/user1 HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx 

Response

HTTP / 1.1 200 (OK)
[
  {
    "id":"aa85e6f1-67d4-4892-9102-2ea2e7dd7495",
    "title":"Artistic Design for the Digital Platform",
    "description":"For those with an artistic flare and a passion for innovating digital interface",
    "startdate":"2015-09-08T08:00:00.000Z",
    "enddate":"2016-05-21T21:00:00.000Z",
    "coursecode":"ART-DES-DIG",
    "alternativecode":"DIG-ART-DES",
    "instancecode":"DAD2015-2016",
    "academicyear":"2015/16",
    "studentstatus":"Enrolling",
    "modeofattendance":"Campus",
    "createatlasworkspace":true,
    "coursecategory":"Digital",
    "resourceid":"e4e2272b-5bfc-457b-95e1-77953854fe2a"
    "workspaceid":"b3249fd1-5bfc-457b-95e1-77953854fe2a"
  },
  {
    "id":"dc4421e8-c096-447f-ad7a-e420e1bcc837",
    "title":"Designing for the Real World",
    "description":"This is for those who wanting to get into designing real world objects, like new cars, house utilities, and other tangible products of the real world.",
    "startdate":"2015-09-08T08:00:00.000Z",
    "enddate":"2016-05-21T21:00:00.000Z",
    "coursecode":"DES-TANG",
    "alternativecode":"DES-TANG-REAL",
    "instancecode":"DTR2015-2016",
    "academicyear":"2015/16",
    "studentstatus":"Full",
    "modeofattendance":"Campus",
    "createatlasworkspace":true,
    "coursecategory":"Design for Production",
    "resourceid":"f825c8c3-09e2-49f6-8b9b-9b1de38e1444"
    "workspaceid":"b6012bca-5bfc-457b-95e1-77953854fe2a"
  }
] 

Example error response

RemoveCourseMember

Removes a course membership for a user on a course.

Scope Required

admin_courses:u

Request

POST https://v3.pebblepad.co.uk/api/1.1/di//RemoveCourseMember/

Parameters

Parameter name Value Required Description
removeCourseMember deletecoursemember Yes Course Member to delete

Example request

POST api/1.1/di/CourseMember/RemoveCourseMember HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx
{
  "courseid":"aa85e6f1-67d4-4892-9102-2ea2e7dd7475",
  "username":"johnX11"
} 

Response

HTTP / 1.1 200 (OK) 

Example error response