Access Keys:
Skip to content (Access Key - 0)

MIT Subject Management API

Please note that this page and related pages are being developed as part of the CIM Courses Project and are subject to change.

This page is intended to specify the needs and validations of the mit-subjects API. This API is the single gateway to create and edit MIT subjects and was developed as part of the CIM Courses Project.

# Data Element Grouping Required Validation Notes    
  Subject Code Subject Yes Must be a valid value in STVSUBJ -    
  Subject Number Subject Yes Must be in regular expression format:
[A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9]
[A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9]
Must be alphanumeric, 1 to 3 or 4 characters.  3 if subj_code is 3 characters otherwise 4.
-Expects uppercase values and numbers
-Currently only check subject number not exceeding 4 characters long
   
  Subject Key
(Subject Code + Number)
Subject N/A -Checks if identical Subject Key exists in table 
SUBJ_TMPL_REG_INSTANCE
- if identical subject key exists in SUBJ_TMPL_REG_INSTANCE, API will return error if SUBJECT_CONTAINER.last_active_term of the retrieved subject is null or later than the template effective from term
Listed as separate data element for validation purposes only
#work - impacted by (de/re)activation?
   
  (Subject Type + Code) Subject Yes If subject type is cross reg, STVDEPT.STVDEPT_COLL_CODE of the dept associated with the subject code must equal to Z      
  Subject Type Subject Yes Must be in approved list of values List of values listed in Business Rules KB article    
  Effective From Term Subject Yes -Must be a valid term in SGBGP_TERM
-Must be less than or equal to the Effective Thru Term
-Must not overlap with other records in SUBJECT_TEMPLATE
-    
  Effective Thru Term Subject Yes -Must be a valid term in SGBGP_TERM
-Must be greater than or equal to Effective From Term
-Must not overlap with other records in SUBJECT_TEMPLATE
-    
  Subject Title Subject Yes Cannot be longer than 255 characters #work - special character handling?    
  Transcript Title Subject Yes -Cannot be longer than 30 characters
-Must be equal or shorter than Subject Title
-    
  Department Code Subject Yes* -Must be a valid value in STVDEPT
-Must match mapping in STVSUBJ 

*If Subject Type is "Cross Registration", Department must be empty
-    
  Status Subject   -Must be equal to one of the following:
Active, Inactive, Cancelled
Hardcoded values    
  Unit Type Units Yes Database field is variable_units - must be "Y" or "N" -    
  Fixed Units - Lecture Units Yes* -Must be not be greater than zero if variable_units = "Y"
-Must be in range of  [0-99] if variable_units = "N"
*Required if variable_units = "N"
-    
  Fixed Units - Laboratory Units Yes* -Must be not be greater than zero if variable_units = "Y"
-Must be in range of  [0-99] if variable_units = "N"
*Required if variable_units = "N"
-    
  Fixed Units - Preparation Units Yes* -Must be not be greater than zero if variable_units = "Y"
-Must be in range of  [0-99] if variable_units = "N"
*Required if variable_units = "N"
-    
  Credit Limit Units Yes* -Must be not be greater than zero if variable_units = "Y" 
-Must be in range of [0-99] if variable_units = "N"
*Required if variable_units = "N"
-    
  Total Units Units Yes* Auto-calculated to be the sum of Lecture, Laboratory, and Preparation units if subject is a fixed-units subject -Must be not be greater than zero if variable_units = "Y" 
-Must be in range of  [0-99] if variable_units = "N"
*Required if variable_units = "N"
-  
  Subject Level Level Yes -Must be "U" or "G" validating against table SATURN.STVLEVL    
  Attribute Code Attributes No -Attribute Code must match a value in STVATTR 
-Need to have at least 1 cross-listed subject if SWE attribute is entered 
-Attribute SUPR must be included if attribute THES or attribute UROP is present  
-URN Attribute must be entered if subject number = URN
Old attributes can be saved - STVATTR has no field to flag a field as old or out of use    
  Enrollment Limitation Enrollment Limitations No   #work - special character check?
#work - max chars?
#work - additional validation?
   
  Grading Scheme Grading Yes -Must have at least one entry
-Must be an entry where Grading Type = "D"
-    
  Grading Mode Grading Yes Must match a valid value in STVGMOD -    
  Grading Type Grading Yes -Must match a valid value in STVGM_TYP
-Must be a valid type allowed for the Grading Mode entered
-If FSEM attribute is present, must be a valid type for the Grading Mode - GMOD_TYPE_FRESHMAN_IND
-Certain Grading Types can only appear once in the Grading Scheme
-    
  Cross-listed Collaborative Indicator Cross-listed No   -Currently will default to false if cross-listed subject key is present and the corresponding collaborative indicator is null or empty space
