Filtering
The followings are the different types of filtering query:
- Simple: Filtering data by exact match to the specified parameter value.
- Range: Filtering data by a range according to the parameter value, e.g. start date on or after the specified date.
- Regular Expression: Filtering data by a regular expression that matched the pattern give in the parameter value.
- Text Search: Filtering data by a text search of the parameter value on the content of the field.
To know the type of filter available, please refer to the “Filter Types” field in related API Reference – GET operation documentation.
Examples
Simple:
Request
https://api.data.um.edu.mo/service/academic/courses/v1.0.0/all?course_code=LAWS4016
Response
{ "_embedded": [ {"_id":"5bba909ec95d94eef58bfa5a","courseCode":"LAWS4016","sem":1,"year":2018,"sections":[{"sectionCode":"301","instructors":[{"salutation":"Prof.","name":"LI ZHE"}],"schedules":[{"day":5,"componentType":"L","timeFrom":"10:00:00","timeTo":"12:45:00","room1":"E32-G020"}]}],"courseTitleEng":"RESEARCH AND INTERNSHIP","courseTitleChi":"研究與實踐"}] , "_returned": 1 }
Range:
Request
https://api.data.um.edu.mo/service/facilities/access_control_records/v1.0.0/all?access_date_from=2018-08-25T08:00:00&access_date_to=2018-08-25T08:30:00
Response
{ "_embedded": [ {"_id":"5b80d4806f517c0f57acb06c","hashID":"87b82bfabe9a9a689646886acf9f29f4","doorID":"W12 New Turnstile L In ","accessDate":"2018-08-25T08:28:29+08:00","grantResult":"G"},{"_id":"5b80d4806f517c0f57acb06b","hashID":"87b82bfabe9a9a689646886acf9f29f4","doorID":"W12-0G-C04","accessDate":"2018-08-25T08:26:55+08:00","grantResult":"G"},{"_id":"5b80d4806f517c0f57acb06a","hashID":"880a5f1bda01b27f2d4b68501ce6b52d","doorID":"W12 New Turnstile L Out","accessDate":"2018-08-25T08:26:21+08:00","grantResult":"G"},{"_id":"5b80d4806f517c0f57acb069","hashID":"f403b4d72bcb594149db5d9e4ce4006e","doorID":"W12 New Turnstile L Out","accessDate":"2018-08-25T08:26:07+08:00","grantResult":"G"},{"_id":"5b80d4806f517c0f57acb068","hashID":"feef5bdf6f3668a75e530472789e1b29","doorID":"W12 New Turnstile L Out","accessDate":"2018-08-25T08:25:26+08:00","grantResult":"G"},{"_id":"5b80d4806f517c0f57acb067","hashID":"6926e64a42faf1a2cba83c8ef7288145","doorID":"W12 New Turnstile L Out","accessDate":"2018-08-25T08:20:26+08:00","grantResult":"G"},{"_id":"5b80d4806f517c0f57acb066","hashID":"87b82bfabe9a9a689646886acf9f29f4","doorID":"W12-0G-C04","accessDate":"2018-08-25T08:20:12+08:00","grantResult":"G"},{"_id":"5b80d4806f517c0f57acb065","hashID":"057fd80a971f396629720b518d1fcbae","doorID":"W12 New Turnstile L Out","accessDate":"2018-08-25T08:16:01+08:00","grantResult":"G"},{"_id":"5b80d4806f517c0f57acb064","hashID":"87b82bfabe9a9a689646886acf9f29f4","doorID":"W12-0G-C04","accessDate":"2018-08-25T08:13:36+08:00","grantResult":"G"},{"_id":"5b80d4806f517c0f57acb063","hashID":"9480783166dfb8b47d44ecf13bd8a876","doorID":"W12 New Turnstile L Out","accessDate":"2018-08-25T08:10:56+08:00","grantResult":"G"},{"_id":"5b80d4806f517c0f57acb062","hashID":"c1fa2cc5d26ada60e76815eac4203cc7","doorID":"W12 New Turnstile L Out","accessDate":"2018-08-25T08:09:36+08:00","grantResult":"G"}] , "_returned": 11 }
Regular Expression:
Request
https://api.data.um.edu.mo/service/student/student_job_vacancies/v1.0.0/all?job_nature_eng=art
Response
{ "_embedded": [ { "_id": "5bbb2ac4daa2787d090fb434", "postOffered": "影片剪接師", "typeOfJob": "F", "deadline": "2018-12-31T00:00:00+08:00", "companyNameEng": "Salon Multimedia Macau Limited", "companyNameChin": "沙龍(澳門)多媒體有限公司", "recruitLocalStudent": "1", "postStartDate": "2018-07-24T00:00:00+08:00", "postEndDate": "2018-09-24T00:00:00+08:00", "jobNatureEng": "Art / Design / Freelance", "jobNatureChin": "藝術 / 設計及自由創作", "jobDescription": "<p>\r\n\t-擅長Adobe Premiere及Final Cut Pro等剪接軟體;</p>\r\n<p>\r\n\t-對After Effects、Photoshop、AI較熟悉;</p>\r\n<p>\r\n\t-能獨立完成Motion Graphic影片;</p>\r\n<p>\r\n\t-會3D軟件優先。</p>\r\n<p>\r\n\t-歡迎應屆大學畢業生應徵此職位。</p>\r\n<p>\r\n\t-如有作品,請隨同郵件寄送。</p>\r\n<p>\r\n\t-持有澳門身份證。</p>\r\n<p>\r\n\t-CV內容需包括個人近照、基本個人資料(出生日期)、過往經驗、相關作品資料等。</p>\r\n<p>\r\n\t </p>\r\n", "noOfVacancies": "1", "salary": "面議", "workLocation": "澳門 ; Macau", "commencement": "面議", "contactPerson": "Salon Macao", "contactTelNo": "28716333", "contactFax": "28716338", "contactEmail": "info@salonmacao.com", "contactMail": "Avenida do Almirante Magalhães Correia No°41, Ind. Keck Seng W3, Macau", "targetAudience": [ { "facultyNameEng": "All Degrees", "facultyNameChin": "任何程度", "degreeEng": "All Faculties", "degreeChin": "任何學院", "majorEng": "All Majors", "majorChin": "任何主修" } ], "submission": [ { "nameEng": "Resume", "nameChin": "履歷表" }, { "nameEng": "Other attachment 1 (Please specify)", "nameChin": "其他附件一 (請列明)", "details": "相關作品" }, { "nameEng": "Other attachment 2 (Please specify)", "nameChin": "其他附件二 (請列明)", "details": "個人近照" } ] }] , "_returned": 1 }"