Pre-release version of API is available now. Note that the API uses duplicated DB contents from current AOJ for the pre-release version. When we release the new API, contents of the pre-release version will be cleaned and current database of AOJ will be migrated to the new server.
The service may stop temporarily because of system update.

auth: login

Logging in. Returns a corresponding user entity when logging in successfully.

Type POST
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /session
Exception USER_NOT_FOUND_ERROR: 400
Auth

Request body parameters

Parameter Description Type Required Example
id User ID string yes s1220233
password Login password string yes ****

Request body example

{
  "id": "s1220233",
  "password": "YOUR_PASSWORD"
}

Response fields

Field Description Type Frequency Example
id User ID string 1 s1220233
name User name string 1 Michael
affiliation Affiliation of the user string 1 University of Aizu
registerDate The date of the user registration long integer 1 1397723423672
lastSubmitDate The date of the last submission long integer 1 1435148630523
policy The policy of submitted source codes string 1 public
country The country living in string 1 jp
birthYear Birth year long integer 1 1995
displayLanguage Display language string 1 Japanese
defaultProgrammingLanguage Default programming language string 1 Python3
status User status json 1 values below
- submissions The number of submissions integer 1 27
- solved The number of solved problems integer 1 5
- accepted The number of accepted submissions integer 1 7
- wrongAnswer The number of wrong submissions integer 1 14
- timeLimit The number of submissions which exceeded time limit integer 1 0
- memoryLimit The number of submissions which exceeded memory limit integer 1 0
- outputLimit The number of submissions which exceeded the limit of output integer 1 0
- compileError The number of compilation failed submissions integer 1 0
- runtimeError The number of submissions which caused failure while running integer 1 6
url The url of homepage string 1 null

Response example

{
  "id":"s1220233",
  "name":"Michael",
  "affiliation":"University of Aizu",
  "registerDate":1397723423672,
  "lastSubmitDate":1435148630523,
  "policy":"public",
  "country":"jp",
  "birthYear":null,
  "displayLanguage":"Japanese",
  "defaultProgrammingLanguage":"Python3",
  "status": {
    "submissions":27,
    "solved":5,
    "accepted":7,
    "wrongAnswer":14,
    "timeLimit":0,
    "memoryLimit":0,
    "outputLimit":0,
    "compileError":0,
    "runtimeError":6
  },
  "url":null
}

auth: session

Get a session info. Returns a user entity when the corresponding session exists.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /self
Exception INVALID_REFRESH_TOKEN_ERROR: 400
Auth

auth: logout

Logging out current user.

Type DELETE
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /session
Exception -: -
Auth

user: register

Register a new user.

Type POST
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /users
Exception DUPLICATION_ERROR, VALIDATION_ERROR: 400
Auth

Request body parameters

Parameter Description Type Required Example
id User ID string yes s1220233_new
password Login password string yes ****
name User name string yes Michael
affiliation Affiliation of the user string no U-AIZU
mail E-mail address string no s1220233@u-aizu.ac.jp
policy The policy of submitted source codes string yes private
url The url of homepage string no https://RomTin.github.io
country The country living in string yes jp

Request body example

{
  "id":"s1220233_new",
  "password":"YOUR_PASSWORD",
  "name":"Michael",
  "affiliation":"U-AIZU",
  "mail":"s1220233@u-aizu.ac.jp",
  "policy":"private",
  "url":"https://RomTin.github.io",
  "country":"jp"
}

Response fields

Field Description Type Frequency Example
id User ID string 1 s1220233_new
name User name string 1 Michael
affiliation Affiliation of the user string 1 U-AIZU
registerDate The date of the user registration long integer 1 1501004260903
lastSubmitDate The date of the last submission long integer 1 null
policy The policy of submitted source codes string 1 private
country The country living in string 1 jp
birthYear Birth year long integer 1 null
displayLanguage Display language string 1 null
defaultProgrammingLanguage Default programming language string 1 null
status User status json 1 null
- submissions The number of submissions integer 1 -
- solved The number of solved problems integer 1 -
- accepted The number of accepted submissions integer 1 -
- wrongAnswer The number of wrong submissions integer 1 -
- timeLimit The number of submissions which exceeded time limit integer 1 -
- memoryLimit The number of submissions which exceeded memory limit integer 1 -
- outputLimit The number of submissions which exceeded the limit of output integer 1 -
- compileError The number of compilation failed submissions integer 1 -
- runtimeError The number of submissions which caused failure while running integer 1 -
url The url of homepage string 1 https://RomTin.github.io

Response example

{
  "id":"s1220233_new",
  "name":"Michael",
  "affiliation":"U-AIZU",
  "registerDate":1501004260903,
  "lastSubmitDate":null,
  "policy":"private",
  "country":"jp",
  "birthYear":null,
  "displayLanguage":null,
  "defaultProgrammingLanguage":null,
  "status":null,
  "url":"https://RomTin.github.io"
}

user: update

Update a user information.

Type PUT
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /users
Exception VALIDATION_ERROR: 400
Auth

