Back to top

Judge0 API docs

About

Judge0 API is an open source web API for code compilation and execution. Source code is available on GitHub.

Dummy client is available here and can be used to try and test features of Judge0 API.

Version

This document describes Judge0 API version v1.1.5.

Date and time formats

ISO 8601 standard is used.

Example: 2016-09-11T10:19:35Z

License

Judge0 API is licensed under the GNU General Public License v3.0.

Donate

If you like Judge0, please consider making a donation to support this project.


Authentication

Authenticate

Authenticate
POST/authenticate{?X-Auth-Token}

Some Judge0 API hosts can protect their API calls with authentication tokens. If that’s the case then you should provide X-Auth-Token for every API request.

Please note that X-Auth-Token is default parameter name that needs to be sent, and that Judge0 API admins can change the name of this parameter. Please contact admins of Judge0 API you are using to give you correct parameter name and valid authentication tokens for successful authentication.

With this API call you can check if your authentication token is valid.

Example URI

POST https://api.judge0.com/authenticate?X-Auth-Token=f6583e60-b13b-4228-b554-2eb332ca64e7
URI Parameters
HideShow
X-Auth-Token
string (required) Example: f6583e60-b13b-4228-b554-2eb332ca64e7

Judge0 API authentication token

Response  200
HideShow

If your authentication token is valid or authentication is disabled.

Response  401
HideShow

Authentication failed. Please read about authentication process.

Authorization

Authorize

Authorize
POST/authorize{?X-Auth-User}

To issue some API calls you need to be authorized. For example, you need to be authorized to list all submissions on Judge0 API.

Please note that X-Auth-User is default parameter name that needs to be sent, and that Judge0 API admins can change the name of this parameter. Please contact admins of Judge0 API you are using to give you correct parameter name and valid authorization tokens for successful authorization.

With this API call you can check if your authorization token is valid. If authentication is enabled you should also authenticate in this API call.

Example URI

POST https://api.judge0.com/authorize?X-Auth-User=a1133bc6-a0f6-46bf-a2d8-6157418c6fe2
URI Parameters
HideShow
X-Auth-User
string (required) Example: a1133bc6-a0f6-46bf-a2d8-6157418c6fe2

User’s authorization token

Response  200
HideShow

If your authorization token is valid.

Response  401
HideShow

Authentication failed. Please read about authentication process.

Response  403
HideShow

Authorization failed. Please read about authorization process.

Submissions

Submission

Submission represents a model for running source code in specific programming language under certain runtime constraints.

Submission model has 27 attributes. Attributes 1-14 (listed below) are used when creating new submissions - you can set them. Out of those 14 attributes only 2 are required - source_code and language_id. Attributes 15-27 represent detailed information about runtime of submission after it’s execution.

With attributes 5-14 you can configure submission runtime constraints. Those attributes are called configuration attributes or configuration variables. Please read more about them in configuration section.

Submission model has following attributes:

