This project contains sample code for interacting with the Blackboard Learn REST Web Services in PHP. This sample was built with PHP 8.0.0. It uses HTTP_Request2 for HTTP processing.
-
Target: Blackboard Learn SaaS 2015.12.0 and above
-
Source Release: v2.0
-
Release Date 2020-12-29
-
Author: shurrey
-
Tested on Blackboard Learn SaaS Release 3900.2.0-rel.34+4ad580a
-
Updated for PHP 8
-
Target: Blackboard Learn SaaS 2015.12.0 and above
-
Source Release: v1.0
-
Release Date 2016-03-13
-
Author: shurrey
-
Tested on Blackboard Learn SaaS Release 2015.12.0-ci.16+149e9d4
- PHP - This sample was built with PHP 8.0.0
- Requires the following libraries: -- HTTP_Request 2 v2.4.2 - This can be installed with pear install HTTP_Request2. See <a href="https://pear.php.net" -target="_blank">PEAR's website for more details.
The connection information is located in the classes/Constants.class.php file. You must change three values:
- $HOSTNAME: must be set equal to your test environment's URL with https.
- $KEY: replace with your key.
- $SECRET: replace with your secret.
This is a console app. You can run from the command prompt. The sample code allows you to perform the full Create, Read, Update, and Delete options on the following five objects:
- Datasource
- Term
- Course
- User
- Membership
To run the code, ensure you have followed the steps to configure the sample code, then simply navigate to the directory you cloned the project to and run php restdemo.php. The code will run and print out all of the resulting objects from each call. It will
- Create, Read, and Update the Datasrouce
- Create, Read, and Update the Term
- Create, Read, and Update the Course
- Create, Read, and Update the User
- Create, Read, and Update the Membership
- Delete the Membership
- Delete the User
- Delete the Course
- Delete the Term
- Delete the Datasource
This code will give you the base knowledge you need to interact with the Blackboard Learn REST services using PHP. For a thorough walkthrough of this code, visit the corresponding Community site page here.