skip to content
Documentation
User Tools
Log In
Site Tools
Search
Tools
Show page
Old revisions
Backlinks
Recent Changes
Media Manager
Sitemap
Log In
>
Recent Changes
Media Manager
Sitemap
Trace:
sis_classic_developer_manual
====== Student Information System (Classic) Developer Guide ====== <note warning> Information in here is for the classic edition of the Pacific SIS which is no longer in use. Refer to the current version at [[sis_developer_manual|Student Information System Developer Guide]] </note> ===== 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. {{ :sis-user-manual:opensis-restful-api-1.png?nolink |}} 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: {{ :sis-user-manual:opensis-restful-api-2.png?nolink |}} 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. {{ :sis-user-manual:opensis-restful-api-3.png?nolink |}} 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: <code json> https://yoursis.domain.name/api/StudentEnrollmentInfo.php?api_key=<your_api_key>&api_secret=<your_api_secret>&sch_year=<school_year>&format=<format> </code> For example if key=zuwYEmB5Kg, secret=14dd1c998bacf7200a9c92932dee86fa, format=json, school year=2018 then the URL will be: <code json> https://yoursis.domain.name/api/StudentEnrollmentInfo.php?api_key=zuwYEmB5Kg&api_secret=14dd1c998bacf7200a9c92932dee86fa& sch_year=2018&format=json </code> For School Information, do this: <code json> https://yoursis.domain.name/api/SchoolInfo.php?api_key=<your_api_key>&api_secret=<your_api_secret&format=<format> </code> For example if key=zuwYEmB5Kg, secret=14dd1c998bacf7200a9c92932dee86fa, format=json then the URL will be: <code json> https://yoursis.domain.name/api/SchoolInfo.php?api_key=zuwYEmB5Kg&api_secret=14dd1c998bacf7200a9c92932dee86fa&format=json </code> For Staff Information, do this: <code json> http://yoursis.domain.name/api/StaffInfo.php?api_key=<your_api_key>&api_secret=<your_api_secret>&sch_year=<school_year>&format=<format> </code> Fore example if key=zuwYEmB5Kg, secret=14dd1c998bacf7200a9c92932dee86fa, format=json, school year=2018 then the URL will be: <code json> https://yoursis.domain.name/api/StaffInfo.php?api_key=zuwYEmB5Kgapi_secret=14dd1c998bacf7200a9c92932dee86fa&sch_year=2018&format=json </code> 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. <code php> $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 ); </code>
sis_classic_developer_manual.txt
ยท Last modified: 2022/09/07 01:16 by
ghachey
Page Tools
Show page
Old revisions
Backlinks
Back to top