File size: 1,725 Bytes
def1299
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
### Create a Submission Batch [POST]
Create multiple submissions at once.

+ Parameters
    + base64_encoded = `false` (optional, boolean, `false`) ... Set to `true` if you are sending Base64 encoded data.

+ Request (application/json)
    {
        "submissions":
        [
            {
                "language_id": 46,
                "source_code": "echo hello from Bash"
            },
            {
                "language_id": 71,
                "source_code": "print(\"hello from Python\")"
            },
            {
                "language_id": 72,
                "source_code": "puts(\"hello from Ruby\")"
            }
        ]
    }

+ Response 201 (application/json)
    [
        {
            "token": "db54881d-bcf5-4c7b-a2e3-d33fe7e25de7"
        },
        {
            "token": "ecc52a9b-ea80-4a00-ad50-4ab6cc3bb2a1"
        },
        {
            "token": "1b35ec3b-5776-48ef-b646-d5522bdeb2cc"
        }
    ]

+ Request (application/json)
    {
        "submissions":
        [
            {
                "language_id": 46,
                "source_code": "echo hello from Bash"
            },
            {
                "language_id": 123456789,
                "source_code": "print(\"hello from Python\")"
            },
            {
                "language_id": 72,
                "source_code": ""
            }
        ]
    }

+ Response 201 (application/json)
    [
        {
            "token": "c2dd8881-644b-462d-b1f9-73dd3bb0118a"
        },
        {
            "language_id": [
                "language with id 123456789 doesn't exist"
            ]
        },
        {
            "source_code": [
                "can't be blank"
            ]
        }
    ]