User Tools

Site Tools


sis_classic_developer_manual

Student Information System (Classic) Developer Guide

Information in here is for the classic edition of the Pacific SIS which is no longer in use. Refer to the current version at Student Information System Developer Guide

RESTful API

Extracting the data from the SIS programmatically is done through its RESTful API. The API can pull student enrollment data, school information data and staff information data. You will need to login as a SuperAdmin. Under Tools menu, you will see API Token submenu. Click on it to generate API Tokens.

If you do not see it, then give yourself permission. Go to Users→Setup→Profiles and select the Super Administrator. Scroll down to the Tools section and make sure the access to the API is turned on. It should look like this:

If the API token menu is turned on, select that to generate the API token. To generate a new token, click generate button. Once you click the Generate button a new Key and Secret will be generated. This Key and Secret values will be needed to access the APIs. You can generate multiple tokens and they will all be valid for accessing APIs.

You can test the APIs via URL using a recent browser that decodes the JSON in a proper format.

For Student Enrollment Information, do this:

https://yoursis.domain.name/api/StudentEnrollmentInfo.php?api_key=<your_api_key>&api_secret=<your_api_secret>&sch_year=<school_year>&format=<format>

For example if key=zuwYEmB5Kg, secret=14dd1c998bacf7200a9c92932dee86fa, format=json, school year=2018 then the URL will be:

https://yoursis.domain.name/api/StudentEnrollmentInfo.php?api_key=zuwYEmB5Kg&api_secret=14dd1c998bacf7200a9c92932dee86fa& sch_year=2018&format=json

For School Information, do this:

https://yoursis.domain.name/api/SchoolInfo.php?api_key=<your_api_key>&api_secret=<your_api_secret&format=<format>

For example if key=zuwYEmB5Kg, secret=14dd1c998bacf7200a9c92932dee86fa, format=json then the URL will be:

https://yoursis.domain.name/api/SchoolInfo.php?api_key=zuwYEmB5Kg&api_secret=14dd1c998bacf7200a9c92932dee86fa&format=json

For Staff Information, do this:

http://yoursis.domain.name/api/StaffInfo.php?api_key=<your_api_key>&api_secret=<your_api_secret>&sch_year=<school_year>&format=<format>

Fore example if key=zuwYEmB5Kg, secret=14dd1c998bacf7200a9c92932dee86fa, format=json, school year=2018 then the URL will be:

https://yoursis.domain.name/api/StaffInfo.php?api_key=zuwYEmB5Kgapi_secret=14dd1c998bacf7200a9c92932dee86fa&sch_year=2018&format=json

An example of using the API in code code (e.g. in PHP code), run the following code to retrieve the student enrollment information API.

$url = 'http://fedsis.doe.fm:88/api/StudentEnrollmentInfo.php?' .http_build_query(
         [
           'api_key' => ' zuwYEmB5Kg ' ,
           'api_secret' => ' 14dd1c998bacf7200a9c92932dee86fa ' ,
           'sch_year' => '2018' ,
           'format' => 'json' ,
         ]
       );
$ch = curl_init( $url );
curl_setopt( $ch , CURLOPT_CONNECTTIMEOUT, 3600);
curl_setopt( $ch , CURLOPT_TIMEOUT, 3600);
curl_setopt( $ch , CURLOPT_RETURNTRANSFER, true);
curl_setopt( $ch , CURLOPT_SSL_VERIFYPEER, false);
curl_setopt( $ch , CURLOPT_SSL_VERIFYHOST, false);
curl_setopt( $ch , CURLOPT_POST, true);
$response = curl_exec( $ch );
sis_classic_developer_manual.txt · Last modified: 2022/09/07 06:16 by ghachey