PebblePad : API documentation

Course Link

Provides the methods for interacting with links between courses and other courses or organisational units held in the Data Island. Each record has a unique Id that is provided by you and should to match those in your own systems.

Methods

Method HTTP request Description
Create POST https://v3.pebblepad.co.uk/api/1.1/di/Course Link/Create/ Adds a new Course Link between two Courses in the Data Island.
Delete DELETE https://v3.pebblepad.co.uk/api/1.1/di/Course Link/Delete/ Deletes a Course from the Data Island.
GetAll GET https://v3.pebblepad.co.uk/api/1.1/di/Course Link/GetAll/ Gets all Course Links from the Data Island.
GetFrom GET https://v3.pebblepad.co.uk/api/1.1/di/Course Link/GetFrom/{id} Gets all Course Links from a specific course in the Data Island.
GetTo GET https://v3.pebblepad.co.uk/api/1.1/di/Course Link/GetTo/{id} Gets all Course Links to a specific course in the Data Island.

Methods

Create

Adds a new Course Link between two Courses in the Data Island.

Scope Required

admin_courses:c

Request

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

Example request

POST api/1.1/di/CourseLink/Create HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx
{
  "courseid":"aa85e6f1-67d4-4892-9102-2ea2e7dd7495",
  "linkedid":"dc4421e8-c096-447f-ad7a-e420e1bcc837",
  "linktype":"Sibling",
  "linksto":"Course",
} 

Response

HTTP / 1.1 200 (OK)
"aa85e6f1-67d4-4892-9102-2ea2e7dd7495-dc4421e8-c096-447f-ad7a-e420e1bcc837" 

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"Id for the given Course is already being used."
  "erroritem":"aa85e6f1-67d4-4892-9102-2ea2e7dd7495"
} 

Delete

Deletes a Course from the Data Island.

Scope Required

admin_courses:d

Request

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

Example request

DELETE api/1.1/di/CourseLink/Delete HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx
{
  "courseid":"aa85e6f1-67d4-4892-9102-2ea2e7dd7495",
  "linkedid":"5bcff938-19e2-455c-bea7-cfe8e29a07e1"
} 

Response

HTTP / 1.1 200 (OK)
"aa85e6f1-67d4-4892-9102-2ea2e7dd7495-5bcff938-19e2-455c-bea7-cfe8e29a07e1" 

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"No Organisation Unit was found with the given Id",
  "erroritem":"aa85e6f1-67d4-4892-9102-2ea2e7dd7495"
} 

GetAll

Gets all Course Links from the Data Island.

Scope Required

admin_courses:r

Request

GET https://v3.pebblepad.co.uk/api/1.1/di/Course Link/GetAll/

Example request

GET api/1.1/di/CourseLink/GetAll HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx 

Response

HTTP / 1.1 200 (OK)
[
  {
    "courseid":"aa85e6f1-67d4-4892-9102-2ea2e7dd7495",
    "linkedid":"dc4421e8-c096-447f-ad7a-e420e1bcc837",
    "linktype":"Sibling",
    "linksto":"Course",
  },
  {
    "courseid":"aa85e6f1-67d4-4892-9102-2ea2e7dd7495",
    "linkedid":"5bcff938-19e2-455c-bea7-cfe8e29a07e1",
    "linktype":"OU",
    "linksto":"OrganisationalUnit",
  }
] 

Example error response

GetFrom

Gets all Course Links from a specific course in the Data Island.

Scope Required

admin_courses:r

Request

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

Parameters

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

Example request

GET api/1.1/di/CourseLink/GetFrom/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",
    "linkedid":"dc4421e8-c096-447f-ad7a-e420e1bcc837",
    "linktype":"Sibling",
    "linksto":"Course",
  },
  {
    "courseid":"aa85e6f1-67d4-4892-9102-2ea2e7dd7495",
    "linkedid":"5bcff938-19e2-455c-bea7-cfe8e29a07e1",
    "linktype":"OU",
    "linksto":"OrganisationalUnit",
  }
] 

Example error response

GetTo

Gets all Course Links to a specific course in the Data Island.

Scope Required

admin_courses:r

Request

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

Parameters

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

Example request

GET api/1.1/di/CourseLink/GetTo/dc4421e8-c096-447f-ad7a-e420e1bcc837 HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx 

Response

HTTP / 1.1 200 (OK)
[
  {
    "courseid":"aa85e6f1-67d4-4892-9102-2ea2e7dd7495",
    "linkedid":"dc4421e8-c096-447f-ad7a-e420e1bcc837",
    "linktype":"Sibling",
    "linksto":"Course",
  }
] 

Example error response