User Tools

Site Tools


emis_public_rest_api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
emis_public_rest_api [2020/07/28 02:26] – [Using the Pacific EMIS REST API] ghacheyemis_public_rest_api [2023/10/30 14:58] (current) – [Lookup Lists (Vocab)] ghachey
Line 1: Line 1:
 ====== Using the Pacific EMIS REST API ====== ====== Using the Pacific EMIS REST API ======
  
-Throughout these notes, we'll use <emis_root> to designate the base URL of the EMIS system (e.g. fedemis.doe.fm for FSM)+This page documents the Pacific EMIS REST API (or RESTful API)There are a few things to note as convention for these docs.
  
-Throughout the docs you will see https is use though it is possible only http would be available.+  * ''<emis_root>'' is used to designate the base URL of the EMIS system (e.g. fedemis.doe.fm for FSM). 
 +  * Endpoints typically will start with ''https'' which is preferred. However, it may be some contexts only support  ''http''.
  
 ===== Logging In ===== ===== Logging In =====
Line 79: Line 80:
  
 <note tip>for example perhaps using the code table gives you additional ways of iterating over the standards or criteria.</note> <note tip>for example perhaps using the code table gives you additional ways of iterating over the standards or criteria.</note>
 +
 +==== Vocab lookup ====
 +
 +A special type of lookup you get when loading the app or starting to use the REST API is the "vocab". The vocab, short for vocabularies, is a means to localize the Pacific EMIS terminologies. Different countries have different terminologies, for example:
 +
 +  * Districts in FSM are States, in RMI they are Atolls/Islands and in Solomon Islands they are provinces, or
 +  * Grades vs Grade Levels vs Class Levels
 +
 +While referred to differently in different countries, they are in essence the same things. So the Pacific EMIS uses one common term in the source code but in the UI it can easily be translated to the country's specific preferred terminology. For example, in the source code developers would work with "District" but in the web user interfaces the word District would translate to the country specific terminology (State in FSM, Atoll/Island in RMI, etc.). In the current web UI, this is achieve through the use of simple dynamic filters in the HTML. Any technique can be used. The important thing to know are the list of vocabs in use for a specific country which are available in the lookups' vocab object as shown below.
 +
 +{{ :rest-api:rest-api-vocab-1.png?nolink |}}
 +
  
 ===== Entity Lists ===== ===== Entity Lists =====
Line 299: Line 312:
 </code> </code>
  
 +===== Exams Endpoints =====
 +
 +'Exams' endpoints return exams data in a format for flexible analysis. Access it at the following URL.
 +
 +<code>
 +https://<emis_root>/api/warehouse/exams/table
 +</code>
 +
 +And received data that looks like the following.
 +
 +{{ :rest-api:rest-api-exams-1.png?nolink |}}
 ===== School Accreditation Endpoints ===== ===== School Accreditation Endpoints =====
  
Line 595: Line 619:
 ===== Currently Working REST API to be Deprecated  ===== ===== Currently Working REST API to be Deprecated  =====
  
-Some of the REST API that are currently available and working will be deprecated in favor of their final version 1. They will continue working for the foreseeable future but it will be necessary to migrate to the new ones that will soon be documented hereinThose currently working but soon be to improved are listed below.+Some of the REST API that are currently available and working (and some no longer working) will be deprecated in favor of their final version 1. Anybody still using any of the Deprecate below needs to move to the Instead Use as soon as possible. 
 +==== Used in Exams Dashboard ==== 
 + 
 +Deprecate 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/examsdistrictresults  
 +</code> 
 + 
 +Instead use 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/exams/district/{districtCode?}/
 +</code> 
 + 
 +==== Used in Schools Dashboard ==== 
 + 
 +Deprecate 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/tableenrol 
 +https://<emis_root>/api/warehouse/tableenrol/
 +</code> 
 + 
 +Instead use 
 + 
 +<note important>Unsure yet what to replace this withIt is actually still in use in Pacific EMIS web app and the backend code has no Deprecated attribute like other deprecated end points.</note> 
 + 
 +Deprecate 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/districtenrol 
 +https://<emis_root>/api/warehouse/districtenrol/
 +</code> 
 + 
 +Instead use 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/enrol/district 
 +https://<emis_root>/api/warehouse/enrol/district/
 +</code> 
 + 
 +Deprecate  
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/schoolflowrates 
 +</code> 
 + 
 +Instead use 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/flow/nation 
 +</code> 
 + 
 +==== Used in Individual School Dashboard ==== 
 + 
 +Deprecate 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/enrolbyschool/{schoolNo} 
 +</code> 
 + 
 +Instead use 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/enrol/school/schoolNo?report 
 +</code> 
 + 
 +Deprecate 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/schoolflowrates/{schoolNo} 
 +</code> 
 + 
 +Instead use 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/flow/school/{schoolNo} 
 +</code> 
 + 
 + 
 +Deprecate 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/schoolteachercount/{schoolNo} 
 +</code> 
 + 
 +Instead use 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/teachers/school/[schoolno]?report 
 +</code> 
 + 
 + 
 + 
 +==== Used in Teachers Dashboard ==== 
 + 
 +Deprecate 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/teacherpupilratio 
 +</code> 
 + 
 +Instead use 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/pupilteacherratio 
 +</code> 
 + 
 +Deprecate 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/schoolteacherpupilratio 
 +</code> 
 + 
 +Instead use 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/pupilteacherratio/school 
 +</code> 
 + 
 +Deprecate 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/teachercount 
 +</code> 
 + 
 +Instead use 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/teachers?report 
 +</code> 
 + 
 +Deprecate 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/schoolteachercount 
 +</code> 
 + 
 +Instead use 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/teachers/school?report 
 +</code> 
 + 
 +==== Used elsewhere ==== 
 + 
 +Deprecate 
 + 
 +<code> 
 +https://<emis_root>/api/warehouse/v0/edlevelage 
 +</code> 
 + 
 +Instead use
  
 <code> <code>
-https://<emis_root>/api/warehouse/examsdistrictresults (Exams Dashboard) +https://<emis_root>/api/warehouse/edlevelage
-https://<emis_root>/api/warehouse/tableenrol (Schools Dashboard) +
-https://<emis_root>/api/warehouse/teachercount (Teachers Dashboard) +
-https://<emis_root>/api/warehouse/teacherpupilratio (Teachers Dashboard) +
-https://<emis_root>/api/warehouse/teacherqual (Teachers Dashboard) +
-https://<emis_root>/api/warehouse/classleveler (Indicators Dashboard) +
-https://<emis_root>/api/warehouse/edleveler (Indicators Dashboard) +
-https://<emis_root>/api/warehouse/flowrates (Indicators Dashboard) +
-https://<emis_root>/api/warehouse/edlevelage (Indicators Dashboard)+
 </code> </code>
  
emis_public_rest_api.1595903180.txt.gz · Last modified: 2021/02/02 02:10 (external edit)