...
Test URL | https://aimdev.uconn.edu/api/index?key=[API KEY]&method=LOC_UPDATES&days=7&format=json |
Stage URL | https://aimtest.uconn.edu/api/index?key=[API KEY]&method=LOC_UPDATES&days=7&format=json |
Prod URL | https://aim.uconn.edu/api/index?key=[API KEY]&method=LOC_UPDATES&days=7&format=json |
The Aim links are included in the Batch Properties file on the AEWEB server. The days= parameter can be adjusted to capture data for a longer period of time or for a lesser period of time. It is currently set at 7 days.
Aim Web Service Documentation
...
SH_Room_T | java field | Aim field | Description |
---|---|---|---|
CAMPUS_CD | campusCode | CAMPUS_ID | |
BLDG_CD | buildingCode | BLDG | |
BLDG_ROOM_NBR | buildingRoomNumber | ROOM | |
OBJ_ID | objectID | if new room, create new OBJ_ID | |
VER_NBR | versioNumber | if new room, set version number to 1 | |
BLDG_ROOM_TYPE | buildingRoomType | LOC_TYPEDEPT_DESCRIPTION | |
BLDG_ROOM_DEPT | buildingRoomDepartment | LOC_ORG_DESCRIPTION | |
BLDG_ROOM_DESC | buildingRoomDescription | LOC_DEPTTYPE_DESCRIPTION | |
ROW_ACTV_IND | activeIndicator | LOC_STATUS | when Aim is "DISPOSED", set KFS to "N", otherwise set to "Y" |
...
- When the room does not exist in KFS, create an object id in KFS using java.util.UUID.randomUUID().toString() and set the version number to 1.
- When the room status in Aim is “DISPOSED”, the set the active indicator in KFS to “N”, otherwise set it to “Y”.
- Truncate campus code, room type, and room dept so that it matches the length in KFS (to prevent a SQL error).
- When the room exists in KFS, just update the row with the supplied data, otherwise insert a new row using the supplied data.
- Create a formatted report file to list all transactions. The first line of the file is contains the process date and report title, the second line contains the column headings, and the last line of the file is “***End of Report ***”.
- Send an email to inventorycontrol@uconn.edu with the input JSON in the body and the formatted report as an attachment.
- If there are SQL errors, capture and print the error.
Location and name of the report file
...
Control-M Schedule and Job
UAT | UAT_AEWEB_AIM_SCHEDULE_1 | UAT_AEWEB_FROM_AIM_ROOM |
PRD | PRD_AEWEB_AIM_SCHEDULE_1 | PRD_AEWEB_FROM_AIM_ROOM |
The UAT job is manually loaded and run. The production job is scheduled to run every Friday evening. If this job is to be moved, the days= parameter in the batch properties files may need to be adjusted.