DRAFT DRAFT DRAFT

MIT Information Technology
MIT ID Database V2.0 API

mitid@mit.edu
(http://web.mit.edu/mitid/www/v2)
Last modified: April 6, 1998

MIT ID Database V2.0 API

 

1.0 to 2.0 API Migration

Version 1.0 API
Version 2.0 API
2.0 API Description
createContext  
initializePeople
MITID_StartUp This function will initialize and return a reference to an MITID_OBJECT which will in turn be the first argument for most other API calls. 
debugOn  
debugOff
MITID_SetInfo This generic routine will enable applications to customize settings within the MITID_OBJECT such as  the following: DEBUG_MODE, HOST_NAME, PORT_ID, QUERY_OPTIONS.
NA MITID_GetInfo This generic routine will enable applications to retrieve the settings set with MITID_SetInfo.
pkrb_mk_req MITID_IsAuthenticated This routine will determine if the user is currently authenticated. This includes checking Kerberos ticket validity. (May incorporate into MITID_StartUp)
NA MITID_SetSearchCriteria Sets the value of a specified search field within the MITID_OBJECT. Search fields include the following: FIRST_NAME, MIDDLE_NAME, LAST_NAME, SSN, DOB. Error checking will include field length checks.
NA MITID_GetSearchCriteria Gets the current search field value specified by MITID_SetSearchCriteria.
NA MITID_ClearSearchCriteria Clears all of the search criteria fields stored within the MITID_OBJECT. (NOTE this does only clears the search fields.)
searchPeople MITID_PerformSearch Using the information in the MITID_OBJECT, this function will send the search criteria to the server application and when complete, the MITID_OBJECT will include the results. The return value will indicate whether an EXACT_MATCH, NO_MATCH or POSSIBLE_MATCH was found. NOTE: Exact match implies that only one record was found and that the matching algorithm determine that this record did match the search criteria. NO_MATCH indicates no records were found. POSSIBLE_MATCH implies that one or more records were found where each record was either an exact match or a possible match as determined by the algorithm. An effort will be made to minimize the cases where multiple exact matches are returned however there are two cases where we expect to find this. The first case is when the initial search criteria is incomplete, this can be avoided by providing as much of the criteria as possible. The second case is when multiple departments assign MIT ID to the same individual. An administrate mechanism will be provided to omit these multiple records from appearing in the results list. See Server and and Database Changes for more details on handling multiple records. See the  MITID_GetResultField function for more details on Record Results. 
howManyPeople MITID_GetResultCount Determine the number of results retrieved by the last call to MITID_PerformSearch.
getPersonInfo MITID_GetResultRecord Enable applications to loop through the results by specifying one of the following (FIRST, NEXT, NUMBER). FIRST will return a reference to the the first record in the results and set an internal current record indicator to the first record. NEXT will move the current record indicator and return a reference to the next record (if available). For any other numeric value the function will attempt to return a reference to a record and set the current record indicator appropriately. 
getPersonMITID  
getPersonName  
getPersonType
MITID_GetResultField This function will take a field name as an argument in addition to a record reference and return that field value for the given record. Valid field name options will include the MITID, NAME, and TYPE as with V1.0 however an additional field (RECORD_RESULT) will enable the client application to determine if the record exactly matched the search criteria. NOTE: It is possible to have more than one EXACT match record depending on the search criteria and upon the data so this should not be used to draw conclusions about the entire search result set; the return value from the MITID_PerformSearch function serves that purpose.
NA MITID_ClearAssignCriteria Clear the contents of the Assignment fields in the MITID_OBJECT.
NA MITID_SetAssignCriteria Set a value for an assignment  field in the MITID_OBJECT. 
assignMITID MITID_AssignID Get a new MITID.
getMessage MITID_GetErrorMsg Convert an MITID_ERROR code into readable text string.
_WEP NA This function will become obsolete.
destroyContext  
destroyPeople
MITID_CleanUp Destroys the MITID_OBJECT and frees any associated dynamic memory.