├── LICENSE.md ├── README.md ├── activity-service └── v1 │ ├── activities.md │ ├── announces.md │ └── clubs.md ├── bus-service └── v1 │ ├── providers.md │ └── routes │ ├── buses.md │ ├── estimate_times.md │ ├── routes.md │ └── stops.md ├── calendar-service └── v1 │ ├── categories.md │ ├── event │ ├── README.md │ ├── delete.md │ ├── get.md │ ├── post.md │ └── put.md │ └── events.md ├── course-service └── v1 │ ├── course │ ├── course.md │ ├── limit.md │ └── search.md │ ├── search │ ├── departments_courses.md │ ├── departments_targets.md │ ├── summer.md │ └── target.md │ ├── status.md │ ├── student │ ├── rejected.md │ ├── selected.md │ └── tracking.md │ └── unit │ ├── college.md │ └── college_department.md ├── location-service └── v1 │ ├── buildings.md │ ├── faculties.md │ ├── places.md │ ├── search.md │ └── units.md ├── oauth-service ├── README.md ├── access_token.md ├── authorization_code.md ├── refresh_token.md └── scope.md └── personnel-service └── v1 ├── cards.md └── info.md /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) [2015] [Computer Center, National Central University] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # API-Documentation 2 | Documentation for National Central University API 3 | 4 | ## Root URL 5 | ``` 6 | https://api.cc.ncu.edu.tw 7 | ``` 8 | 9 | ## Authorization 10 | 11 | Before you making any API calls, you have to register a client at [OAuth Management] first. 12 | There are two situations to use our API: 13 | 14 | - Access resources that contains personal information : 15 | 1. Follow the **OAuth 2.0** protocol to get an **access token**, see [documentation](oauth-service/README.md). 16 | 2. Read the [documentation](oauth-service/README.md) to use **access token**. 17 | - Access resources without personal information : 18 | 1. Get an **api token** from [OAuth Management]. 19 | 2. Read the [documentation](oauth-service/README.md) to use **api token**. 20 | 21 | ## Internationalization 22 | Some NCU APIs are bilingual(zh-TW, en-US) and default to zh-TW. Use **Accept-Language** header to specify your language. 23 | 24 | ## Encoding 25 | All strings are encoded in UTF-8. 26 | 27 | ## Endpoints 28 | 29 | ##### [Activity-Service] 30 | > /activity/v1 31 | - [/activities](activity-service/v1/activities.md) 32 | - [/announces](activity-service/v1/announces.md) 33 | - [/clubs](activity-service/v1/clubs.md) 34 | 35 | ##### [Location-Service] 36 | > /location/v1 37 | - [/search](location-service/v1/search.md) 38 | - [/places](location-service/v1/places.md) 39 | - [/units](location-service/v1/units.md) 40 | - [/faculties](location-service/v1/faculties.md) 41 | - [/buildings](location-service/v1/buildings.md) 42 | 43 | ##### [Course-Service] 44 | > /course/v1 45 | - [/status](course-service/v1/status.md) 46 | - [/colleges](course-service/v1/unit/college.md) 47 | - [/colleges/{collegeId}/departments](course-service/v1/unit/college_department.md) 48 | - [/departments/{departmentId}/targets](course-service/v1/search/departments_targets.md) 49 | - [/departments/{departmentId}](course-service/v1/search/departments_courses.md) 50 | - [/courses/{serialNo}](course-service/v1/course/course.md) 51 | - [/courses/{serialNo}/limit](course-service/v1/course/limit.md) 52 | - [/courses](course-service/v1/course/search.md) 53 | - [/targets/{targetId}/courses](course-service/v1/search/target.md) 54 | - [/summer/{stage}/courses](course-service/v1/search/summer.md) 55 | - [/student/selected](course-service/v1/student/selected.md) 56 | - [/student/rejected](course-service/v1/student/rejected.md) 57 | - [/student/tracking](course-service/v1/student/tracking.md) 58 | 59 | ##### [Personnel-Service] 60 | > /personnel/v1 61 | - [/cards/{cardNumber}](personnel-service/v1/cards.md) 62 | - [/info](personnel-service/v1/info.md) 63 | 64 | ##### [Calendar-Service] 65 | > /calendar/v1 66 | - [/categories](calendar-service/v1/categories.md) 67 | - [/event](calendar-service/v1/event/) 68 | - [/events](calendar-service/v1/events.md) 69 | 70 | ##### [Bus-Service] 71 | > /bus/v1 72 | - [/routes/{routeId}/estimate_times](bus-service/v1/routes/estimate_times.md) 73 | 74 | ## Error Status Code 75 | 76 | HTTP Status Code | Description 77 | ---------------- | ----------------- 78 | 400 | invalid body or parameter. 79 | 401 | access a protected resource with an invalid token. 80 | 403 | access a protected resource with an token from invalid client. 81 | 404 | resource not found. 82 | 405 | invalid request method 83 | 500 | internal server error. 84 | 85 | ## Problems? 86 | If you have any problems, please file a issue or just send us pull requests. 87 | Any pull requests submitted to master branch are not allowed, please submit to **develop** branch. 88 | It would be appreciated that with brief descriptions and some unit tests to proof. 89 | 90 | ## Format Reference 91 | The format of this document refer to [Documentation for University of Waterloo API](https://github.com/uWaterloo/api-documentation). 92 | 93 | ## License 94 | MIT License Copyright © 2015-2015 Computer Center, National Central University 95 | 96 | [OAuth Management]:https://api.cc.ncu.edu.tw/manage 97 | [Activity-Service]:https://github.com/NCU-CC/Activity-Service 98 | [Personnel-Service]:https://github.com/NCU-CC/Personnel-Service 99 | [Location-Service]:https://github.com/NCU-CC/Location-Service 100 | [Course-Service]:https://github.com/NCU-CC/Course-Service 101 | [Calendar-Service]:https://github.com/NCU-CC/Calendar-Service 102 | [Bus-Service]:https://github.com/NCU-CC/Bus-Service 103 | -------------------------------------------------------------------------------- /activity-service/v1/activities.md: -------------------------------------------------------------------------------- 1 | # Find Activities 2 | 3 | ``` 4 | GET /activities 5 | ``` 6 | 7 | ## Description 8 | > Find the latest activities 9 | 10 | # Request 11 | 12 | ## Headers 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
NameRequiredDescription
X-NCU-API-TOKENyesyour API token
25 | ## Query Parameters 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
NameRequiredDescription
sizenofetch size, 1 ~ 40, default to 20
38 | 39 | ## Example 40 | 41 | ``` 42 | GET /activities?size=3 43 | ``` 44 | 45 | # Response 46 | 47 | ## Formats 48 | - json 49 | 50 | ## Structure 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
Field NameTypeValue Description
nameStringactivity name
clubStringactivity sponsor
placeStringactivity place
contentStringactivity content
startStringactivity start time
endStringactivity end time
88 | 89 | ## Example 90 | ```json 91 | [ 92 | { 93 | "name":"電機營輔訓", 94 | "club":"電機系學會", 95 | "place":"志道樓 - 一樓大活動室", 96 | "content":"試跑電機營第一天活動內容", 97 | "start":"2015-05-01 16:00", 98 | "end":"2015-05-01 22:00" 99 | }, 100 | { 101 | "name":"成果展", 102 | "club":"手語社", 103 | "place":"志道樓 - 二樓小活動室", 104 | "content":"練習", 105 | "start":"2015-05-01 20:00", 106 | "end":"2015-05-01 22:00" 107 | }, 108 | { 109 | "name":"中友週傳情", 110 | "club":"台中南投地區校友會", 111 | "place":"志道樓 - 擺攤宣傳區 66大順", 112 | "content":"舉辦傳情活動,藉由傳情的溫馨活動讓同學們可以傳達心意並且介紹台中美食,以增加社團之特色。", 113 | "start":"2015-05-01 12:00", 114 | "end":"2015-05-01 21:00" 115 | } 116 | ] 117 | ``` 118 | -------------------------------------------------------------------------------- /activity-service/v1/announces.md: -------------------------------------------------------------------------------- 1 | # Find Announces 2 | 3 | ``` 4 | GET /announces 5 | ``` 6 | 7 | ## Description 8 | > Find announces by condition 9 | 10 | # Request 11 | 12 | ## Headers 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
NameRequiredDescription
X-NCU-API-TOKENyesyour API token
25 | ## Query Parameters 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 |
NameRequiredDescription
sizenofetch size, 1 ~ 40, default to 20
typeyesannounce type
older_thannoquery announces older than specified id
newer_thannoquery announces newer than specified id
53 | 54 | if **older_than** and **newer_than** are presented at same time, only **older_than** is considered 55 | 56 | ## Announce Type 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |
typedescription
common一般公告
group組務公告
72 | 73 | ## Example 74 | 75 | ``` 76 | GET /announces?size=2&type=common ( latest announces with common type ) 77 | ``` 78 | 79 | ``` 80 | GET /announces?size=2&type=group&older_than=10 ( group announces older than the announce whose id = 10 ) 81 | ``` 82 | 83 | # Response 84 | 85 | ## Formats 86 | - json 87 | 88 | ## Structure 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 |
Field NameTypeValue Description
idIntegerannounce id
titleStringannounce title
contentStringannounce content
timeStringannounce created time
attachmentStringannounce attachement url
121 | 122 | ## Example 123 | ```json 124 | [ 125 | { 126 | "id":1, 127 | "title":"變形金剛-舞台車車體視覺設計競圖大賽", 128 | "content":"內容", 129 | "time":"2015-05-01 15:42", 130 | "attachment": "http://www.api.com/file/file1.txt" 131 | }, 132 | { 133 | "id":2, 134 | "title":"2015德明盃3D超商全國經營管理", 135 | "content":"內容", 136 | "time":"2015-05-01 15:28", 137 | "attachment":null 138 | } 139 | ] 140 | ``` 141 | 142 | ```json 143 | [[ 144 | { 145 | "id":9, 146 | "title":"百年校慶創意市集攤位招募中", 147 | "content":"內容", 148 | "time":"2015-04-28 16:13", 149 | "attachment":null 150 | }, 151 | { 152 | "id":6, 153 | "title":"103-2社團指導老師「授課費用」核定結果", 154 | "content":"內容", 155 | "time":"2015-04-09 14:19", 156 | "attachment":null 157 | } 158 | ]] 159 | ``` 160 | -------------------------------------------------------------------------------- /activity-service/v1/clubs.md: -------------------------------------------------------------------------------- 1 | # Find Clubs 2 | 3 | ``` 4 | GET /clubs 5 | ``` 6 | 7 | ## Description 8 | > Find all clubs 9 | 10 | # Request 11 | 12 | ## Headers 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
NameRequiredDescription
X-NCU-API-TOKENyesyour API token
25 | 26 | ## Example 27 | 28 | ``` 29 | GET /clubs 30 | ``` 31 | 32 | # Response 33 | 34 | ## Formats 35 | - json 36 | 37 | ## Structure 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
Field NameTypeValue Description
nameStringclub name
descriptionStringclub description
placeStringclub working place
websiteStringclub website
65 | 66 | ## Example 67 | ```json 68 | [ 69 | { 70 | "name":"國文系學會", 71 | "description":"描述", 72 | "place":"國文系館", 73 | "website":"http://www.example.com" 74 | }, 75 | { 76 | "name":"英文系學會", 77 | "description":"描述", 78 | "place":"英文系館", 79 | "website":"http://www.example.com" 80 | } 81 | ] 82 | ``` 83 | -------------------------------------------------------------------------------- /bus-service/v1/providers.md: -------------------------------------------------------------------------------- 1 | # Get Providers of Bus 2 | 3 | ``` 4 | GET /providers 5 | ``` 6 | 7 | ## Description 8 | > Get all providers of bus 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesYour API token
24 | 25 | ## Example 26 | ``` 27 | GET /providers 28 | ``` 29 | 30 | # Response 31 | 32 | ## Formats 33 | - json 34 | 35 | ## Example 36 | ```json 37 | { 38 | "BusDynInfo": { 39 | "EssentialInfo": { 40 | "CoordinateSystem": "", 41 | "UpdateTime": "2015-12-25 00:00:00", 42 | "Location": { 43 | "CenterName": "Maxwin", 44 | "name": "TYBUS" 45 | } 46 | }, 47 | "BusInfo": { 48 | "Provider": [ 49 | { 50 | "nameZh": "桃園客運", 51 | "ID": 1, 52 | "type": 0 53 | }, 54 | { 55 | "nameZh": "中壢客運", 56 | "ID": 2, 57 | "type": 0 58 | }, 59 | { 60 | "nameZh": "統聯客運", 61 | "ID": 4, 62 | "type": 0 63 | }, 64 | { 65 | "nameZh": "新竹客運", 66 | "ID": 5, 67 | "type": 0 68 | }, 69 | { 70 | "nameZh": "亞通客運", 71 | "ID": 6, 72 | "type": 0 73 | }, 74 | { 75 | "nameZh": "金台通運(免巴)", 76 | "ID": 8, 77 | "type": 2 78 | }, 79 | { 80 | "nameZh": "桃園客運(免巴)", 81 | "ID": 21, 82 | "type": 2 83 | }, 84 | { 85 | "nameZh": "亞通客運(免巴)", 86 | "ID": 22, 87 | "type": 2 88 | } 89 | ] 90 | } 91 | } 92 | } 93 | ``` -------------------------------------------------------------------------------- /bus-service/v1/routes/buses.md: -------------------------------------------------------------------------------- 1 | # Get Buses Info of Specific Route 2 | 3 | ``` 4 | GET /routes/{routeId}/buses 5 | ``` 6 | 7 | ## Description 8 | > Get buses info of specific route 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesYour API token
24 | 25 | ## Variables 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
NameDescription
routeIdspecific route id
36 | 37 | **※ routeId can only be one of 133 `(133)`, 3220 `(132)`, 3221 `(172)`, 3222 `(132_A)`** 38 | 39 | ## Example 40 | ``` 41 | GET /routes/3220/buses 42 | ``` 43 | 44 | # Response 45 | 46 | ## Formats 47 | - json 48 | 49 | ## Example 50 | ```json 51 | { 52 | "BusDynInfo": { 53 | "EssentialInfo": { 54 | "Location": { 55 | "CenterName": "", 56 | "CoordinateSystem": "", 57 | "name": "Maxwin", 58 | "UpdateTime": "2015-12-25 00:00:00" 59 | } 60 | }, 61 | "BusInfo": { 62 | "BusData": [ 63 | { 64 | "ProviderID": 1, 65 | "Speed": 0, 66 | "BusID": "585-FD_o", 67 | "ledstate": 0, 68 | "Latitude": 24.940469, 69 | "DataTime": "2015-12-30 13:44:45", 70 | "RouteID": 3220, 71 | "GoBack": 2, 72 | "Longitude": 121.223892, 73 | "sections": 1, 74 | "Azimuth": 352, 75 | "DutyStatus": 0, 76 | "BusStatus": 98 77 | } 78 | ] 79 | } 80 | } 81 | } 82 | ``` 83 | -------------------------------------------------------------------------------- /bus-service/v1/routes/estimate_times.md: -------------------------------------------------------------------------------- 1 | # Get Bus Estimate Times of Specific Route 2 | 3 | ``` 4 | GET /routes/{routeId}/estimate_times 5 | ``` 6 | 7 | ## Description 8 | > Get bus estimate times of specific route 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesYour API token
24 | 25 | ## Variables 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
NameDescription
routeIdspecific route id
36 | 37 | **※ routeId can only be one of 133 `(133)`, 3220 `(132)`, 3221 `(172)`, 3222 `(132_A)`** 38 | 39 | ## Example 40 | ``` 41 | GET /routes/3220/estimate_times 42 | ``` 43 | 44 | # Response 45 | 46 | ## Formats 47 | - json 48 | 49 | ## Example 50 | ```json 51 | { 52 | "BusDynInfo": { 53 | "EssentialInfo": { 54 | "Location": { 55 | "CenterName": "", 56 | "CoordinateSystem": "", 57 | "name": "Maxwin", 58 | "UpdateTime": "2015-12-25 00:00:00" 59 | } 60 | }, 61 | "BusInfo": { 62 | "Route": { 63 | "EstimateTime": [ 64 | { 65 | "StopName": "中壢公車站", 66 | "ests": "", 67 | "StopID": "0180", 68 | "seqNo": 1, 69 | "IVRNO": 180, 70 | "GoBack": 1, 71 | "comeTime": "14:30", 72 | "SID": 5642, 73 | "carId": "", 74 | "schId": "851336_1_20151230143000", 75 | "comeCarid": "", 76 | "Value": null, 77 | "EXTVoiceNo": "0578" 78 | }, 79 | { 80 | "StopName": "第一銀行", 81 | "ests": "", 82 | "StopID": "0565", 83 | "seqNo": 2, 84 | "IVRNO": 565, 85 | "GoBack": 1, 86 | "comeTime": "14:30", 87 | "SID": 1200, 88 | "carId": "", 89 | "schId": "851336_1_20151230143000", 90 | "comeCarid": "", 91 | "Value": null, 92 | "EXTVoiceNo": "0588" 93 | } 94 | ], 95 | "id": 3220 96 | } 97 | } 98 | } 99 | } 100 | ``` 101 | -------------------------------------------------------------------------------- /bus-service/v1/routes/routes.md: -------------------------------------------------------------------------------- 1 | # Get Routes of Bus 2 | 3 | ``` 4 | GET /routes 5 | ``` 6 | 7 | ## Description 8 | > Get all routes of bus 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesYour API token
24 | 25 | ## Example 26 | ``` 27 | GET /routes 28 | ``` 29 | 30 | # Response 31 | 32 | ## Formats 33 | - json 34 | 35 | ## Example 36 | ```json 37 | { 38 | "BusDynInfo": { 39 | "EssentialInfo": { 40 | "CoordinateSystem": "", 41 | "UpdateTime": "2015-12-25 00:00:00", 42 | "Location": { 43 | "CenterName": "Maxwin", 44 | "name": "TYBUS" 45 | } 46 | }, 47 | "BusInfo": { 48 | "Route": [ 49 | { 50 | "ProviderId": 1, 51 | "departureZh": "中壢", 52 | "gxcode": 3010, 53 | "RouteType": "RTY", 54 | "MasterRouteDesc": "RG", 55 | "ddesc": "中壢<->桃園", 56 | "nameZh": 1, 57 | "destinationZh": "桃園", 58 | "MasterRouteNo": "", 59 | "ID": 3010, 60 | "MasterRouteName": " " 61 | } 62 | ] 63 | } 64 | } 65 | } 66 | ``` -------------------------------------------------------------------------------- /bus-service/v1/routes/stops.md: -------------------------------------------------------------------------------- 1 | # Get Bus Stop Info of Specific Route 2 | 3 | ``` 4 | GET /routes/{routeId}/stops 5 | ``` 6 | 7 | ## Description 8 | > Get bus stop info of specific route 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesYour API token
24 | 25 | ## Variables 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
NameDescription
routeIdspecific route id
36 | 37 | **※ routeId can only be one of 133 `(133)`, 3220 `(132)`, 3221 `(172)`, 3222 `(132_A)`** 38 | 39 | ## Example 40 | ``` 41 | GET /routes/3220/stops 42 | ``` 43 | 44 | # Response 45 | 46 | ## Formats 47 | - json 48 | 49 | ## Example 50 | ```json 51 | { 52 | "BusDynInfo": { 53 | "EssentialInfo": { 54 | "CoordinateSystem": "", 55 | "UpdateTime": "2015-12-25 00:00:00", 56 | "Location": { 57 | "CenterName": "Maxwin", 58 | "name": "TYBUS" 59 | } 60 | }, 61 | "BusInfo": { 62 | "Stop": [ 63 | { 64 | "routeId": 3220, 65 | "districtId": 1, 66 | "seqNo": 1, 67 | "nameZh": "中壢公車站", 68 | "latitude": 24.953233, 69 | "pgp": 0, 70 | "Id": "0578", 71 | "terminal": 0, 72 | "GoBack": 1, 73 | "EXTVoiceNO": 578, 74 | "longitude": 121.224153, 75 | "SID": 5642 76 | }, 77 | { 78 | "routeId": 3220, 79 | "districtId": 1, 80 | "seqNo": 2, 81 | "nameZh": "第一銀行", 82 | "latitude": "24.955120", 83 | "pgp": 0, 84 | "Id": "0588", 85 | "terminal": 0, 86 | "GoBack": 1, 87 | "EXTVoiceNO": 588, 88 | "longitude": 121.222093, 89 | "SID": 1200 90 | } 91 | ] 92 | } 93 | } 94 | } 95 | ``` 96 | -------------------------------------------------------------------------------- /calendar-service/v1/categories.md: -------------------------------------------------------------------------------- 1 | # Get Categories 2 | 3 | ``` 4 | GET /categories 5 | ``` 6 | 7 | ## Description 8 | > Return categories. 9 | 10 | # Request 11 | 12 | ## Headers 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
NameRequiredDescription
AuthorizationyesBearer token
25 | 26 | ## Example 27 | 28 | ``` 29 | GET /categories 30 | ``` 31 | 32 | # Response 33 | 34 | ## Formats 35 | - json 36 | 37 | ## Structure 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 |
Field NameTypeValue Description
categoriesarrayA list of Category.
50 | 51 | ### Category 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
Field NameTypeValue Description
idintegerCategory identifier.
namestringName of category.
calendar_idstringCalendar identifier of Google Calendar.
addiblebooleanWhether this category is addible.
79 | 80 | ## Example 81 | ```json 82 | { 83 | "categories": [ 84 | { 85 | "id": 1, 86 | "name": "校曆", 87 | "calendar_id": "vul4xu4@group.calendar.google.com", 88 | "addible": false 89 | }, 90 | { 91 | "id": 2, 92 | "name": "教職員", 93 | "calendar_id": "rul456m06@group.calendar.google.com", 94 | "addible": true 95 | }, 96 | { 97 | "id": 3, 98 | "name": "學生", 99 | "calendar_id": "vm6g@group.calendar.google.com", 100 | "addible": true 101 | } 102 | ] 103 | } 104 | ``` 105 | -------------------------------------------------------------------------------- /calendar-service/v1/event/README.md: -------------------------------------------------------------------------------- 1 | # Operations about event 2 | - [POST /event](post.md) 3 | - [GET /event](get.md) 4 | - [PUT /event](put.md) 5 | - [DELETE /event](delete.md) 6 | 7 | # Structure 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
Field NameTypeValue Description
idstringEvent identifier.
created_atstringCreation time of the event.
update_atstringLast modification time of the event.
summarystringTitle of the event.
descriptionstringDescription of the event.
locationstringGeographic location of the event.
categorystringCategory of the event.
startstringThe start time of the event.
endstringThe end time of the event.
linkstringURL link of the event.
65 | 66 | # Example 67 | ```json 68 | { 69 | "id": "5o4510qqjm3ccjd4k7i0fu15so", 70 | "created_at": "2015-11-03T07:13:41.230+08:00", 71 | "updated_at": "2015-11-03T07:13:41.230+08:00", 72 | "summary": "Test Summary", 73 | "description": "Test Description", 74 | "location": "Test Location", 75 | "category": "學生", 76 | "start": "2016-01-01T08:00:00.000+08:00", 77 | "end": "2016-01-01T09:00:00.000+08:00", 78 | "link": "http://example.com" 79 | } 80 | ``` 81 | -------------------------------------------------------------------------------- /calendar-service/v1/event/delete.md: -------------------------------------------------------------------------------- 1 | # Delete Event 2 | 3 | ``` 4 | DELETE /event 5 | ``` 6 | 7 | ## Description 8 | > Deletes an event. 9 | 10 | ## Required Scope 11 | - calendar.event.write 12 | 13 | # Request 14 | 15 | ## Headers 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
NameRequiredDescription
AuthorizationyesBearer token.
28 | 29 | ## Query Parameters 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
NameRequiredDescriptionData Type
idyesEvent identifier.string
45 | 46 | ## Example 47 | ``` 48 | DELETE /event?id=5o4510qqjm3ccjd4k7i0fu15so 49 | ``` 50 | 51 | # Response 52 | 53 | ## Formats 54 | - json 55 | 56 | ## Structure 57 | [Event Objects](README.md#structure) 58 | 59 | ## Example 60 | [Event Example](README.md#example) 61 | -------------------------------------------------------------------------------- /calendar-service/v1/event/get.md: -------------------------------------------------------------------------------- 1 | # Read Event 2 | 3 | ``` 4 | Get /event 5 | ``` 6 | 7 | ## Description 8 | > Returns an event. 9 | 10 | ## Required Scope 11 | - calendar.event.read 12 | 13 | # Request 14 | 15 | ## Headers 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
NameRequiredDescription
AuthorizationyesBearer token.
28 | 29 | ## Query Parameters 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
NameRequiredDescriptionData Type
idyesEvent identifier.string
45 | 46 | ## Example 47 | ``` 48 | GET /event?id=5o4510qqjm3ccjd4k7i0fu15so 49 | ``` 50 | 51 | # Response 52 | 53 | ## Formats 54 | - json 55 | 56 | ## Structure 57 | [Event Objects](README.md#structure) 58 | 59 | ## Example 60 | [Event Example](README.md#example) 61 | -------------------------------------------------------------------------------- /calendar-service/v1/event/post.md: -------------------------------------------------------------------------------- 1 | # Create Event 2 | 3 | ``` 4 | POST /event 5 | ``` 6 | 7 | ## Description 8 | > Creates an event. 9 | 10 | ## Required Scope 11 | - calendar.event.write 12 | 13 | # Request 14 | 15 | ## Headers 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
NameRequiredDescription
AuthorizationyesBearer token.
28 | 29 | ## Form-Data Parameters 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 |
NameRequiredDescriptionData Type
summaryyesTitle of the event.string
descriptionyesDescription of the event.string
linknoURL link of the event.string
locationyesGeographic location of the event.string
categoryyesCategory of the event.string
startyesThe start time of the event.date-time
endyesThe end time of the event.date-time
81 | 82 | ## Example 83 | ``` 84 | POST /event 85 | summary=Test%20Summary&description=Test%20Description&link=http%3A%2F%2Fexample.com&location=Test%20Location&category=%E5%AD%B8%E7%94%9F&start=2016-01-01T00%3A00%3A00.000Z&end=2016-01-01T01%3A00%3A00.000Z 86 | ``` 87 | 88 | # Response 89 | 90 | ## Formats 91 | - json 92 | 93 | ## Structure 94 | [Event Objects](README.md#structure) 95 | 96 | ## Example 97 | [Event Example](README.md#example) 98 | -------------------------------------------------------------------------------- /calendar-service/v1/event/put.md: -------------------------------------------------------------------------------- 1 | # Update Event 2 | 3 | ``` 4 | PUT /event 5 | ``` 6 | 7 | ## Description 8 | > Updates an event. 9 | 10 | ## Required Scope 11 | - calendar.event.write 12 | 13 | # Request 14 | 15 | ## Headers 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
NameRequiredDescription
AuthorizationyesBearer token.
28 | 29 | ## Form-Data Parameters 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 |
NameRequiredDescriptionData Type
idyesEvent identifier.string
summarynoTitle of the event.string
descriptionnoDescription of the event.string
linknoURL link of the event.string
locationnoGeographic location of the event.string
startnoThe start time of the event.date-time
endnoThe end time of the event.date-time
81 | 82 | ## Example 83 | ``` 84 | PUT /event 85 | id=5o4510qqjm3ccjd4k7i0fu15so&summary=Test%20Summary&description=Test%20Description&link=http%3A%2F%2Fexample.com&location=Test%20Location&start=2016-01-01T00%3A00%3A00.000Z&end=2016-01-01T01%3A00%3A00.000Z 86 | ``` 87 | 88 | # Response 89 | 90 | ## Formats 91 | - json 92 | 93 | ## Structure 94 | [Event Objects](README.md#structure) 95 | 96 | ## Example 97 | [Event Example](README.md#example) 98 | -------------------------------------------------------------------------------- /calendar-service/v1/events.md: -------------------------------------------------------------------------------- 1 | # Read Events 2 | 3 | ``` 4 | GET /events 5 | ``` 6 | 7 | ## Description 8 | > Returns events. 9 | 10 | ## Required Scope 11 | - calendar.event.read 12 | 13 | # Request 14 | 15 | ## Headers 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
NameRequiredDescription
AuthorizationyesBearer token.
28 | 29 | ## Query Parameters 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 |
NameRequiredDescriptionData Type
fromyesLower bound (inclusive) to filter by.date-time
toyesUpper bound (exclusive) to filter by.date-time
limitnoMaximum number of events returned on one result page. (Default: 5)integer
pagenoWhich result page to return. (Default: 1)integer
categorynoCategory of events to filter by.string
orderBynoThe order of the events returned in the result and filter by. The value must be "start", "end", "created_at" or "updated_at". (Default: start)string
75 | 76 | ## Example 77 | ``` 78 | GET /events?from=2015-01-01T00%3A00%3A00.000Z&to=2016-01-01T00%3A00%3A00.000Z&limit=5&page=1&category=%E5%AD%B8%E7%94%9F&orderBy=start 79 | ``` 80 | 81 | # Response 82 | 83 | ## Formats 84 | - json 85 | 86 | ## Structure 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 |
Field NameTypeValue Description
eventsarrayList of Event Objects
countintegerNumber of events.
pageintegerPage number of events.
109 | 110 | 111 | ## Example 112 | ```json 113 | { 114 | "events": [ 115 | { 116 | "id": "a2frtf13cuaqhit9pf26lqmvr4", 117 | "created_at": "2015-11-03T07:45:34.000+08:00", 118 | "updated_at": "2015-11-03T07:45:34.000+08:00", 119 | "summary": "Test Summary1", 120 | "description": "Test Description1", 121 | "location": "Test Location1", 122 | "category": "學生", 123 | "start": "2016-01-01T08:00:00.000+08:00", 124 | "end": "2016-07-01T09:00:00.000+08:00", 125 | "link": "http://example1.com" 126 | }, 127 | { 128 | "id": "bitvsriapjap4023c75d7mints", 129 | "created_at": "2015-11-03T07:45:54.000+08:00", 130 | "updated_at": "2015-11-03T07:45:54.000+08:00", 131 | "summary": "Test Summary2", 132 | "description": "Test Description2", 133 | "location": "Test Location2", 134 | "category": "學生", 135 | "start": "2016-07-01T08:00:00.000+08:00", 136 | "end": "2017-01-01T09:00:00.000+08:00", 137 | "link": "http://example2.com" 138 | } 139 | ], 140 | "count": 2, 141 | "page": 1 142 | } 143 | ``` 144 | -------------------------------------------------------------------------------- /course-service/v1/course/course.md: -------------------------------------------------------------------------------- 1 | # Find Course Information 2 | 3 | ``` 4 | GET /courses/{serialNo} 5 | ``` 6 | 7 | ## Description 8 | > Find course information by its id. 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesYour API token
24 | 25 | ## Example 26 | ``` 27 | GET /courses/12034 28 | ``` 29 | 30 | # Response 31 | 32 | ## Formats 33 | - json 34 | 35 | ## Structure 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 120 | 121 | 122 | 123 | 124 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 209 | 210 | 211 | 212 | 213 | 225 | 226 | 227 | 228 | 229 | 241 | 242 | 243 | 244 | 245 | 246 | 247 |
Field NameTypeValue Description
serialNoStringcourse id, 5 digits and left padding 0.
noStringcourse number
classNoStringclass number, * means not specify.
nameStringcourse name
isClosedBooleanis canceled or not.
memoStringmemo
isMasterDoctorBooleanis both for master and doctor.
languageEnumlanguage that instructor(s) use. 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 |
Chinese中文
English英語
French法語
Taiwanese台語
Hakka客語
Japanese日本語
Spanish西班牙語
German德語
Partially English部份英語
119 |
passwordCardEnum 125 | Password Card 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 |
no不使用
optional部份使用
all全部使用
140 |
isFirstRunBooleanis available at first selection.
isPreSelectBooleanwill be selected for student before first selection.
teachersString Arrayteacher names
creditNumbercredit
classRoomsString[]class room number with building code
timesObjectKey : Day of Week 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 |
0Monday
1Tuesday
2Wednesday
3Thursday
4Friday
5Saturday
6Sunday
201 | Value : array of period(s) 202 | 203 | 204 | 205 | 206 | 207 |
sequences1,2,3,4,Z,5,6,7,8,9,A,B,C,D,E,F
208 |
typeEnum 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 |
required必修
elective選修
224 |
fullHalfEnumhalf year(1 semester) or full year(2 semesters) 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 |
full
half
240 |
maxStudentsNumbermaximum amount of students, 0 means infinity.
248 | 249 | ## Example 250 | ```json 251 | [ 252 | { 253 | "serialNo" : 12034, 254 | "no" : "EL5001", 255 | "classNo" : "*", 256 | "name" : "文學/文化理論導讀", 257 | "isClosed" : false, 258 | "memo": "限三、四年級", 259 | "isMasterDoctor": false, 260 | "language": "國語", 261 | "passwordCard": "不使用", 262 | "isFirstRun": true, 263 | "isPreSelect": true, 264 | "teachers": [ "錢夫人", "阿土伯" ], 265 | "credit": 2, 266 | "classRooms": [ "C2-209", "C2-209" ], 267 | "times": { 268 | "0": ["5"], 269 | "2": ["3", "4"] 270 | }, 271 | "type": "必修", 272 | "fullHalf": "全", 273 | "maxStudents": 0 274 | } 275 | ] 276 | ``` -------------------------------------------------------------------------------- /course-service/v1/course/limit.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NCU-CC/API-Documentation/29405a7faa1ef71909ea4f78a2ed62ec596d6770/course-service/v1/course/limit.md -------------------------------------------------------------------------------- /course-service/v1/course/search.md: -------------------------------------------------------------------------------- 1 | # Search Course Information 2 | 3 | ``` 4 | GET /courses 5 | ``` 6 | 7 | ## Description 8 | > Search course information at current semester. 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesYour API token
24 | 25 | ## Query Parameter 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 |
NameRequiredDescription
deptnodepartment id
weekno 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |
0Monday
1Tuesday
2Wednesday
3Thursday
4Friday
5Saturday
6Sunday
71 |
periodno1,2,3,4,Z,5,6,7,8,9,A,B,C,D,E,F
limitno1 <= limit <= 500, defaults to 30.
keywordnoat most 3
89 | 90 | ## Example 91 | ``` 92 | GET /courses?period=2&week=3 93 | ``` 94 | 95 | # Response 96 | 97 | ## Formats 98 | - json 99 | 100 | ## Structure 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 |
Field NameTypeValue Description
resultlist[Course Object]
113 | 114 | ## Example 115 | - [Course Example](../course/course.md#example-1) 116 | 117 | ## Notes 118 | - [Course Object](../course/course.md#structure) -------------------------------------------------------------------------------- /course-service/v1/search/departments_courses.md: -------------------------------------------------------------------------------- 1 | # Search Course Information By Department 2 | 3 | ``` 4 | GET /departments/{departmentId}/courses 5 | ``` 6 | 7 | ## Description 8 | > Search course information by department. 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesYour API token
24 | 25 | ## Example 26 | ``` 27 | GET /departments/deptI1I1000I0/courses 28 | ``` 29 | 30 | # Response 31 | 32 | ## Formats 33 | - json 34 | 35 | ## Structure 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Field NameTypeValue Description
resultlist[Course Object]
48 | 49 | ## Example 50 | - [Course Example](../course/course.md#example-1) 51 | 52 | ## Notes 53 | - [Course Object](../course/course.md#structure) -------------------------------------------------------------------------------- /course-service/v1/search/departments_targets.md: -------------------------------------------------------------------------------- 1 | # Find Targets. 2 | 3 | ``` 4 | GET /departments/{departmentId}/targets 5 | ``` 6 | 7 | ## Description 8 | > Find targets that departments running courses for. 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesYour API token
24 | 25 | ## Example 26 | ``` 27 | GET /departments/deptI1I1000I0/targets 28 | ``` 29 | 30 | # Response 31 | 32 | ## Formats 33 | - json 34 | 35 | ## Structure 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 60 | 61 |
Field NameTypeValue Description
resultlist 46 | Target Object 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
nameStringtarget name
idStringtarget Id
59 |
62 | 63 | ## Example 64 | ```json 65 | { 66 | "result" : 67 | [ 68 | { 69 | "name" : "中國文學系[不分類]", 70 | "id" : "cofuZdeptI1I1001I0ZcofgI0" 71 | }, 72 | { 73 | "name" : "中國文學系[一年級]", 74 | "id" : "cofuZdeptI1I1001I0ZcofgI1" 75 | } 76 | ] 77 | } 78 | ``` -------------------------------------------------------------------------------- /course-service/v1/search/summer.md: -------------------------------------------------------------------------------- 1 | # Search Summer Course Information 2 | 3 | ``` 4 | GET /summer/{stage}/courses 5 | ``` 6 | 7 | ## Description 8 | > Search course information by summer stage 1 or 2. 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesYour API token
24 | 25 | ## Example 26 | ``` 27 | GET /summer/1/courses 28 | ``` 29 | 30 | # Response 31 | 32 | ## Formats 33 | - json 34 | 35 | ## Structure 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Field NameTypeValue Description
resultlist[Course Object]
48 | 49 | ## Example 50 | - [Course Example](../course/course.md#example-1) 51 | 52 | ## Notes 53 | - [Course Object](../course/course.md#structure) -------------------------------------------------------------------------------- /course-service/v1/search/target.md: -------------------------------------------------------------------------------- 1 | # Search Course Information By Target 2 | 3 | ``` 4 | GET /targets/{targetId}/courses 5 | ``` 6 | 7 | ## Description 8 | > Search course information by target. 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesYour API token
24 | 25 | ## Example 26 | ``` 27 | GET /targets/cofuZdeptI1I1001I0ZcofgI0/courses 28 | ``` 29 | 30 | # Response 31 | 32 | ## Formats 33 | - json 34 | 35 | ## Structure 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Field NameTypeValue Description
resultlist[Course Object]
48 | 49 | ## Example 50 | - [Course Example](course/course.md#example) 51 | 52 | ## Notes 53 | - [Course Object](course/course.md#structure) -------------------------------------------------------------------------------- /course-service/v1/status.md: -------------------------------------------------------------------------------- 1 | # Get Status of Course Selection System 2 | 3 | ``` 4 | GET /status 5 | ``` 6 | 7 | ## Description 8 | > Get Status of Course Selection System. 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesYour API token
24 | 25 | ## Example 26 | ``` 27 | GET /status 28 | ``` 29 | 30 | # Response 31 | 32 | ## Formats 33 | - json 34 | 35 | ## Structure 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 |
Field NameTypeValue Description
semesterString4 digits, 3 for MinGuo year, 1 for semester.
stageStringcurrent course selection stage.
53 | 54 | ## Example 55 | ```json 56 | { 57 | "semester" : 1031, 58 | "stage" : "校際選課" 59 | } 60 | ``` -------------------------------------------------------------------------------- /course-service/v1/student/rejected.md: -------------------------------------------------------------------------------- 1 | # Get Rejected Courses 2 | 3 | ``` 4 | GET /student/rejected 5 | ``` 6 | 7 | ## Description 8 | > Get student's rejected courses. 9 | 10 | ## Required Scope 11 | - course.schedule.read 12 | 13 | # Request 14 | 15 | ## Headers 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
NameRequiredDescription
AuthorizationyesYour OAuth token in the form of Bearer XXX
28 | 29 | ## Example 30 | ``` 31 | GET /student/rejected 32 | ``` 33 | 34 | # Response 35 | 36 | ## Formats 37 | - json 38 | 39 | ## Structure 40 | [Course Object](../course/course.md#structure) 41 | 42 | ## Example 43 | [Course Example](../course/course.md#example-1) -------------------------------------------------------------------------------- /course-service/v1/student/selected.md: -------------------------------------------------------------------------------- 1 | # Get Selected Courses 2 | 3 | ``` 4 | GET /student/selected 5 | ``` 6 | 7 | ## Description 8 | > Get student's selected courses. 9 | 10 | ## Required Scope 11 | - course.schedule.read 12 | 13 | # Request 14 | 15 | ## Headers 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
NameRequiredDescription
AuthorizationyesYour OAuth token in the form of Bearer XXX
28 | 29 | ## Example 30 | ``` 31 | GET /student/selected 32 | ``` 33 | 34 | # Response 35 | 36 | ## Formats 37 | - json 38 | 39 | ## Structure 40 | [Course Object](../course/course.md#structure) 41 | 42 | ## Example 43 | [Course Example](../course/course.md#example-1) -------------------------------------------------------------------------------- /course-service/v1/student/tracking.md: -------------------------------------------------------------------------------- 1 | # Get Tracking Courses 2 | 3 | ``` 4 | GET /student/tracking 5 | ``` 6 | 7 | ## Description 8 | > Get student's tracking courses. 9 | 10 | ## Required Scope 11 | - course.schedule.read 12 | 13 | # Request 14 | 15 | ## Headers 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
NameRequiredDescription
AuthorizationyesYour OAuth token in the form of Bearer XXX
28 | 29 | ## Example 30 | ``` 31 | GET /student/tracking 32 | ``` 33 | 34 | # Response 35 | 36 | ## Formats 37 | - json 38 | 39 | 40 | ## Structure 41 | [Course Object](../course/course.md#structure) 42 | 43 | ## Example 44 | [Course Example](../course/course.md#example-1) -------------------------------------------------------------------------------- /course-service/v1/unit/college.md: -------------------------------------------------------------------------------- 1 | # Find All Colleges. 2 | 3 | ``` 4 | GET /colleges 5 | ``` 6 | 7 | ## Description 8 | > Find all colleges. 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesYour API token
24 | 25 | ## Example 26 | ``` 27 | GET /colleges 28 | ``` 29 | 30 | # Response 31 | 32 | ## Formats 33 | - json 34 | 35 | ## Structure 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 60 | 61 |
Field NameTypeValue Description
resultlist 46 | College Object 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
nameStringcollege name
idStringcollege Id
59 |
62 | 63 | ## Example 64 | ```json 65 | { 66 | "result" : 67 | [ 68 | { 69 | "name" : "文學院", 70 | "id" : "deptI1I1000I0" 71 | }, 72 | { 73 | "name" : "理學院", 74 | "id" : "deptI1I2000I0" 75 | } 76 | ] 77 | } 78 | ``` -------------------------------------------------------------------------------- /course-service/v1/unit/college_department.md: -------------------------------------------------------------------------------- 1 | # Find Departments By College. 2 | 3 | ``` 4 | GET /colleges/{collegeId}/departments 5 | ``` 6 | 7 | ## Description 8 | > Find departments by college. 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesYour API token
24 | 25 | ## Example 26 | ``` 27 | GET /colleges/deptI1I1000I0/departments 28 | ``` 29 | 30 | # Response 31 | 32 | ## Formats 33 | - json 34 | 35 | ## Structure 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 60 | 61 |
Field NameTypeValue Description
resultlist 46 | Department Object 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
nameStringdepartment name
idStringdepartment Id
59 |
62 | 63 | ## Example 64 | ```json 65 | [ 66 | { 67 | "name" : "文學院", 68 | "id" : "deptI1I1000I0" 69 | }, { 70 | "name" : "中國文學系", 71 | "id" : "deptI1I1001I0" 72 | } 73 | ] 74 | ``` -------------------------------------------------------------------------------- /location-service/v1/buildings.md: -------------------------------------------------------------------------------- 1 | # Find Buildings 2 | 3 | ``` 4 | GET /buildings 5 | ``` 6 | 7 | ## Description 8 | > Find buildings of NCU. 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesyour API token
24 | 25 | ## Example 26 | ``` 27 | GET /buildings 28 | ``` 29 | 30 | # Response 31 | 32 | ## Formats 33 | - json 34 | 35 | ## Structure 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 |
Field NameTypeValue Description
chineseNameStringbuilding's Chinese name
englishNameStringbuilding's English name
53 | 54 | ## Example 55 | ```json 56 | [ 57 | { 58 | "chineseName" : "行政大樓", 59 | "englishName" : "Administrative Building", 60 | }, 61 | { 62 | "chineseName" : "總圖書館", 63 | "englishName" : "Main Library", 64 | }, 65 | ] 66 | ``` -------------------------------------------------------------------------------- /location-service/v1/faculties.md: -------------------------------------------------------------------------------- 1 | # Find Information of Faculties 2 | 3 | ``` 4 | GET /faculties 5 | ``` 6 | 7 | ## Description 8 | > Find faculty's information by his/her **Chinese** name. 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesyour API token
24 | 25 | ## Query Parameters 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
NameRequiredDescription
cnameyesfaculty's Chinese name
38 | 39 | ## Example 40 | ``` 41 | GET /faculties?cname=王小明 42 | ``` 43 | 44 | # Response 45 | 46 | ## Formats 47 | - json 48 | 49 | ## Structure 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 |
Field NameTypeValue Description
chineseNameStringfaculty's Chinese name
englishNameStringfaculty's English name
titleStringfaculty's title
primaryUnit[Unit Object]primary unit
secondaryUnit[Unit Object]secondary unit
officePhoneTelfaculty's office extension
87 | 88 | ## Example 89 | ```json 90 | [ 91 | { 92 | "chineseName" : "王小明", 93 | "englishName" : "Wang, Xiao Ming", 94 | "title" : "助理", 95 | "primaryUnit" : { 96 | "unitCode" : "A800", 97 | "chineseName" : "電子計算機中心", 98 | "englishName" : "Computer Center", 99 | "shortName" : "電算中心", 100 | "fullName" : "電子計算機中心", 101 | "url" : "http://www.cc.ncu.edu.tw/introduction/member.php", 102 | "location" : { 103 | "lat" : 24.970128, 104 | "lng" : 121.193719 105 | } 106 | }, 107 | "secondaryUnit" : { 108 | "unitCode" : "A830", 109 | "chineseName" : "校務資訊組", 110 | "englishName" : "Campus Information Management Division", 111 | "shortName" : "校務資訊組", 112 | "fullName" : "電子計算機中心-校務資訊組", 113 | "url" : "http://www.cc.ncu.edu.tw/introduction/member.php", 114 | "location" : { 115 | "lat" : 24.970128, 116 | "lng" : 121.193719 117 | } 118 | }, 119 | "officePhone" : "99999" 120 | } 121 | ] 122 | ``` 123 | ## Notes 124 | - [Unit Object](units.md#structure) 125 | -------------------------------------------------------------------------------- /location-service/v1/places.md: -------------------------------------------------------------------------------- 1 | # Find Landscapes, Buildings or Faculties. 2 | 3 | ``` 4 | GET /places 5 | ``` 6 | 7 | ## Description 8 | > Find location of landscapes, buildings or faculties by query parameters. 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesyour API token
24 | ## Query Parameters 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
NameRequiredDescription
typeyesplace type
cnameyesplace's full Chinese name
42 | 43 | **cname** and **type** are exclusive 44 | 45 | ## Place Type 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 |
typedescription
WHEELCHAIR_RAMP無障礙坡道
DISABLED_CAR_PARKING無障礙汽車位
DISABLED_MOTOR_PARKING無障礙機車位
EMERGENCY緊急
AEDAED 自動體外心臟電擊去顫器
RESTAURANT餐廳
SPORT_RECREATION休閒生活
ADMINISTRATION行政服務
RESEARCH教學研究
DORMITORY宿舍
OTHER其他單位
ATM提款機
BUS_STATION公車站牌
PARKING_LOT停車場
108 | 109 | ## Example 110 | 111 | ``` 112 | GET /places?cname=工程五館 113 | ``` 114 | 115 | ``` 116 | GET /places?type=AED 117 | ``` 118 | 119 | # Response 120 | 121 | ## Formats 122 | - json 123 | 124 | ## Structure 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 161 | 162 |
Field NameTypeValue Description
chineseNameStringplace's Chinese name
englishNameStringplace's English name
typeEnumPlace Type
locationLatLng 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 |
latlatitude
lnglongitude
160 |
163 | 164 | ## Example 165 | ```json 166 | [ 167 | { 168 | "chineseName" : "AED 自動體外心電擊去顫器", 169 | "englishName" : "AED, Automated External Defibrillator", 170 | "type" : "AED", 171 | "location" : { 172 | "lat" : 24.968275, 173 | "lng" : 121.195092 174 | } 175 | }, 176 | { 177 | "chineseName" : "AED 自動體外心電擊去顫器", 178 | "englishName" : "AED, Automated External Defibrillator", 179 | "type" : "AED", 180 | "location" : { 181 | "lat" : 24.966139, 182 | "lng" : 121.19463 183 | } 184 | } 185 | ] 186 | ``` 187 | -------------------------------------------------------------------------------- /location-service/v1/search.md: -------------------------------------------------------------------------------- 1 | # Search By Keywords. 2 | 3 | ``` 4 | GET /search 5 | ``` 6 | 7 | ## Description 8 | > Search location of landscapes, buildings or faculties by keywords. 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesyour API token
24 | ## Query parameters 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
NameRequiredDescription
qyeskeywords
sizeno1 <= size <= 5, defaults to 3.
42 | 43 | ## Example 44 | ``` 45 | GET /search?q=志希 46 | ``` 47 | 48 | # Response 49 | 50 | ## Formats 51 | - json 52 | 53 | ## Structure 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 91 | 92 |
Field NameTypeValue Description
chineseNameStringplace's Chinese name
englishNameStringplace's English name
typeEnum[Place Type]
locationLatLng 79 | latlng object 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 |
latLatitude
lngLongitude
90 |
93 | 94 | ## Example 95 | ```json 96 | [ 97 | { 98 | "chineseName" : "志希館", 99 | "englishName" : "Zhi-Xi Building", 100 | "type" : "ADMINISTRATION", 101 | "location" : { 102 | "lat" : 24.970126, 103 | "lng" : 121.193683 104 | } 105 | } 106 | ] 107 | ``` 108 | ## Notes 109 | - [Place Type](places.md#place-type) 110 | -------------------------------------------------------------------------------- /location-service/v1/units.md: -------------------------------------------------------------------------------- 1 | # Find Administrative and Research Units. 2 | 3 | ``` 4 | GET /units 5 | ``` 6 | 7 | ## Description 8 | > Find administrative and research units. 9 | 10 | # Request 11 | ## Headers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRequiredDescription
X-NCU-API-TOKENyesyour API token
24 | ## Query Parameters 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
NameRequiredDescription
fnameyesunit's full Chinese name
building_cnameyesplace's full Chinese name
42 | 43 | **fname** and **building_cname** are exclusive 44 | 45 | ## Example 46 | 47 | ``` 48 | GET /units?fname=電子計算機中心 49 | ``` 50 | 51 | ``` 52 | GET /units?building_cname=志希館 53 | ``` 54 | 55 | # Response 56 | 57 | ## Formats 58 | - json 59 | 60 | ## Structure 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 112 | 113 |
Field NameTypeValue Description
unitCodeStringunit's code
chineseNameStringunit's name Chinese name
englishNameStringunit's name English name
shortNameStringabbreviation of unit's Chinese name
fullNameStringunit's official Chinese name
urlURLunit's website
locationLatLng 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 |
latlatitude
lnglongitude
111 |
114 | 115 | ## Example 116 | ```json 117 | [ 118 | { 119 | "unitCode" : "T400", 120 | "chineseName" : "管理學院", 121 | "englishName" : "College of Management", 122 | "shortName" : "管理學院", 123 | "fullName" : "管理學院", 124 | "url" : "", 125 | "location" : null 126 | }, 127 | { 128 | "unitCode" : "A800", 129 | "chineseName" : "電子計算機中心", 130 | "englishName" : "Computer Center", 131 | "shortName" : "電算中心", 132 | "fullName" : "電子計算機中心", 133 | "url" : "http://www.cc.ncu.edu.tw/introduction/member.php", 134 | "location" : { 135 | "lat" : 24.970128, 136 | "lng" : 121.193719 137 | } 138 | } 139 | ] 140 | ``` 141 | -------------------------------------------------------------------------------- /oauth-service/README.md: -------------------------------------------------------------------------------- 1 | # OAuth 2 | We use OAuth2 to **protect personal resources**. Only api service with those resource need oauth access token. 3 | Developers can get access token from 2 ways, they are described below. 4 | 5 | ## Root URL 6 | ``` 7 | https://api.cc.ncu.edu.tw/oauth 8 | ``` 9 | 10 | ## OAuth Scope 11 | you can view all scopes in [scope list](scope.md) 12 | 13 | ## Authorization Code Grant Flow 14 | 15 | 1. get [authorization code](authorization_code.md) 16 | 2. get [access token](access_token.md) by exchanging with auth code above 17 | 18 | ## Refresh Token Grant Flow 19 | 20 | - get [refresh token](refresh_token.md) by exchanging with refresh token provided from authorization code grant flow 21 | -------------------------------------------------------------------------------- /oauth-service/access_token.md: -------------------------------------------------------------------------------- 1 | # Access Token 2 | 3 | ``` 4 | POST /oauth/token 5 | ``` 6 | 7 | ## Description 8 | > exchange access token by authorization code 9 | 10 | # Request 11 | ## Query Parameters 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
NameRequiredDescription
grant_typeyesit must be authorization_code
codeyescode from authorization code response
client_idyesyour client id
client_secretyesyour client secret
39 | 40 | ## Example 41 | ``` 42 | POST /oauth/token?grant_type=authorization_code&code=SplxlOBeZQQYbYS6WxSbIA&client_id=ABC123&client_secret=QQYbY 43 | ``` 44 | 45 | # Response 46 | 47 | ## Formats 48 | - json 49 | 50 | ## Structure 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 |
Field NameTypeValue Description
access_tokenstringused to access user resource
token_typestringit must be Bearer
expires_innumberexpire seconds for access token
refresh_tokenstringused to get new access token
78 | 79 | ## Example 80 | ```json 81 | { 82 | "access_token" : "2YotnFZFEjr1zCsicMWpAA", 83 | "refresh_token" : "tGzv3JOkF0XG5Qx2TlKWIA", 84 | "token_type" : "Bearer", 85 | "expires_in" : 28800 86 | } 87 | ``` -------------------------------------------------------------------------------- /oauth-service/authorization_code.md: -------------------------------------------------------------------------------- 1 | # Authorization Code 2 | 3 | ``` 4 | GET /oauth/authorize 5 | ``` 6 | 7 | ## Description 8 | > authorize the client permission request 9 | 10 | # Request 11 | ## Query Parameters 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
NameRequiredDescription
response_typeyesvalue must be code
scopeyesrequired permissions
client_idyesyour client id
statenocheck string, you can get same state in response
39 | 40 | ## Example 41 | ``` 42 | GET /oauth/authorize?response_type=code&scope=CLASS_READ+CLASS_WRITE&client_id=ABC123 43 | ``` 44 | 45 | # Response 46 | 47 | ## Formats 48 | - json 49 | 50 | ## Structure 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |
Field NameTypeValue Description
codestringused to exchange access token
statestringpresent if provided in request
68 | 69 | ## Example 70 | 71 | ```json 72 | { 73 | "code" : "SplxlOBeZQQYbYS6WxSbIA" 74 | } 75 | ``` 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /oauth-service/refresh_token.md: -------------------------------------------------------------------------------- 1 | # Refresh Token 2 | 3 | ``` 4 | POST /oauth/token 5 | ``` 6 | 7 | ## Description 8 | > exchange access token by refresh token 9 | 10 | # Request 11 | ## Query Parameters 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
NameRequiredDescription
grant_typeyesit must be refresh_token
refresh_tokenyescode from authorization code response
client_idyesyour client id
client_secretyesyour client secret
39 | 40 | ## Example 41 | ``` 42 | GET /oauth/token?grant_type=refresh_token&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA&client_id=ABC123&client_secret=QQYbY 43 | ``` 44 | 45 | # Response 46 | 47 | ## Formats 48 | - json 49 | 50 | ## Structure 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 |
Field NameTypeValue Description
access_tokenstringused to access user resource
token_typestringit must be Bearer
expires_innumberexpire seconds for access token
73 | 74 | ## Example 75 | ```json 76 | { 77 | "access_token" : "2YotnFZFEjr1zCsicMWpAA", 78 | "token_type" : "Bearer", 79 | "expires_in" : 28800 80 | } 81 | ``` -------------------------------------------------------------------------------- /oauth-service/scope.md: -------------------------------------------------------------------------------- 1 | # Oauth Scope 2 | 3 | Value | Description 4 | ----- | ----------- 5 | course.schedule.read | read scheduled courses 6 | calendar.event.read | read events in calendar 7 | calendar.event.write | write events to calendar 8 | user.info.basic.read | read user basic information -------------------------------------------------------------------------------- /personnel-service/v1/cards.md: -------------------------------------------------------------------------------- 1 | # Get Person Information by Card Number 2 | 3 | ``` 4 | GET /cards/{card_number} 5 | ``` 6 | 7 | ## Description 8 | > Get person information by NCU card number. Read the NCU card number by devices with NFC. 9 | 10 | ## Required Scope 11 | - user.info.basic.read 12 | 13 | # Request 14 | 15 | ## Query Parameters 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
NameRequiredDescription
idyesthe last 4 digits of your id card number (身分證字號) for security purpose
28 | 29 | ## Headers 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
NameRequiredDescription
AuthorizationyesYour OAuth token in the form of Bearer XXX
42 | 43 | ## Example 44 | ``` 45 | GET /cards/F06D4935?id=1234 46 | ``` 47 | 48 | ``` 49 | GET /cards/F06D2549?id=6789 50 | ``` 51 | 52 | # Response 53 | 54 | ## Formats 55 | - json 56 | 57 | ## Structure 58 | There are two types of response. You can verify the type by **type** attribute 59 | 60 | - Student 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 |
Field NameTypeValue Description
idStringidentity
nameStringperson name
typeStringperson type, this must be STUDENT here
unitStringstudent unit
groupStringstudent group
numberStringstudent number ( deprecated )
99 | 100 | - Faculty 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 |
Field NameTypeValue Description
idStringidentity
nameStringperson name
typeStringperson type, this must be FACULTY here
unitStringfaculty unit
titleStringfaculty title
numberStringfaculty number ( deprecated )
139 | 140 | ## Example 141 | ```json 142 | { 143 | "id": "101502549", 144 | "name" : "john", 145 | "type" : "STUDENT", 146 | "unit" : "computer science", 147 | "group" : "none", 148 | "number" : "101502549", 149 | } 150 | ``` 151 | 152 | ```json 153 | { 154 | "id": "F123456", 155 | "name" : "jack", 156 | "type" : "FACULTY", 157 | "unit" : "computer center", 158 | "title" : "software developer", 159 | "number" : "F123456", 160 | } 161 | ``` -------------------------------------------------------------------------------- /personnel-service/v1/info.md: -------------------------------------------------------------------------------- 1 | # Get Person Information 2 | 3 | ``` 4 | GET /info 5 | ``` 6 | 7 | ## Description 8 | > Get person information from access token 9 | 10 | ## Required Scope 11 | - user.info.basic.read 12 | 13 | # Request 14 | 15 | ## Headers 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
NameRequiredDescription
AuthorizationyesYour OAuth token in the form of Bearer XXX
28 | 29 | ## Example 30 | ``` 31 | GET /info 32 | ``` 33 | 34 | # Response 35 | 36 | ## Formats 37 | - json 38 | 39 | ## Structure 40 | [Person Object](cards.md#structure) 41 | 42 | ## Example 43 | [Person Example](cards.md#example-1) --------------------------------------------------------------------------------