Request body parameters

Parameter Description Type Required Example
id User ID string yes s1220233
name User name string yes michael
affiliation Affiliation of the user string no University of Aizu
mail E-mail address string no s1220233@u-aizu.ac.jp
policy The policy of submitted source codes string yes private
url The url of homepage string no https://RomTin.github.io
country The country living in string yes jp
birthYear Birth year integer no 1995
displayLanguage Display language string no Japanese
defaultProgrammingLanguage Default programming language string no Python3

Request body example

{
  "id":"s1220233",
  "name":"michael",
  "affiliation":"University of Aizu",
  "mail":"s1220233@u-aizu.ac.jp",
  "policy":"private",
  "url":"https://RomTin.github.io",
  "country":"jp",
  "birthYear":1995,
  "displayLanguage":"Japanese",
  "defaultProgrammingLanguage":"Python3"
}

Response fields

Field Description Type Frequency Example
id User ID string 1 s1220233
name User name string 1 michael
affiliation Affiliation of the user string 1 University of Aizu
registerDate The date of the user registration long integer 1 1397723423672
lastSubmitDate The date of the last submission long integer 1 1501090666170
policy The policy of submitted source codes string 1 private
country The country living in string 1 jp
birthYear Birth year long integer 1 1995
displayLanguage Display language string 1 Japanese
defaultProgrammingLanguage Default programming language string 1 Python3
status User status json 1 values below
- submissions The number of submissions integer 1 30
- solved The number of solved problems integer 1 5
- accepted The number of accepted submissions integer 1 7
- wrongAnswer The number of wrong submissions integer 1 14
- timeLimit The number of submissions which exceeded time limit integer 1 0
- memoryLimit The number of submissions which exceeded memory limit integer 1 0
- outputLimit The number of submissions which exceeded the limit of output integer 1 0
- compileError The number of compilation failed submissions integer 1 3
- runtimeError The number of submissions which caused failure while running integer 1 6
url The url of homepage string 1 https://RomTin.github.io

Response example

{
  "id": "s1220233",
  "name": "michael",
  "affiliation": "University of Aizu",
  "registerDate": 1397723423672,
  "lastSubmitDate": 1501090666170,
  "policy": "private",
  "country": "jp",
  "birthYear": 1995,
  "displayLanguage": "Japanese",
  "defaultProgrammingLanguage": "Python3",
  "status": {
    "submissions": 30,
    "solved": 5,
    "accepted": 7,
    "wrongAnswer": 14,
    "timeLimit": 0,
    "memoryLimit": 0,
    "outputLimit": 0,
    "compileError": 3,
    "runtimeError": 6
  },
  "url": "https://RomTin.github.io"
}

user: updatePassword

Update a password.

Type PUT
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /users/password
Exception VALIDATION_ERROR: 400
Auth

Request body parameters

Parameter Description Type Required Example
currentPassword Current password string yes ****
newPassword New password string yes ****
confirmPassword Password corresponding newPassword string yes ****

Request body example

{
  "currentPassword": "YOUR_PASSWORD",
  "newPassword": "YOUR_NEW_PASSWORD",
  "confirmPassword": "YOUR_NEW_PASSWORD"
}

Response fields

Field Description Type Frequency Example
id User ID string 1 s1220233
name User name string 1 michael
affiliation Affiliation of the user string 1 University of Aizu
registerDate The date of the user registration long integer 1 1397723423672
lastSubmitDate The date of the last submission long integer 1 1501090666170
policy The policy of submitted source codes string 1 private
country The country living in string 1 jp
birthYear Birth year long integer 1 1995
displayLanguage Display language string 1 Japanese
defaultProgrammingLanguage Default programming language string 1 Python3
status User status json 1 values below
- submissions The number of submissions integer 1 36
- solved The number of solved problems integer 1 6
- accepted The number of accepted submissions integer 1 8
- wrongAnswer The number of wrong submissions integer 1 14
- timeLimit The number of submissions which exceeded time limit integer 1 0
- memoryLimit The number of submissions which exceeded memory limit integer 1 0
- outputLimit The number of submissions which exceeded the limit of output integer 1 0
- compileError The number of compilation failed submissions integer 1 8
- runtimeError The number of submissions which caused failure while running integer 1 6
url The url of homepage string 1 https://RomTin.github.io

Response example

{
  "id": "s1220233",
  "name": "michael",
  "affiliation": "University of Aizu",
  "registerDate": 1397723423672,
  "lastSubmitDate": 1501100606157,
  "policy": "private",
  "country": "jp",
  "birthYear": 1995,
  "displayLanguage": "Japanese",
  "defaultProgrammingLanguage": "Python3",
  "status": {
    "submissions": 36,
    "solved": 6,
    "accepted": 8,
    "wrongAnswer": 14,
    "timeLimit": 0,
    "memoryLimit": 0,
    "outputLimit": 0,
    "compileError": 8,
    "runtimeError": 6
  },
  "url": "https://RomTin.github.io"
}

user: findAll

Get all users among several pages.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /users?page={page}&size={size}
Exception -: -
Auth

user: findById

Get user information by specifying user ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /users/{user_id}
Exception DATA_NOT_EXIST_ERROR: 404
Auth

user: findAllByOrderBySolved

Get a ranking which was sorted by the number of solved problems.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /users/ranking/solved?page={page}&size={size}
Exception -: -
Auth

user: findByUserIdOrderBySolved

Get a rank entity of the ranking which was sorted by the number of solved problems.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /users/ranking/solved/{userId}
Exception DATA_NOT_EXIST_ERROR: 404
Auth

user: findAllByOrderByRating

Get a ranking which was sorted by ratings.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /users/ranking/rating?page={page}&size={size}
Exception -: -
Auth

user: findByUserIdOrderByRating

Get a rank entity of the ranking which was sorted by ratings.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /users/ranking/rating/{userId}
Exception DATA_NOT_EXIST_ERROR: 404
Auth

problem/challenge: findTopPage

Get all challenges

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /challenges
Exception -: -
Auth 〇for+Status

problem/challenge: findByLargeCLAndMiddleCLPage

Get a list of challenges by specifying large_cl and middle_cl(source code classification), including related problems list. Please refer findTopPage to get information of classifications.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /challenges/cl/{large_cl}/{middle_cl}
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth 〇for+Status

Request body parameters

Parameter Description Type Required Example
large_cl Large classification string yes UOA
middle_cl Middle classification string yes UAPC

Request body example

https://judgeapi.u-aizu.ac.jp/challenges/cl/UOA/UAPC

Response fields

Field Description Type Frequency Example
body Response body consists of largeCl and contests json 1 values below
largeCl Information about large classification json 1 values below
- id Large classification ID string 1 UOA
- title Title of large classification string 1 University of Aizu Programming Contest
- filter Array of filters Array The number of filters Array of values below
filter: label string 1 PCKWU
filter: value string 1 pckwu
- middleCls Array of middle classifications Array The number of middleCls null
contests Array of information about contests Array The number of contests Array of values below
contests: abbr The abbreviated title of contest string 1 UAPC20132
contests: largeCl Large classification string 1 UOA
contests: middleCl Middle classification string 1 UAPC
contests: year The year of the contest string integer 2013
contests: progress integer 1 0
contests: numberOfProblems The number of included problems integer 1 17
contests: numberOfSolved The number of solved problems integer 1 0
contests: days Array of information about each contest days Array The number of days Array of values below
days: id Day ID integer 1 137
days: day The day of the contest integer 1 1
days: title The title of the day string 1
days: progress integer 1 0
days: numberOfProblems The number of included problems integer 1 7
days: numberOfSolved The number of solved problems integer 1 0
days: problems Array of information about problems Array The number of problems Array of values below
problems: id Problem ID integer 1 1509
problems: name Problem title string 1 Rental DVD Shop NEO
problems: problemTimeLimit The time limit integer 1 1
problems: problemMemoryLimit The memory limit integer 1 65536
problems: maxScore The max score integer 1 0
problems: solvedUser The number of users who solved the problem integer 1 94
problems: submissions The number of submissions to the problem integer 1 334
problems: recommendations The number of recommendations integer 1 0
problems: isSolved boolean 1 false
problems: bookmark boolean 1 false
problems: recommend boolean 1 false
problems: successRate The ratio of accepted submissions float 1 36.52694610778443
problems: score The score which is added to user's rating float 1 2.723404255319149
problems: userScore float 1 0

Response example

// some contents of the response body are omitted.
{
  "largeCl": {
    "id": "UOA",
    "title": "University of Aizu Programming Contest",
    "filter": [
      {
        "label": "PCKWU",
        "value": "pckwu"
      },
      {
        "label": "UAPC",
        "value": "uapc"
      }
    ],
    "middleCls": null
  },
  "contests": [{
    "abbr": "UAPC20132",
    "largeCl": "UOA",
    "middleCl": "UAPC",
    "year": 2013,
    "progress": 0,
    "numberOfProblems": 17,
    "numberOfSolved": 0,
    "days": [{
      "id": 137,
      "day": 1,
      "title": "",
      "progress": 0,
      "numberOfProblems": 7,
      "numberOfSolved": 0,
      "problems": [{
        "id": "1509",
        "name": "Rental DVD Shop NEO",
        "problemTimeLimit": 1,
        "problemMemoryLimit": 65536,
        "maxScore": 0,
        "solvedUser": 94,
        "submissions": 334,
        "recommendations": 0,
        "isSolved": false,
        "bookmark": false,
        "recommend": false,
        "successRate": 36.52694610778443,
        "score": 2.723404255319149,
        "userScore": 0
      }, ...]
    }, ...]
  }, ...]
}

problem/course: findAllCoursesPage

Get a list of courses.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /courses?filter={flag}
Exception -: -
Auth 〇for+Status

problem/course: findByCourseIdPage

Get a list of topics by specifying course ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /courses/{course_id}
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth 〇for+Status

search: findAllProblems

Get all challenge problems. The number of returned problems is limited.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /problems?page={page}&size={size}
Exception -: -
Auth

search: findByVolume

Get a list of problems by specifying volume number.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /problems/volumes/{volume}
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth 〇for+Status

search: findByLargeCl

Get a list of problems by specifying largeCl number

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /problems/cl/{largeCl}
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth 〇for+Status

search: findByLargeClAndMiddleCl

Get a list of problems by specifying largeCl number and middleCl number.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /problems/cl/{largeCl}/{middleCl}
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth 〇for+Status

search: findByCourseIdProblems

Get a list of topics by specifying course name.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /problems/courses/{courseShortName}
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth 〇for+Status

search: findByTitle

Get a list of topic problems whose title includes specified keywords.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /problems/titles/{keyword}
Exception -: -
Auth 〇for+Status

search: findByTag

Get a list of problems which are related by specifying tags.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /problems/tags/{tag}
Exception -: -
Auth 〇for+Status

search: findByCategory

Get a list of problems which are related by specifying category ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /problems/categories/{categoryId}
Exception -: -
Auth 〇for+Status

solution: findAllSolutions

Get all solution programs whose judge status is Accepted. To get all of submitted programs, please refer to APIs of submit&status category.

# values of submission status
STATE_COMPILEERROR = 0
STATE_WRONGANSWER = 1
STATE_TIMELIMIT = 2
STATE_MEMORYLIMIT = 3
STATE_ACCEPTED = 4
STATE_WAITING = 5
STATE_OUTPUTLIMIT = 6
STATE_RUNTIMEERROR = 7
STATE_PRESENTATIONERROR = 8
STATE_RUNNING = 9
Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /solutions?page={page}&size={size}
Exception -: -
Auth

solution: findByUserIdSolutions

Get all solution programs by specifying user ID.

# values of submission status
STATE_COMPILEERROR = 0
STATE_WRONGANSWER = 1
STATE_TIMELIMIT = 2
STATE_MEMORYLIMIT = 3
STATE_ACCEPTED = 4
STATE_WAITING = 5
STATE_OUTPUTLIMIT = 6
STATE_RUNTIMEERROR = 7
STATE_PRESENTATIONERROR = 8
STATE_RUNNING = 9
Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /solutions/users/{user_id}?page={page}&size={size}
Exception -: -
Auth

solution: findByUserIdAndLanguageSolutions

Get all solution programs by specifying user ID and programming language.

# values of submission status
STATE_COMPILEERROR = 0
STATE_WRONGANSWER = 1
STATE_TIMELIMIT = 2
STATE_MEMORYLIMIT = 3
STATE_ACCEPTED = 4
STATE_WAITING = 5
STATE_OUTPUTLIMIT = 6
STATE_RUNTIMEERROR = 7
STATE_PRESENTATIONERROR = 8
STATE_RUNNING = 9
Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /solutions/users/{user_id}/lang/{lang}?page={page}&size={size}
Exception -: -
Auth

solution: findByUserIdAndProblemIdSolutions

Get all solution programs by specifying user ID and problem ID.

# values of submission status
STATE_COMPILEERROR = 0
STATE_WRONGANSWER = 1
STATE_TIMELIMIT = 2
STATE_MEMORYLIMIT = 3
STATE_ACCEPTED = 4
STATE_WAITING = 5
STATE_OUTPUTLIMIT = 6
STATE_RUNTIMEERROR = 7
STATE_PRESENTATIONERROR = 8
STATE_RUNNING = 9
Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /solutions/users/{user_id}/problems/{problem_id}
Exception -: -
Auth

solution: findByProblemIdSolutions

Get all solution programs by specifying problem ID.

# values of submission status
STATE_COMPILEERROR = 0
STATE_WRONGANSWER = 1
STATE_TIMELIMIT = 2
STATE_MEMORYLIMIT = 3
STATE_ACCEPTED = 4
STATE_WAITING = 5
STATE_OUTPUTLIMIT = 6
STATE_RUNTIMEERROR = 7
STATE_PRESENTATIONERROR = 8
STATE_RUNNING = 9
Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /solutions/problems/{problem_id}?page={page}&size={size}
Exception -: -
Auth

solution: findByProblemIdAndLanguageSolutions

Get all solution programs by specifying problem ID and programming language.

# values of submission status
STATE_COMPILEERROR = 0
STATE_WRONGANSWER = 1
STATE_TIMELIMIT = 2
STATE_MEMORYLIMIT = 3
STATE_ACCEPTED = 4
STATE_WAITING = 5
STATE_OUTPUTLIMIT = 6
STATE_RUNTIMEERROR = 7
STATE_PRESENTATIONERROR = 8
STATE_RUNNING = 9
Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /solutions/problems/{problem_id}/lang/{lang}?page={page}&size={size}
Exception -: -
Auth

solution: findByProblemIdAndLangSolutionsWithRating

Get all solution programs with users' ratings by specifying problem ID and programming language.

# values of submission status
STATE_COMPILEERROR = 0
STATE_WRONGANSWER = 1
STATE_TIMELIMIT = 2
STATE_MEMORYLIMIT = 3
STATE_ACCEPTED = 4
STATE_WAITING = 5
STATE_OUTPUTLIMIT = 6
STATE_RUNTIMEERROR = 7
STATE_PRESENTATIONERROR = 8
STATE_RUNNING = 9
Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /solutions/problems/{problem_id}/lang/{lang}/rating?page={page}&size={size}
Exception -: -
Auth

description: findByProblemIdDescription

Get problem's description by specifying problem ID and a language.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /resources/descriptions/{lang}/{problem_id}
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth

description: findByImageId

Get problem's images by specifying problem ID and a language.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /resources/image/{lang}/{image_id}
Exception -: -
Auth

commentary: findHtmlByProblemIdAndPLanguageAndLanguage

Get commentaries by specifying problem ID, a language and programming language.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /resources/commentaries/{dlang}/{problem_id}/{plang}
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth

commentary: findHtmlByLanguageAndProblemIdAndPatternAndTypeAndFilter

Get commentaries by specifying problem ID, a language, pattern, type and filter.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /resources/commentaries/{dlang}/{problem_id}/{pattern}/{type}/{filter}
Exception -: -
Auth

submit&status: submit

Submit a source code.

# values of submission status
STATE_COMPILEERROR = 0
STATE_WRONGANSWER = 1
STATE_TIMELIMIT = 2
STATE_MEMORYLIMIT = 3
STATE_ACCEPTED = 4
STATE_WAITING = 5
STATE_OUTPUTLIMIT = 6
STATE_RUNTIMEERROR = 7
STATE_PRESENTATIONERROR = 8
STATE_RUNNING = 9
Type POST
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /submissions
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth

Request body parameters

Parameter Description Type Required Example
problemId Problem ID to submit string yes ITP1_1_A
language Programming language written in string yes C
sourceCode Your answer for the problem string yes #include <stdio.h>\nint main(){\n printf(\"Hello World\\n\");\n return 0;\n}

Request body example

{
  "problemId": "ITP1_1_A",
  "language": "C",
  "sourceCode": "#include <stdio.h>\nint main(){\n  printf(\"Hello World\\n\");\n  return 0;\n}"
}

Response fields

Field Description Type Frequency Example
token Access token for checking judge result asynchronously string 1 30cc9dbc-330f-425d-99e2-39abb5185a0e

Response example

{
  "token": "30cc9dbc-330f-425d-99e2-39abb5185a0e"
}

submit&status: findRecentSubmissionRecords

Get all submission histories in a queue.

# values of submission status
STATE_COMPILEERROR = 0
STATE_WRONGANSWER = 1
STATE_TIMELIMIT = 2
STATE_MEMORYLIMIT = 3
STATE_ACCEPTED = 4
STATE_WAITING = 5
STATE_OUTPUTLIMIT = 6
STATE_RUNTIMEERROR = 7
STATE_PRESENTATIONERROR = 8
STATE_RUNNING = 9
Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /submission_records/recent
Exception JUDGE_QUEUE_ERROR: 503
Auth

submit&status: findByUserIdSubmissionRecords

Get submssion histories by specifying user ID.

# values of submission status
STATE_COMPILEERROR = 0
STATE_WRONGANSWER = 1
STATE_TIMELIMIT = 2
STATE_MEMORYLIMIT = 3
STATE_ACCEPTED = 4
STATE_WAITING = 5
STATE_OUTPUTLIMIT = 6
STATE_RUNTIMEERROR = 7
STATE_PRESENTATIONERROR = 8
STATE_RUNNING = 9
Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /submission_records/users/{user_id}?page={page}&size={size}
Exception -: -
Auth

submit&status: findByProblemIdSubmissionRecords

Get submission histories by specifying problem ID.

# values of submission status
STATE_COMPILEERROR = 0
STATE_WRONGANSWER = 1
STATE_TIMELIMIT = 2
STATE_MEMORYLIMIT = 3
STATE_ACCEPTED = 4
STATE_WAITING = 5
STATE_OUTPUTLIMIT = 6
STATE_RUNTIMEERROR = 7
STATE_PRESENTATIONERROR = 8
STATE_RUNNING = 9
Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /submission_records/problems/{problem_id}?page={page}&size={size}
Exception -: -
Auth

submit&status: findByUserIdAndProblemIdSubmissionRecords

Get submission histories by specifying user ID and problem ID.

# values of submission status
STATE_COMPILEERROR = 0
STATE_WRONGANSWER = 1
STATE_TIMELIMIT = 2
STATE_MEMORYLIMIT = 3
STATE_ACCEPTED = 4
STATE_WAITING = 5
STATE_OUTPUTLIMIT = 6
STATE_RUNTIMEERROR = 7
STATE_PRESENTATIONERROR = 8
STATE_RUNNING = 9
Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /submission_records/users/{user_id}/problems/{problem_id}?page={page}&size={size}
Exception -: -
Auth

submit&status: findByJudgeIdReivew

Get a source code by specifying Judge ID.

# values of submission status
STATE_COMPILEERROR = 0
STATE_WRONGANSWER = 1
STATE_TIMELIMIT = 2
STATE_MEMORYLIMIT = 3
STATE_ACCEPTED = 4
STATE_WAITING = 5
STATE_OUTPUTLIMIT = 6
STATE_RUNTIMEERROR = 7
STATE_PRESENTATIONERROR = 8
STATE_RUNNING = 9
Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /reviews/{judge_id}
Exception DATA_NOT_EXIST_ERROR: 404
Auth

submit&status: findByJudgeIdVerdict

Get a detail of judge by specifying Judge ID.

# values of submission status
STATE_COMPILEERROR = 0
STATE_WRONGANSWER = 1
STATE_TIMELIMIT = 2
STATE_MEMORYLIMIT = 3
STATE_ACCEPTED = 4
STATE_WAITING = 5
STATE_OUTPUTLIMIT = 6
STATE_RUNTIMEERROR = 7
STATE_PRESENTATIONERROR = 8
STATE_RUNNING = 9
Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /verdicts/{judge_id}
Exception DATA_NOT_EXIST_ERROR: 404
Auth

rating and statistics: findByUserIdCategoryRating

Get a rating by specifying user ID.

Type GET
Endpoint https://judgedat.u-aizu.ac.jp
Server judgedat
URI /rating/users/{user_id}/category
Exception DATA_NOT_EXIST_ERROR: 404
Auth

rating and statistics: findByUserIdCategoryWeekly

Get a weeekly rating by specifying user ID.

Type GET
Endpoint https://judgedat.u-aizu.ac.jp
Server judgedat
URI /rating/users/{user_id}/weekly
Exception DATA_NOT_EXIST_ERROR: 404
Auth

rating and statistics: findByUserIdStatistics

Get a statistics(daily submissions, languages) by specifying user ID.

Type GET
Endpoint https://judgedat.u-aizu.ac.jp
Server judgedat
URI /rating/users/{user_id}/statistics
Exception DATA_NOT_EXIST_ERROR: 404
Auth

rating and statistics: findByProblemIdCategoryRating

Get a rating by specifying problem ID.

Type GET
Endpoint https://judgedat.u-aizu.ac.jp
Server judgedat
URI /rating/problems/{problem_id}/category
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth

rating and statistics: findByProblemIdStatistics

Get a statistics(result statistics, languages, yearly statistics, destributions) by specifying problem ID.

Type GET
Endpoint https://judgedat.u-aizu.ac.jp
Server judgedat
URI /rating/problems/{problem_id}/statistics
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth

rating and statistics: getCustomRanking

Get rankings of all criterions. Top 100 ratings of users are listed in the rankings.

Type GET
Endpoint https://judgedat.u-aizu.ac.jp
Server judgedat
URI /rating/rankings
Exception -: -
Auth

rating and statistics: getCustomRankingContest

Get rankings of all contests.

Type GET
Endpoint https://judgedat.u-aizu.ac.jp
Server judgedat
URI /rating/rankings/contests
Exception -: -
Auth

rating and statistics: getCustomRankingByContest

Get a ranking of specified contest. You can select a contest from JOI, PCK, ICPC or JAG.

Type GET
Endpoint https://judgedat.u-aizu.ac.jp
Server judgedat
URI /rating/rankings/contests/{contest}
Exception -: -
Auth

rating and statistics: getCustomRankingLanguage

Get rankings of all programming languages.

Type GET
Endpoint https://judgedat.u-aizu.ac.jp
Server judgedat
URI /rating/rankings/languages
Exception -: -
Auth

rating and statistics: getCustomRankingByLanguage

Get a ranking of speficied programming language. You can select a programming language from available ones on AOJ.

Type GET
Endpoint https://judgedat.u-aizu.ac.jp
Server judgedat
URI /rating/rankings/languages/{language}
Exception -: -
Auth

rating and statistics: getCustomRankingContribution

Get rankings of all contributions.

Type GET
Endpoint https://judgedat.u-aizu.ac.jp
Server judgedat
URI /rating/rankings/contributions
Exception -: -
Auth

rating and statistics: getCustomRankingByContribution

Get a ranking of specified contribution. You can select a contribution from tag, review or recommendation.

Type GET
Endpoint https://judgedat.u-aizu.ac.jp
Server judgedat
URI /rating/rankings/contributions/{contribution}
Exception -: -
Auth

attachment: findAllCategory

Get a list of categories.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /categories
Exception -: -
Auth

attachment: findAllCategoryOrderBySerial

Get a list of categories sorted by clockwise of radar chart.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /categories/serials
Exception -: -
Auth

attachment: saveCategory

Register a category by specifying user ID, problem ID and category ID.

Type POST
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /categories
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth

Request body parameters

Parameter Description Type Required Example
userId User ID string yes s1220233
problemId Problem ID string yes ITP1_1_A
categoryId Category ID string yes 0

Request body example

{
  "userId": "s1220233",
  "problemId": "ITP1_1_A",
  "categoryId": "0"
}

Response fields

Field Description Type Frequency Example
userId User ID string 1 s1220233
problemId Problem ID string 1 ITP1_1_A
categoryId Category ID string 1 0

Response example

{
  "problemId": "ITP1_1_A",
  "userId": "s1220233",
  "categoryId": "0"
}

attachment: deleteCategory

Delete a category by specifying user ID, problem ID and category ID.

Type DELETE
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /categories
Exception -: -
Auth

attachment: findByCategoryIdCategory

Get a list of related category by specifying category ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /categories/categories/{category_id}
Exception -: -
Auth

attachment: findByProblemIdCategory

Get a list of related category by specifying problem ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /categories/problems/{problem_id}
Exception -: -
Auth

attachment: findByUserIdCategory

Get a list of categories which were registered by specified user ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /categories/users/{user_id}
Exception -: -
Auth

attachment: saveFreetag

Register a tag by specifying user ID, problem ID and category ID.

Type POST
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /tags
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth

Request body parameters

Parameter Description Type Required Example
userId User ID string yes s1220233
problemId Problem ID string yes ITP1_1_A
tag The string of tag to add string yes SampleTag

Request body example

{
  "userId": "s1220233",
  "problemId": "ITP1_1_A",
  "tag": "SampleTag"
}

Response fields

Field Description Type Frequency Example
userId User ID string 1 s1220233
problemId Problem ID string 1 ITP1_1_A
tag The string of tag string 1 SampleTag

Response example

{
  "problemId": "ITP1_1_A",
  "userId": "s1220233",
  "tag": "SampleTag"
}

attachment: deleteFreetag

Delete a tag by specifying user ID, problem ID and category ID.

Type DELETE
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /tags
Exception -: -
Auth

attachment: findByFreetag

Get a list of related problems by specifying tag.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /tags/tags/{tag}
Exception -: -
Auth

attachment: findByUserIdFreetag

Get a list of tags which were registered by specified user ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /tags/users/{user_id}
Exception -: -
Auth

attachment: findByProblemIdFreetag

Get a list of related tag by specifying problem ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /tags/problems/{problem_id}
Exception -: -
Auth

attachment: saveRecommendation

Register a recommendation by specifying user ID and problem ID.

Type POST
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /recommendations
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth

Request body parameters

Parameter Description Type Required Example
userId User ID string yes s1220233
problemId Problem ID string yes ITP1_1_A

Request body example

{
  "userId": "s1220233",
  "problemId": "ITP1_1_A"
}

Response fields

Field Description Type Frequency Example
userId User ID string 1 s1220233
problemId Problem ID string 1 ITP1_1_A
type Type number integer 1 0

Response example

{
  "problemId": "ITP1_1_A",
  "userId": "s1220233",
  "type": 0
}

attachment: deleteRecommendation

Delete a recommendation by specifying user ID and problem ID.

Type DELETE
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /recommendations
Exception -: -
Auth

attachment: findByProblemIdRecommendation

Get a list of users who recommended specified problem by problem ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /recommendations/problems/{problem_id}
Exception -: -
Auth

attachment: findByUserIdRecommendation

Get a list of recommended problems by specifying user ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /recommendations/users/{user_id}
Exception -: -
Auth

attachment: saveBookmark

Register a bookmark by specifying user ID and problem ID.

Type POST
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /bookmarks
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth

Request body parameters

Parameter Description Type Required Example
userId User ID string yes s1220233
problemId Problem ID string yes ITP1_1_A
tag The bookmark tag string no SampleTag

Request body example

{
  "userId": "s1220233",
  "problemId": "ITP1_1_A",
  "tag": "SampleTag"
}

Response fields

Field Description Type Frequency Example
userId User ID string 1 s1220233
problemId Problem ID string 1 ITP1_1_A
tag The bookmark tag string 1 SampleTag
createTime UNIX time when the bookmark was created long integer 1 150109837125

Response example

{
  "problemId": "ITP1_1_A",
  "userId": "s1220233",
  "tag": "default",
  "createTime": 1501098371215
}

attachment: deleteBookmark

Delete a bookmark by specifying user ID and problem ID.

Type DELETE
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /bookmarks
Exception -: -
Auth

attachment: findByUserIdBookmark

Get a list of bookmarked problems which were registered by specified user ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /bookmarks/problems/{problem_id}
Exception -: -
Auth

attachment: findByProblemIdBookmark

Get a list of users who bookmarked specified problem by problem ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /bookmarks/users/{user_id}
Exception -: -
Auth

data: findByProblemIdSample

-

Type GET
Endpoint unavailable
Server judgedat
URI unavailable
Exception -: -
Auth

data: findByProblemIdTestcaseHeader

Get header information of test case by specifying problem ID.

Type GET
Endpoint https://judgedat.u-aizu.ac.jp
Server judgedat
URI /testcases/{problemId}/header
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth

data: findByProblemIdTestcase

Get test cases by specifying problem ID and serial.