# Name Type Unit Description Default Value
1 source_code text Program’s source code. No default. This attribute is required.
2 language_id integer Language ID. No default. This attribute is required
3 stdin text Input for program. null. Program won’t receive anything to standard input.
4 expected_output text Expected output of program. Used when you want to compare with stdout. null. Program’s stdout won’t be compared with expected_output.
5 cpu_time_limit float second Default runtime limit for every program. Time in which the OS assigns the processor to different tasks is not counted. Depends on configuration.
6 cpu_extra_time float second When a time limit is exceeded, wait for extra time, before killing the program. This has the advantage that the real execution time is reported, even though it slightly exceeds the limit. Depends on configuration.
7 wall_time_limit float second Limit wall-clock time in seconds. Decimal numbers are allowed. This clock measures the time from the start of the program to its exit, so it does not stop when the program has lost the CPU or when it is waiting for an external event. We recommend to use cpu_time_limit as the main limit, but set wall_time_limit to a much higher value as a precaution against sleeping programs. Depends on configuration.
8 memory_limit float kilobyte Limit address space of the program. Depends on configuration.
9 stack_limit integer kilobyte Limit process stack. Depends on configuration.
10 max_processes_and_or_threads integer Maximum number of processes and/or threads program can create. Depends on configuration.
11 enable_per_process_and_thread_time_limit boolean If true then cpu_time_limit will be used as per process and thread. Depends on configuration.
12 enable_per_process_and_thread_memory_limit boolean If true then memory_limit will be used as per process and thread. Depends on configuration.
13 max_file_size integer kilobyte Limit file size created or modified by the program. Depends on configuration.
14 number_of_runs integer Run each program number_of_runs times and take average of time and memory. Depends on configuration.
15 stdout text Standard output of the program after execution.
16 stderr text Standard error of the program after execution.
17 compile_output text Compiler output after compilation.
18 message text If submission status is Internal Error then this message comes from Judge0 API itself, otherwise this is status message from Isolate.
19 exit_code integer The program’s exit code.
20 exit_signal integer Signal code that the program recieved before exiting.
21 status object Submission status.
22 created_at datetime Date and time when submission was created.
23 finished_at datetime Date and time when submission was processed. null if submission is still in queue or if submission is processing.
24 token string Unique submission token used for getting specific submission.
25 time float second Program’s runtime.
26 wall_time float second Program’s wall time. Will be greater or equal to time.
27 memory float kilobyte Memory used by the program after execution.

Create Submission
POST/submissions/{?base64_encoded,wait}

Creates new submission. Created submission waits in queue to be processed. On successful creation, you are returned submission token which can be used to check submission status.

If submission’s source_code, stdin or expected_output contains non printable characters, or characters which cannot be sent with JSON, then set base64_encoded parameter to true and send these attributes Base64 encoded. Your responsibility is to encode each of mentioned attributes (source_code, stdin and expected_output) even if just one of them contains non printable characters. By default, this parameter is set to false and Judge0 API assumes you are sending plain text data.

By default you are returned submission token on successful submission creation. With this token you can check submission status. Instead of checking submission status by making another request, send wait query parameter and set it to true which will enable you to get submission status immediately as part of response to the request you made. Please note that this feature may or may not be enabled on all Judge0 API hosts. So before using this feature please check configuration of Judge0 API you are using. On an official Judge0 API this feature is enabled.

Example URI

POST https://api.judge0.com/submissions/?base64_encoded=false&wait=false
URI Parameters
HideShow
base64_encoded
boolean (optional) Default: false Example: false

Set to true if you want to send Base64 encoded data to Judge0 API.

wait
boolean (optional) Default: false Example: false

Set to true to immediately get submission result.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "source_code": "#include <stdio.h>\n\nint main(void) {\n  char name[10];\n  scanf(\"%s\", name);\n  printf(\"hello, %s\n\", name);\n  return 0;\n}",
  "language_id": 4,
  "stdin": "world"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "token": "d85cd024-1548-4165-96c7-7bc88673f194"
}
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "source_code": "#include <stdio.h>\n\nint main(void) {\n  char name[10];\n  scanf(\"%s\", name);\n  printf(\"hello, %s\n\", name);\n  return 0;\n}"
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "language_id": [
    "can't be blank"
  ]
}
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "source_code": "#include <stdio.h>\n\nint main(void) {\n  char name[10];\n  scanf(\"%s\", name);\n  printf(\"hello, %s\n\", name);\n  return 0;\n}",
  "language_id": 150000,
  "stdin": "world",
  "expected_output": "hello, world"
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "language_id": [
    "language with id 150000 doesn't exist"
  ]
}
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "source_code": "#include <stdio.h>\n\nint main(void) {\n  char name[10];\n  scanf(\"%s\", name);\n  printf(\"hello, %s\n\", name);\n  return 0;\n}",
  "language_id": 4,
  "number_of_runs": 1,
  "stdin": "Judge0",
  "expected_output": "hello, Judge0",
  "cpu_time_limit": 1,
  "cpu_extra_time": 0.5,
  "wall_time_limit": 100000,
  "memory_limit": 128000,
  "stack_limit": 128000,
  "enable_per_process_and_thread_time_limit": false,
  "enable_per_process_and_thread_memory_limit": false,
  "max_file_size": 1024
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "wall_time_limit": [
    "must be less than or equal to 150"
  ]
}
Request
HideShow

