Skip to content

Navigation Menu

Sign in
Sign up
Belikhun edited this page Sep 23, 2018 · 5 revisions

/config - Thay đổi cài đặt hệ thống

HTTP/1.1 GET /api/config

  • Permission: everyone
  • Require Logged In: false

Success 200:

Field Type Description
contest.name string Tên kì thi
contest.description string Session ID
uploaddir string Thư mục nộp bài
time.zone string Khu vực
time.begin.seconds int Thời gian bắt đầu (giây)
time.begin.minutes int Thời gian bắt đầu (phút)
time.begin.hours int Thời gian bắt đầu (giờ)
time.begin.days int Thời gian bắt đầu (ngày)
time.begin.months int Thời gian bắt đầu (tháng)
time.begin.years int Thời gian bắt đầu (năm)
time.begin.times int Thời gian bắt đầu (giây) (tính từ 1/1/1970 00:00:00 GMT)
time.during int Thời gian làm bài
time.offset int Thời gian bù
publish bool Công bố kết quả chấm
submit bool Cho phép nộp bài
editinfo bool Cho phép thay đổi thông tin
viewlog bool Cho phép xem tệp nhật ký

Example:

{
	"code": 0,
	"status": 200,
	"description": "Thành công!",
	"user": "admin",
	"data": {
		"contest": {
			"name": "Bài tập tin học",
			"description": "Bài làm nộp lên được chấm bằng phần mềm <a href='http:\/\/dsapblog.wordpress.com\/'>Themis (Lê Minh Hoàng & Đỗ Đức Đông)<\/a>"
		},
		"uploaddir": "D:\\Themis\\data\\uploadDir",
		"time": {
			"zone": "Asia\/Ho_Chi_Minh",
			"begin": {
				"seconds": 0,
				"minutes": 0,
				"hours": 12,
				"days": 14,
				"months": 10,
				"years": 2018,
				"times": 1539493200
			},
			"during": 0,
			"offset": 30
		},
		"publish": true,
		"submit": true,
		"editinfo": true,
		"viewlog": true,
		"logdir": "D:\\Themis\\data\\uploadDir\/Logs"
	},
	"runtime": 0.0009348392486572266
}

HTTP/1.1 POST /api/config

  • Permission: admin
  • Require Logged In: true

Parameter:

Field Method Type Description Required
contest.name POST string Tên kì thi
contest.description POST string Session ID
uploaddir POST string Thư mục nộp bài
time.zone POST string Khu vực
time.begin.seconds POST int Thời gian bắt đầu (giây)
time.begin.minutes POST int Thời gian bắt đầu (phút)
time.begin.hours POST int Thời gian bắt đầu (giờ)
time.begin.days POST int Thời gian bắt đầu (ngày)
time.begin.months POST int Thời gian bắt đầu (tháng)
time.begin.years POST int Thời gian bắt đầu (năm)
time.begin.times POST int Thời gian bắt đầu (giây) (tính từ 1/1/1970 00:00:00 GMT)
time.during POST int Thời gian làm bài
time.offset POST int Thời gian bù
publish POST bool Công bố kết quả chấm
submit POST bool Cho phép nộp bài
editinfo POST bool Cho phép thay đổi thông tin
viewlog POST bool Cho phép xem tệp nhật ký
token POST string API Token *
  • Lưu ý: có thể dùng _ thay cho . (VD: time_begin_seconds)

Example:

{
	"code": 0,
	"status": 200,
	"description": "Thay đổi cài đặt thành công!",
	"user": "admin",
	"data": [],
	"runtime": 0.0027751922607421875
}

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /