PebblePad : API documentation

Grade

Provides the methods for interacting with grade records. Each record has a unique Id that is maintained internally by PebblePad's systems. This is not configurable. In every record type, it is the "Id" Guid field, and will be described as "PebblePad's xxxx Id", or similar. There is another field: "CustomId". This is a string in all records. You can use this to match records in PebblePad to those in your own systems. This field will normally be described as "Your Custom Id" or similar.

Methods

Method HTTP request Description
Get GET https://v3.pebblepad.co.uk/api/1.1/Grade/Get/{id} Returns an array of grades for a user identified on user Id.
GetOnCustomUserId GET https://v3.pebblepad.co.uk/api/1.1/Grade/GetOnCustomUserId/{id} Returns an array of grades for a user identified on custom user Id.
GetOnUserId GET https://v3.pebblepad.co.uk/api/1.1/Grade/GetOnUserId/{id} Returns an array of grades for a user identified on user Id.
Import POST https://v3.pebblepad.co.uk/api/1.1/Grade/Import/{id} Imports a single grade for a user identified on user Id.
ImportOnCustomUserId POST https://v3.pebblepad.co.uk/api/1.1/Grade/ImportOnCustomUserId/{id} Imports a single grade for a user identified on a custom user Id.
Recall PUT https://v3.pebblepad.co.uk/api/1.1/Grade/Recall/{id} Recalls a grade for a given grade Id.
RecallOnCustomId PUT https://v3.pebblepad.co.uk/api/1.1/Grade/RecallOnCustomId/{id} Recalls a grade for a given custom grade Id.
Update PUT https://v3.pebblepad.co.uk/api/1.1/Grade/Update/{id} Updates a grade for a given grade Id. The method will only update the Grade property against the GradeInfo supplied.
UpdateOnCustomId PUT https://v3.pebblepad.co.uk/api/1.1/Grade/UpdateOnCustomId/{id} Updates a grade for a given custom grade Id. The method will only update the Grade property against the GradeInfo supplied.

Methods

Get

Returns an array of grades for a user identified on user Id.

Scope Required

admin_grade:r

Request

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

Parameters

Parameter name Value Required Description
id string Yes Required Guid value, the User Id identifying the user.

Example request

POST api/1.1/Grade/Import/968f13b7-a5f5-4e77-89ee-9f44373ddcf5 HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx
{
  "assignmentname":"Critical Care Nursing",
  "assessorname":"Dr Joe Bloggs",
  "coursename":"Nursing",
  "date":"2015-02-18T16:37:34.055Z",
  "grade":"A"
} 

Response

HTTP 200 (OK)
{
  "aa85e6f1-67d4-4892-9102-2ea2e7dd7495"
} 

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"User could not be found."
} 

GetOnCustomUserId

Returns an array of grades for a user identified on custom user Id.

Scope Required

admin_grade:r

Request

GET https://v3.pebblepad.co.uk/api/1.1/Grade/GetOnCustomUserId/{id}

Parameters

Parameter name Value Required Description
id string Yes Required string value, the Custom User Id identifying the user.

Example request

GET api/1.1/Grade/GetOnCustomUserId/id435344554 HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx 

Response

HTTP 200 (OK)
[
  {
    "id":"aa85e6f1-67d4-4892-9102-2ea2e7dd7495"
    "assignmentname":"Critical Care Nursing",
    "assessorname":"Dr Joe Bloggs",
    "coursename":"Nursing",
    "date":"2015-02-18T16:37:34.055Z",
    "grade":"A"
  }
] 

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"User could not be found."
} 

GetOnUserId

Returns an array of grades for a user identified on user Id.

Scope Required

admin_grade:r

Request

GET https://v3.pebblepad.co.uk/api/1.1/Grade/GetOnUserId/{id}

Parameters

Parameter name Value Required Description
id string Yes Required string value, the user Id identifying the user.

Example request

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

Response

HTTP 200 (OK)
[
  {
    "id":"aa85e6f1-67d4-4892-9102-2ea2e7dd7495"
    "assignmentname":"Critical Care Nursing",
    "assessorname":"Dr Joe Bloggs",
    "coursename":"Nursing",
    "date":"2015-02-18T16:37:34.055Z",
    "grade":"A"
  }
] 

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"User could not be found."
} 

Import

Imports a single grade for a user identified on user Id.

Scope Required

admin_grade:c

Request