Sending Base64 encoded source_code and stdin. Note that in this request base64_encoded query parameter must be set to true.

Headers
Content-Type: appliction/json
Body
{
  "source_code": "I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CiAgY2hhciBuYW1lWzEwXTsKICBzY2FuZigiJXMiLCBuYW1lKTsKICBwcmludGYoImhlbGxvLCAlc1xuIiwgbmFtZSk7CiAgcmV0dXJuIDA7Cn0=",
  "language_id": 4,
  "input": "SnVkZ2Uw"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "token": "f3fe0215-72f3-4fe6-97f5-353df6682db4"
}
Request
HideShow

Waiting for submission to finish. Note that in this request wait query parameter must be set to true.

Headers
Content-Type: application/json
Body
{
  "source_code": "#include <stdio.h>\n\nint main(void) {\n  char name[10];\n  scanf(\"%s\", name);\n  printf(\"hello, %s\n\", name);\n  return 0;\n}",
  "language_id": "4",
  "stdin": "Judge0",
  "expected_output": "hello, Judge0"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "stdout": "hello, Judge0\n",
  "time": "0.001",
  "memory": 380,
  "stderr": null,
  "token": "eb0dd001-66db-47f4-8a69-b736c9bc23f6",
  "compile_output": null,
  "message": null,
  "status": {
    "id": 3,
    "description": "Accepted"
  }
}
Response  400
HideShow

If wait is not allowed.

Headers
Content-Type: application/json
Body
{
  "error": "wait not allowed"
}
Response  401
HideShow

Authentication failed. Please read about authentication process.

Get Specific Submission
GET/submissions/{token}{?base64_encoded,fields}

Returns details about submission.

Just like in create submission you can receive Base64 encoded data for every text type attribute (check the table to see which attributes are text type). By default, this parameter is set to false and Judge0 API will send you raw data.

By default Judge0 API is sending you 8 attributes for submission. As you may read in Submission section, submission model has 27 attributes. By sending fields query parameter you can specify exactly which attributes you want from Judge0 API.

Example URI

GET https://api.judge0.com/submissions/d85cd024-1548-4165-96c7-7bc88673f194?base64_encoded=false&fields=stdout,stderr,status_id,language_id
URI Parameters
HideShow
token
string (required) Example: d85cd024-1548-4165-96c7-7bc88673f194

Token of submission. You got this token when you created submission.

base64_encoded
boolean (optional) Example: false

Set to true if you want to receive Base64 encoded data from Judge0 API.

fields
string (optional) Default: stdout,time,memory,stderr,token,compile_output,message,status Example: stdout,stderr,status_id,language_id

Return only the desired attributes.

Response  200
HideShow
Headers
Content-Type: applicatiion/json
Body
{
  "stdout": "hello, world\n",
  "status_id": 5,
  "language_id": 4,
  "stderr": null
}
Response  200
HideShow

This is the default response. Leave fields parameter empty if you want to get default response.

Headers
Content-Type: application/json
Body
{
  "stdout": "hello, Judge0\n",
  "time": "0.001",
  "memory": 376,
  "stderr": null,
  "token": "8531f293-1585-4d36-a34c-73726792e6c9",
  "compile_output": null,
  "message": null,
  "status": {
    "id": 3,
    "description": "Accepted"
  }
}
Response  200
HideShow

Recieving Base64 encoded data for text type attributes. Note that in this request base64_encoded query parameter must be set to true.

Headers
Content-Type: application/json
Body
{
  "stdout": "aGVsbG8sIEp1ZGdlMAo=\n",
  "time": "0.002",
  "memory": 376,
  "stderr": null,
  "token": "4e00f214-b8cb-4fcb-977b-429113c81ece",
  "compile_output": null,
  "message": null,
  "status": {
    "id": 3,
    "description": "Accepted"
  }
}
Response  500
HideShow

If you get status 500 on this request, it is probably because some text type attribute in submission contains some non printable characters which cannot be used in JSON. In that case, set base64_encoded query parameter to true, and decode stdout and stderr on client side.

Headers
Content-Type: application/json
Body
{
    "status": 500,
    "error": "Internal Server Error",
    "exception": "#<Encoding::UndefinedConversionError: \"\x80\" from ASCII-8BIT to UTF-8>",
    ...
}
Response  401
HideShow

Authentication failed. Please read about authentication process.

Get All Submissions
GET/submissions/{?base64_encoded,fields,page,per_page}

Example URI

GET https://api.judge0.com/submissions/?base64_encoded=false&fields=status,language,time&page=4&per_page=2
URI Parameters
HideShow
base64_encoded
boolean (optional) Default: false Example: false

Set to true if you want to receive Base64 encoded data from Judge0 API.

page
integer (optional) Default: 1 Example: 4

Pagination page number.

per_page
integer (optional) Default: 20 Example: 2

Number of submissions to return per page.

fields
string (optional) Default: stdout,time,memory,stderr,token,compile_output,message,status Example: status,language,time

Return only the desired attributes.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "submissions": [
    {
      "time": "0.001",
      "status": {
        "id": 3,
        "description": "Accepted"
      },
      "language": {
        "id": 4,
        "name": "C (gcc 7.2.0)"
      }
    },
    {
      "time": "0.001",
      "status": {
        "id": 3,
        "description": "Accepted"
      },
      "language": {
        "id": 4,
        "name": "C (gcc 7.2.0)"
      }
    }
  ],
  "meta": {
    "current_page": 4,
    "next_page": 5,
    "prev_page": 3,
    "total_pages": 31,
    "total_count": 62
  }
}
Response  200
HideShow

When base64_encoded is set to true.

Headers
Content-Type: application/json
Body
{
  "submissions": [
    {
      "stdout": "aGVsbG8sIEp1ZGdlMAo=\n",
      "time": "0.001",
      "memory": 376,
      "stderr": null,
      "token": "a1133bc6-a0f6-46bf-a2d8-6157418c6fe2",
      "compile_output": null,
      "message": null,
      "status": {
        "id": 3,
        "description": "Accepted"
      }
    },
    {
      "stdout": "aGVsbG8sIEp1ZGdlMAo=\n",
      "time": "0.001",
      "memory": 380,
      "stderr": null,
      "token": "eb0dd001-66db-47f4-8a69-b736c9bc23f6",
      "compile_output": null,
      "message": null,
      "status": {
        "id": 3,
        "description": "Accepted"
      }
    }
  ],
  "meta": {
    "current_page": 4,
    "next_page": 5,
    "prev_page": 3,
    "total_pages": 31,
    "total_count": 62
  }
}
Response  400
HideShow

When page parameter is invalid.

Headers
Content-Type: application/json
Body
{
  "error": "invalid page: -4"
}
Response  400
HideShow

When per_page parameter is invalid.

Headers
Content-Type: application/json
Body
{
  "error": "invalid per_page: -2"
}
Response  401
HideShow

Authentication failed. Please read about authentication process.

Response  403
HideShow

Authorization failed. Please read about authorization process.

Statuses and Languages

Languages

List All Languages
GET/languages

Example URI