-Currently will be set as false if the input value is not 'Y' or 'N' or true or false
   
  Cross-listed Subject Code Cross-listed No Must be a valid value in STVSUBJ -    
  Cross-listed Subject Number Cross-listed No -Must be in regular expression format [A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9]
-Must prefixed with 8, 3, or 1 respectively for FAS, ISP and PXL departments' special (SP) subjects
-    
  Cross-listed
Subject Key
Cross-listed No -Subject Key must not already exist in SUBJECT_TMPL_REG_INSTANCE for a different container
-Subject key must not equal to the main subject key
     
  Equivalent Subject Key Equivalent No -Subject Key(container id) must exists in SUBJECT_CONTAINER
-Must not equal to the edited subject
     
  Equivalent Effective From Term Equivalent No -Must be earlier than the equivalent effective thru term
-Must not be earlier than the effective from term of the earliest template of the edited subject
-Must not be earlier than the effective from term of the earliest template of the equivalent subject
     
  Equivalent Effective Thru Term Equivalent No -Must be later than the equivalent effective from term      
  Equivalent Effective Terms Equivalent No -If a equivalent subject has more than one set of equivalent effective terms, they must not overlap with each other        
  Scheduling Relationship Subject Key Scheduling Relation No -Subject Key(container id) must exists in SUBJECT_CONTAINER
-Must not equal to the edited subject
     
  Scheduling Relationship Type Code Scheduling Relation No -Must be equal to one of the following: SR      
  Scheduling Relationship Effective From Term Scheduling Relation No -Must be earlier than the scheduling relationship effective thru term
-Must not be earlier than the effective from term of the earliest template of the edited subject
-Must not be earlier than the effective from term of the earliest template of the scheduling relationship(SR) subject
-If the edited subject is inactive, must not be later than the last active term of the edited subject
-If the scheduling relationship(SR) subject is inactive, must not be later than the last active term of the SR subject
     
  Scheduling Relationship Effective Thru Term Scheduling Relation No -Must be later than the scheduling relationship effective from term
-Must not be later than the effective thru term of the last template of the edited subject
-Must not be later than the effective thru term of the last template of the scheduling relationship(SR) subject
-If the edited subject is inactive, must not be later than the last active term of the edited subject
-If the scheduling relationship(SR) subject is inactive, must not be later than the last active term of the SR subject
     
  Scheduling Relationship Effective Terms Scheduling Relation No -If a Scheduling Relation subject has more than one set of scheduling relation effective terms, they must not overlap with each other        
  Term Plan Offered Terms Term Plan Yes -One of the followings must have the value set as Y: isOfferedFall, isOfferedIAP, isOfferedSpring, isOfferedSpring      
  Term Plan Frequency Term Plan Yes -Must not be empty for Standard Subjects
- Valid values for frequency are: EVERY,IRREG,ODD,EVEN,RESUME_ANNUAL_ODD,RESUME_ANNUAL_EVEN
     
  Term Plan Duration Term Plan Yes -Must not be empty for Standard Subjects
- Valid values for duration are: H1,P,F,H2
     
  Term Plan Duration First Week Term Plan No -Required only if duration equals to P(artial)
- Must be greater than 0 and less than the value of Term Plan Duration Last Week
     
  Term Plan Duration Last Week Term Plan No -Required only if duration equals to P(artial)
- Must be greater than 0 and greater than the value of Term Plan Duration Last First
     
  Display Control Term Type Display Control Yes        
  Display Control Subject Url Display Control No        
  Display Control onlineSubjectListingFacultySource Display Control Yes        
  Display Control onlineSubjectListingFacultyDisplayValue Display Control No        
  catalogFaculty Display Control No        
  catalogFacultyPreface Subject No        
  rollFacultyIndicator Subject No        
  ugDegreeAudit labUnits Attribute No        
  additionalListingContent Freshman Seminar No        
  gradableScheduleType Grading No        
               
               
               
               
               
               
               
               
               
               
               
               
               

Other API Error Handling

-If the API gets a THES attribute without a SUPR attribute, the API will throw an error
-If the API gets a UROP attribute without a SUPR attribute, the API will throw an error
-If the API gets an SWE attribute on a subject that has no child cross-listed subject numbers, the API will throw an error
-If the API gets a subject with a "URN" subject number and a UROP attribute but no "URN" attribute, the API will throw an error

Subject Management Documentation Index

The Subject Management Documentation Index is the central listing for documentation pertaining to Subject Management.

IS&T Contributions

Documentation and information provided by IS&T staff members


Last Modified:

December 04, 2018

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
Feedback
This product/service is:
Easy to use
Average
Difficult to use

This article is:
Helpful
Inaccurate
Obsolete
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki