Repository navigation
THIApp WebAPI Documentation
xBaun edited this page Mar 19, 2017
·
1 revision
| Paramter | Value |
|---|---|
| Host | https://hiplan.thi.de/webservice/production/index.php |
| HTTP-Method | POST |
| Content-Type | application/x-www-form-urlencoded |
- The server response is always a JSON Object.
- The server always answers with status
200
Check if a Session-ID is still valid.
| Name | Value | Desc |
|---|---|---|
| service | session |
|
| method | isalive |
|
| session | <SESSION ID> |
A valid session string |
| format | json |
| Name | Value | Desc |
|---|---|---|
| date | <DATE> |
"18.03.2017 |
| time | <TIME> |
"21:37:22" |
| data | <STRING> |
--- |
| status | <NUMBER> |
--- |
The data field contains "No Session".
e.g.:
{"date":"18.03.2017","time":"21:37:22","data":"No Session","status":-115}
The data field contains "STATUS_OK" and status field is 0.
e.g.:
{"date":"18.03.2017","time":"21:40:41","data":"STATUS_OK","status":0}
| Name | Value | Desc |
|---|---|---|
| service | session |
|
| method | open |
|
| format | json |
|
| username | <USERNAME> |
|
| passwd | <PASSWORD> |
| Name | Value | Desc |
|---|---|---|
| date | <DATE> |
"18.03.2017 |
| time | <TIME> |
"21:37:22" |
| data | <ARRAY> |
--- |
| status | <NUMBER> |
--- |
The data field contains an Array with three values: ["<SESSION ID>","<USERNAME>",3] and status field is 0.
e.g.:
{"date":"18.03.2017","time":"21:37:22","data":["<SESSION ID>","<USERNAME>",3],"status":0}
The data field contains "Wrong credentials" and statusfield is -103.
e.g.:
{"date":"19.03.2017","time":"12:56:10","data":"Wrong credentials","status":-103}
Read the student schedule.
| Name | Value | Desc |
|---|---|---|
| service | thiapp |
|
| method | stpl |
|
| format | json |
|
| session | <SESSION ID> |
A valid session id |
| day | <START DAY> |
|
| month | <START MONTH> |
|
| year | <START YEAR> |
|
| details | 0 |
TODO: Unknwon purpose |
e.g.:
service=thiapp&method=stpl&format=json&session=<SESSION ID>&day=13&month=03&year=2017&details=0
See Wiki-Page: Example Response: Calendar
| Key | Value | |
|---|---|---|
| service | thiapp |
|
| method | mesna |
|
| format | json |
|
| session | <SESSION ID> |
A valid Session-ID |
e.g.
service=thiapp&method=mensa&session=<SESSION ID>&format=json
See Wiki-Page: Example Response: Mensa Menu