GET https://api.judge0.com/languages
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "name": "Bash (4.4)"
  },
  {
    "id": 2,
    "name": "Bash (4.0)"
  },
  {
    "id": 3,
    "name": "Basic (fbc 1.05.0)"
  },
  {
    "id": 4,
    "name": "C (gcc 7.2.0)"
  },
  {
    "id": 5,
    "name": "C (gcc 6.4.0)"
  },
  {
    "id": 6,
    "name": "C (gcc 6.3.0)"
  },
  {
    "id": 7,
    "name": "C (gcc 5.4.0)"
  },
  {
    "id": 8,
    "name": "C (gcc 4.9.4)"
  },
  {
    "id": 9,
    "name": "C (gcc 4.8.5)"
  },
  {
    "id": 10,
    "name": "C++ (g++ 7.2.0)"
  },
  {
    "id": 11,
    "name": "C++ (g++ 6.4.0)"
  },
  {
    "id": 12,
    "name": "C++ (g++ 6.3.0)"
  },
  {
    "id": 13,
    "name": "C++ (g++ 5.4.0)"
  },
  {
    "id": 14,
    "name": "C++ (g++ 4.9.4)"
  },
  {
    "id": 15,
    "name": "C++ (g++ 4.8.5)"
  },
  {
    "id": 16,
    "name": "C# (mono 5.4.0.167)"
  },
  {
    "id": 17,
    "name": "C# (mono 5.2.0.224)"
  },
  {
    "id": 18,
    "name": "Clojure (1.8.0)"
  },
  {
    "id": 19,
    "name": "Crystal (0.23.1)"
  },
  {
    "id": 20,
    "name": "Elixir (1.5.1)"
  },
  {
    "id": 21,
    "name": "Erlang (OTP 20.0)"
  },
  {
    "id": 22,
    "name": "Go (1.9)"
  },
  {
    "id": 23,
    "name": "Haskell (ghc 8.2.1)"
  },
  {
    "id": 24,
    "name": "Haskell (ghc 8.0.2)"
  },
  {
    "id": 25,
    "name": "Insect (5.0.0)"
  },
  {
    "id": 26,
    "name": "Java (OpenJDK 9 with Eclipse OpenJ9)"
  },
  {
    "id": 27,
    "name": "Java (OpenJDK 8)"
  },
  {
    "id": 28,
    "name": "Java (OpenJDK 7)"
  },
  {
    "id": 29,
    "name": "JavaScript (nodejs 8.5.0)"
  },
  {
    "id": 30,
    "name": "JavaScript (nodejs 7.10.1)"
  },
  {
    "id": 31,
    "name": "OCaml (4.05.0)"
  },
  {
    "id": 32,
    "name": "Octave (4.2.0)"
  },
  {
    "id": 33,
    "name": "Pascal (fpc 3.0.0)"
  },
  {
    "id": 34,
    "name": "Python (3.6.0)"
  },
  {
    "id": 35,
    "name": "Python (3.5.3)"
  },
  {
    "id": 36,
    "name": "Python (2.7.9)"
  },
  {
    "id": 37,
    "name": "Python (2.6.9)"
  },
  {
    "id": 38,
    "name": "Ruby (2.4.0)"
  },
  {
    "id": 39,
    "name": "Ruby (2.3.3)"
  },
  {
    "id": 40,
    "name": "Ruby (2.2.6)"
  },
  {
    "id": 41,
    "name": "Ruby (2.1.9)"
  },
  {
    "id": 42,
    "name": "Rust (1.20.0)"
  },
  {
    "id": 43,
    "name": "Text (plain text)"
  }
]

Statuses

List All Statuses
GET/statuses

Example URI