Type GET
Endpoint https://judgedat.u-aizu.ac.jp
Server judgedat
URI /testcases/{problemId}/{serial}
Exception RESOURCE_NOT_EXIST_ERROR: 404
Auth

arena: findAllArenas

Get a list of arena. (arena: contests + exercises)

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas
Exception -: -
Auth

arena: findByIdArena

Get a record of arena by speifying arena ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas/{arenaId}
Exception -: -
Auth

arena: findByArenaIdProblems

Get a list of problems in an arena by specifying arena ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas/{arenaId}/problems
Exception -: -
Auth

arena: findByArenaIdAndProblemIdDescription

Get a problem's description by specifying arena ID, a language and problem ID. Notice that problem IDs are ones which you can get by referring lists of problems in arenas.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas/{arenaId}/descriptions/{displayLang}/{id}
Exception -: -
Auth

arena: findByArenaIdSubmissions

Get a list of submissions in an arena by speifying arena ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas/{arenaId}/submissions?page={page}&size={size}
Exception -: -
Auth

arena: findByArenaIdAndUserIdSubmissions

Get a user's submissions list who participates in an arena by specifying arena ID and user ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas/{arenaId}/submissions/users/{userId}
Exception -: -
Auth

arena: findByArenaIdStatus

Get a raw data of a ranking by spefcifying arena ID. (raw data of ranking: a list of states. arena ID, user ID, problem ID and statistical information.)

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas/{arenaId}/status
Exception -: -
Auth

arena: findByArenaIdEntries

Get a list of entry users of an arena by specifying arena ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas/{arenaId}/entries
Exception -: -
Auth

arena: findByUserIdEntries

Get a list of entry arena of an user by specifying user ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas/entries/users/{userId}
Exception -: -
Auth

arena: registerArena

Register an arena.

Type POST
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas
Exception -: -
Auth

arena: updateArena

Update an arena.

Type PUT
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas
Exception -: -
Auth

arena: entryArena

Enter for an arena.

Type POST
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas/entries
Exception -: -
Auth

arena: updateArenaProblem

Register (or Update) a problem to specified arena.

Type POST
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas/{arenaId}/problems
Exception -: -
Auth

arena: submitArena

Submit a source code of specified arena.

Type POST
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas/{arenaId}/submissions
Exception -: -
Auth

arena: findByArenaIdLeaderBoard

Get a ranking table of an arena by specifying arena ID.

Type GET
Endpoint https://judgeapi.u-aizu.ac.jp
Server judgeapi
URI /arenas/{arenaId}/leaderboard
Exception -: -
Auth

Security: INVALID_ACCESS_TOKEN_ERROR

Invalid access token was sent.

Error code 1101
HTTP status code BAD_REQUEST: 400

Security: INVALID_REFRESH_TOKEN_ERROR

Invalid refresh token was sent.

Error code 1102
HTTP status code BAD_REQUEST: 400

Security: ACCESS_DENIED_ERROR

Not having a privilege to execute API

Error code 1301
HTTP status code UNAUTHORIZED: 405

Security: USER_NOT_FOUND_ERROR

User was not found corresponding sent user ID and password.

Error code 1401
HTTP status code BAD_REQUEST: 400

Parameter: VALIDATION_ERROR

Failed to validate items

Error code 2001
HTTP status code BAD_REQUEST: 400

Parameter: DUPLICATION_ERROR

Duplicated values were specified in duplication prohibited area.

Error code 2002
HTTP status code BAD_REQUEST: 400

Parameter: DATA_NOT_EXIST_ERROR

Non existing value was specified.

Error code 2003
HTTP status code NOT_FOUND: 404

Parameter: RESOURCE_NOT_EXIST_ERROR

Non existing resource was speficied.

Error code 2004
HTTP status code NOT_FOUND: 404

Parameter: METHOD_NOT_ALLOWED_ERROR

Invalid URI was specified.

Error code 2005
HTTP status code METHOD_NOT_ALLOWED: 405

Database: DATABASE_CONNECTION_ERROR

Failed to connect the database

Error code 3001
HTTP status code BAD_REQUEST: 400

Database: DATABASE_QUERY_ERROR

Error was occurred while executing queries.

Error code 3002
HTTP status code BAD_REQUEST: 400

API: API_EXECUTION_ERROR

Something wrong was occurred while executing API.

Error code 4001
HTTP status code INTERNAL_SERVER_ERROR: 500

API: JUDGE_QUEUE_ERROR

API is currently under maintenance.

Error code 4002
HTTP status code SERVICE_UNAVAILABLE: 503

Unknown: UNKNOWN_ERROR

Unknown error was occurred.

Error code 9999
HTTP status code INTERNAL_SERVER_ERROR: 500
Please avoid accessing /reviews (and review.jsp of the old server) to get a set of source codes. We provide the archive of public source codes here.

About

All of public source codes that were submitted by AOJ users are available for study and educational use. You can download those data as a zip archive file. If you need other source codes, please contact us by e-mail using the contact information below.

Usage

Please click the following link, and follow download guides on that page to download the archive file.