PebblePad : API documentation

UserInstitution

Provides methods for interacting with a User's previous Institutions held in Data Island.

Methods

Method HTTP request Description
Create POST https://v3.pebblepad.co.uk/api/1.1/di/UserInstitution/Create/ Adds a new User Institution in Data Island.
Delete DELETE https://v3.pebblepad.co.uk/api/1.1/di/UserInstitution/Delete/ Deletes a User Institution from the Data Island.
GetOnUsername GET https://v3.pebblepad.co.uk/api/1.1/di/UserInstitution/GetOnUsername/{id} Gets all the institutions for a user in Data Island.
Update POST https://v3.pebblepad.co.uk/api/1.1/di/UserInstitution/Update/ Updates a User Institution in the Data Island.

Methods

Create

Adds a new User Institution in Data Island.

Scope Required

admin_usermanagement:u

Request

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

Remarks

The user institution id provided here can be used (optionally) to link an institution to a qualification by using the StudiedAt field on qualification.

Parameters

Parameter name Value Required Description
userInstitution userinstitutioninfo Yes The UserInstitutionInfo to add.

Example request

POST api/1.1/di/UserInstitution/Create HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx
{
  "id": "aa85e6f1-67d4-4892-9102-2ea2e7dd7495",
  "institutionname": "Pebble Academy",
  "startdate": "2014-05-21T21:00:00.000Z",
  "enddate": "2016-05-21T21:00:00.000Z",
  "username": "aa85e6f1"
} 

Response

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

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"'Id' for the given user institution is already being used."
} 

Delete

Deletes a User Institution from the Data Island.

Scope Required

admin_usermanagement:d

Request

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

Example request

DELETE api/1.1/di/UserInstitution/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

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"No User Institution was found with the given Id"
} 

GetOnUsername

Gets all the institutions for a user in Data Island.

Scope Required

admin_usermanagement:r

Request

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

Parameters

Parameter name Value Required Description
id string Yes Username to return institutions for.

Example request

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

Response

HTTP / 1.1 200 (OK)
[
  {
    "id": "aa85e6f1-67d4-4892-9102-2ea2e7dd7495",
    "institutionname": "Pebble Academy",
    "startdate": "2014-05-21T21:00:00.000Z",
    "enddate": "2016-05-21T21:00:00.000Z",
    "username": "myuserid"
  },
  {
    "id": "aa85e6f1-67d4-4892-9102-2ea2e7Bd7495",
    "institutionname": "Pebble School",
    "startdate": "2010-05-21T21:00:00.000Z",
    "enddate": "2013-05-21T21:00:00.000Z",
    "username": "myuserid"
  }
] 

Example error response

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

Update

Updates a User Institution in the Data Island.

Scope Required

admin_usermanagement:u

Request

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

Remarks

The user institution id provided here can be used (optionally) to link an institution to a qualification by using the StudiedAt field on qualification.

Parameters

Parameter name Value Required Description
userInstitution userinstitutioninfo Yes The UserInstitutionInfo to update.

Example request

POST api/1.1/di/UserInstitution/Update HTTP/1.1
Host: https://v3.pebblepad.co.uk/
Authorization: Bearer xxxxxxxxxxxxxxxx
{
  "id": "aa85e6f1-67d4-4892-9102-2ea2e7dd7495",
  "institutionname": "Pebble Academy",
  "startdate": "2012-05-21T21:00:00.000Z",
  "enddate": "2016-05-21T21:00:00.000Z",
  "username": "aa85e6f1"
} 

Response

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

Example error response

HTTP/1.1 400 (Bad Request)
{
  "errormessage":"No User Institution was found with the given Id"
}