GET https://api.judge0.com/statuses
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "description": "In Queue"
  },
  {
    "id": 2,
    "description": "Processing"
  },
  {
    "id": 3,
    "description": "Accepted"
  },
  {
    "id": 4,
    "description": "Wrong Answer"
  },
  {
    "id": 5,
    "description": "Time Limit Exceeded"
  },
  {
    "id": 6,
    "description": "Compilation Error"
  },
  {
    "id": 7,
    "description": "Runtime Error (SIGSEGV)"
  },
  {
    "id": 8,
    "description": "Runtime Error (SIGXFSZ)"
  },
  {
    "id": 9,
    "description": "Runtime Error (SIGFPE)"
  },
  {
    "id": 10,
    "description": "Runtime Error (SIGABRT)"
  },
  {
    "id": 11,
    "description": "Runtime Error (NZEC)"
  },
  {
    "id": 12,
    "description": "Runtime Error (Other)"
  },
  {
    "id": 13,
    "description": "Internal Error"
  }
]

System and Configuration

System Info

System Info
GET/system_info

System information gives you detailed information about system on which Judge0 API is running.

This information is result of two commands on a host system:

  • lscpu

  • free -h

Please note that Judge0 API consists of two systems: web and worker. Web system is the one who provides you the web API, and Worker is the one who processes your submissions. They can be placed on two or more different hosts with different system configurations. Result of this API request is always from web system. This means that this request might be irrelevant to you if you as user don’t know if web and worker are hosted on the same machine. To find that out, please contact admins who host Judge0 API you are using.

Example URI

GET https://api.judge0.com/system_info
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Architecture": "x86_64",
  "CPU op-mode(s)": "32-bit, 64-bit",
  "Byte Order": "Little Endian",
  "CPU(s)": "4",
  "On-line CPU(s) list": "0-3",
  "Thread(s) per core": "2",
  "Core(s) per socket": "2",
  "Socket(s)": "1",
  "NUMA node(s)": "1",
  "Vendor ID": "GenuineIntel",
  "CPU family": "6",
  "Model": "61",
  "Model name": "Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz",
  "Stepping": "4",
  "CPU MHz": "2508.703",
  "CPU max MHz": "2700.0000",
  "CPU min MHz": "500.0000",
  "BogoMIPS": "4392.12",
  "Virtualization": "VT-x",
  "L1d cache": "32K",
  "L1i cache": "32K",
  "L2 cache": "256K",
  "L3 cache": "3072K",
  "NUMA node0 CPU(s)": "0-3",
  "Mem": "7.7G",
  "Swap": "8.0G"
}

Configuration Info

Configuration Info
GET/config_info

Configuration information gives you detailed information about configuration of Judge0 API. This configuration can be changed through judge0-api.conf file by admin who hosts Judge0 API instance.

This configuration gives every admin a flexibility to configure Judge0 API according to server abilities and needs. It also gives users insight on some default configuration values which are used when their programs are run.

Each of these configuration variables have default values which we consider as recommended in case you are not sure should you change them.

We will refer to default values as values which Judge0 API automatically assigns to each of these configuration variables, if admin didn’t set them. For example, default value of configuration variable cpu_time_limit is 2.

# Name Type Unit Description Default Value
1 enable_wait_result boolean If enabled user can request to synchronously wait for submission result on submission create. true
2 cpu_time_limit float second Default runtime limit for every program (in seconds). Decimal numbers are allowed. Time in which the OS assigns the processor to different tasks is not counted. 2
3 cpu_extra_time float second When a time limit is exceeded, wait for extra time, before killing the program. This has the advantage that the real execution time is reported, even though it slightly exceeds the limit. 0.5
4 wall_time_limit float second Limit wall-clock time in seconds. Decimal numbers are allowed. This clock measures the time from the start of the program to its exit, for an external event. We recommend to use cpu_time_limit as the main limit, but set wall_time_limit to a much higher value as a precaution against sleeping programs. 5
5 memory_limit integer kilobyte Limit address space of the program in kilobytes. 128000
6 stack_limit integer kilobyte Limit process stack in kilobytes. 64000
7 max_processes_and_or_threads integer Maximum number of processes and/or threads program can create. 30
8 enable_per_process_and_thread_time_limit boolean If true then cpu_time_limit will be used as per process and thread. false
9 enable_per_process_and_thread_memory_limit boolean If true then memory_limit will be used as per process and thread. true
10 max_file_size integer kilobyte Limit size of files created (or modified) by the program. 1024
11 number_of_runs integer Run each program this many times and take average of time and memory. 1

