Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.

API v1.1 Reference

Vlad Slepukhin edited this page Aug 24, 2014 · 1 revision

SSU TimeTable API Version 1 Reference

General

Now all the requests can be called directly from /. So, the address is api.ssutt.org:8080.

Version 2.1 is available here.


[GET] /1/departments

Get list of department tags and names, sorted by names.

Status code:

  • 200 - Success
  • 209 - Database Error
  • 404 - Production server is down

Response in case of success:

[
	{ 
		"tag": "bf",
		"name": "Биологический факультет",
	},
  ...
  	{
		"tag": "ff"
		"name": "Физический факультет",
    },
  ...
]

[GET] /1/department/< department_tag >/msg

Get the department message by its tag. Status code:

  • 200 - Success
  • 209 - Database Error
  • 309 - No such department
  • 404 - Production server is down

Response in case of success:

{
	"msg" : "Crucial information!"	
}
  ...

[GET] /1/department/< department_tag >/groups?filled=<1|0>

####filled = 1

Get list of all groups which have timetables for selected department.

####filled = 0

Get list of all available group names for selected department.

String group names now are supported

Status code:

  • 200 - Success
  • 209 - Database Error
  • 309 - No such department
  • 399 - No such group. Only appears due to internal errors
  • 404 - Production server is down

Response in case of success:

[
	"111",
	"112",
	...
]

[GET] /1/department/< department_tag >/group/< group_name >

Get timetable of group from department. Results are sorted by days, then by sequence of lessons, subgroup names (lexigraphically) and finally by parity.

It has this structure:

  • 1st: array of lessons
  • 2nd: array of subjects on a day and time.
  • 3rd: array of subgroups for subject

Status code:

  • 200 - Success
  • 209 - Database Error
  • 309 - No such department
  • 399 - No such group
  • 509 - Unsupported Encoding. Appears when passed non-escaped or incorrectly escaped group names
  • 404 - Production server is down

Response in case of success:

[
	{
		"day": "mon",
		"parity": "full",
		"sequence": 4,
		"subject": [
			{
				"name": "англ.яз.станд.",
				"activity": "practice",
		        "subgroups": [
					{
						"subgroup": "анг.ст.7",
						"teacher": "Обликова Мария Ивановна",
						"location": "12корпус ауд.225В"
					},
		        	{
						"subgroup": "анг.ст.8",
						"teacher": "Кожевникова Елена Владимировна",
						"location": "12корпус ауд.229"
		    	    },
				 ]
      		},
      		{
		        "name": "переводчики",
        		"activity": "practice",
		        "subgroups": [
        		 {
		            "subgroup": "перев,3под",
        		    "teacher": "Шилова Светлана Алексеевна",
		            "location": "12корпус ауд.125"
        		  }
		        ]
	      	}
	    ]	
 	 },
  ...
 ]

Response in case of failure

TT Platform has the unified response in case of some error occurs:

Response in case of failure:

{ "errmsg": <Some Error Information > }