POST https://v3.pebblepad.co.uk/api/1.1/Grade/Import/{id}

Parameters

Parameter name Value Required Description
id string Yes User Id identifying the user to associate the imported grade.
grade gradeinfo Yes Required GradeInfo object to be imported. The following are required properties: UserId, CourseName, Grade and Date.

Example request

POST api/1.1/Grade/Import/968f13b7-a5f5-4e77-89ee-9f44373ddcf5 HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx
{
  "assignmentname":"Critical Care Nursing",
  "assessorname":"Dr Joe Bloggs",
  "coursename":"Nursing",
  "date":"2015-02-18T16:37:34.055Z",
  "grade":"A"
} 

Response

HTTP 200 (OK)
{
  "aa85e6f1-67d4-4892-9102-2ea2e7dd7495"
} 

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"User could not be found."
} 

ImportOnCustomUserId

Imports a single grade for a user identified on a custom user Id.

Scope Required

admin_grade:c

Request

POST https://v3.pebblepad.co.uk/api/1.1/Grade/ImportOnCustomUserId/{id}

Parameters

Parameter name Value Required Description
id string Yes Custom Id identifying the user to the imported grade.
grade gradeinfo Yes GradeInfo object, the grade to be imported. The following are required: CustomUserId, CourseName, Grade and Date.

Example request

POST api/1.1/Grade/ImportOnCustomId/id3534543456 HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx
{
  "assignmentname":"Critical Care Nursing",
  "assessorname":"Dr Joe Bloggs",
  "coursename":"Nursing",
  "date":"2015-02-18T16:37:34.055Z",
  "grade":"A"
} 

Response

HTTP 200 (OK)
{
  "aa85e6f1-67d4-4892-9102-2ea2e7dd7495"
} 

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"User could not be found."
} 

Recall

Recalls a grade for a given grade Id.

Scope Required

admin_grade:u

Request

PUT https://v3.pebblepad.co.uk/api/1.1/Grade/Recall/{id}

Remarks

It is only possible to recall grade records that have been created using the Create method using the API.

Parameters

Parameter name Value Required Description
id string Yes Required Guid value, the Id of the grade to be recalled.

Example request

PUT api/1.1/Grade/Recall/aa85e6f1-67d4-4892-9102-2ea2e7dd7495 HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx 

Response

HTTP 200 (OK) 

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"Grade not found"
} 

RecallOnCustomId

Recalls a grade for a given custom grade Id.

Scope Required

admin_grade:u

Request

PUT https://v3.pebblepad.co.uk/api/1.1/Grade/RecallOnCustomId/{id}

Parameters

Parameter name Value Required Description
id string Yes Required string value, the identifier of the grade to be recalled.

Example request

PUT api/1.1/Grade/RecallOnCustomId/Idssdd7495 HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx 

Response

HTTP 200 (OK) 

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"Grade not found"
} 

Update

Updates a grade for a given grade Id. The method will only update the Grade property against the GradeInfo supplied.

Scope Required

admin_grade:u

Request

PUT https://v3.pebblepad.co.uk/api/1.1/Grade/Update/{id}

Remarks

It is only possible to update grade records that have been created using the Create method using the API.

Parameters

Parameter name Value Required Description
id GUID Yes Id for grade.
gradeInfo updategrade Yes UpdateGrade object, the grade to be updated.

Example request

PUT api/1.1/Grade/Update/aa85e6f1-67d4-4892-9102-2ea2e7dd7495 HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx

{
  "grade":"A"
} 

Response

HTTP 200 (OK) 

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"Grade not found"
} 

UpdateOnCustomId

Updates a grade for a given custom grade Id. The method will only update the Grade property against the GradeInfo supplied.

Scope Required

admin_grade:u

Request

PUT https://v3.pebblepad.co.uk/api/1.1/Grade/UpdateOnCustomId/{id}

Remarks

It is only possible to update grade records that have been created using the Create method using the API.

Parameters

Parameter name Value Required Description
id string Yes Custom Id identifying the grade.
gradeInfo updategrade Yes UpdateGrade object, the grade to be updated.

Example request

      PUT api/1.1/Grade/UpdateOnCustomId/Idssdd7495 HTTP/1.1
      Host: https://v3.pebblepad.co.uk/
      Authorization: Bearer xxxxxxxxxxxxxxxx

      {
       "grade":"A"
      } 

Response

HTTP 200 (OK) 

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"Grade not found"
}