Default configuration value for each variable is given to you as response of this API call. For example, default configuration value for variable cpu_extra_time might be 2, and if admin didn’t set this, then it is 0.5 (default value). This means that admin set cpu_extra_time configuration variable to value 2 and we say it is now default configuration value for this variable cpu_extra_time.

Every submission can change each of the configuration variables according to its needs. For example, user might create submission which has cpu_time_limit of 5 seconds. For security reasons we need to limit values of each of these configuration variables. For example, we don’t want user to create a submission which has cpu_time_limit of 100000 seconds.

For this security reason we are introducing limit configuration variables for each configuration variable.

# Name Type Unit Description Default Value
1 max_cpu_time_limit float second Maximum custom cpu_time_limit 15
2 max_cpu_extra_time float second Maximum custom cpu_extra_time 2
3 max_wall_time_limit float second Maximum custom wall_time_limit 20
4 max_memory_limit integer kilobyte Maximum custom memory_limit 256000
5 max_stack_limit integer kilobyte Maximum custom stack_limit 128000
6 max_max_processes_and_or_threads integer Maximum custom max_processes_and_or_threads 60
7 allow_enable_per_process_and_thread_time_limit boolean If false user won’t be able to set enable_per_process_and_thread_time_limit to true true
8 allow_enable_per_process_and_thread_memory_limit boolean If false user won’t be able to set enable_per_process_and_thread_memory_limit to true true
9 max_max_file_size integer kilobyte Maximux custom max_file_size 4096
10 max_number_of_runs integer Maximum custom number_of_runs 20

For example, max_cpu_time_limit with value 20 means that user cannot create new submission which has cpu_time_limit greater than 20.

Example URI

GET https://api.judge0.com/config_info
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "enable_wait_result": true,
  "cpu_time_limit": 2,
  "max_cpu_time_limit": 15,
  "cpu_extra_time": 0.5,
  "max_cpu_extra_time": 2,
  "wall_time_limit": 5,
  "max_wall_time_limit": 20,
  "memory_limit": 128000,
  "max_memory_limit": 256000,
  "stack_limit": 64000,
  "max_stack_limit": 128000,
  "max_processes_and_or_threads": 30,
  "max_max_processes_and_or_threads": 60,
  "enable_per_process_and_thread_time_limit": false,
  "allow_enable_per_process_and_thread_time_limit": true,
  "enable_per_process_and_thread_memory_limit": true,
  "allow_enable_per_process_and_thread_memory_limit": true,
  "max_file_size": 1024,
  "max_max_file_size": 4096,
  "number_of_runs": 1,
  "max_number_of_runs": 20
}

Health Check

Workers Health Check

Workers Health Check
GET/workers

For each queue you will get:

  • queue name

  • total number of workers that has been initially run

  • available number of workers

  • how many workers are idle

  • how many workers are currently working

  • how many workers are paused

  • how many jobs failed

Example URI

GET https://api.judge0.com/workers
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "queue": "default",
    "total": 1,
    "available": 1,
    "idle": 1,
    "working": 0,
    "paused": 0,
    "failed": 0
  }
]
Response  500
HideShow

If total is not equal to available. This means that some workers died.

Headers
Content-Type: application/json
Body
[
  {
    "queue": "default",
    "total": 3,
    "available": 1,
    "idle": 1,
    "working": 0,
    "paused": 0,
    "failed": 0
  }
]

Generated by aglio on 17 Feb 2019