|
1 | 1 | {
|
2 | 2 | "info": {
|
3 |
| - "_postman_id": "9776607d-8485-4e67-bd2a-55e0b5100580", |
| 3 | + "_postman_id": "567b1b26-0edf-4f9f-9f69-ed0b35f8422c", |
4 | 4 | "name": "Submission API",
|
5 | 5 | "description": "Topcoder Submission API Postman Collection",
|
6 | 6 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
|
410 | 410 | },
|
411 | 411 | "response": []
|
412 | 412 | },
|
| 413 | + { |
| 414 | + "name": "GET Review types from ES with sortBy", |
| 415 | + "event": [ |
| 416 | + { |
| 417 | + "listen": "test", |
| 418 | + "script": { |
| 419 | + "id": "290c7b35-fc15-468e-81a8-bd2a4eefcd27", |
| 420 | + "exec": [ |
| 421 | + "" |
| 422 | + ], |
| 423 | + "type": "text/javascript" |
| 424 | + } |
| 425 | + } |
| 426 | + ], |
| 427 | + "request": { |
| 428 | + "method": "GET", |
| 429 | + "header": [ |
| 430 | + { |
| 431 | + "key": "Authorization", |
| 432 | + "value": "Bearer {{ADMIN_TOKEN}}" |
| 433 | + }, |
| 434 | + { |
| 435 | + "key": "Content-Type", |
| 436 | + "value": "application/json" |
| 437 | + } |
| 438 | + ], |
| 439 | + "body": { |
| 440 | + "mode": "raw", |
| 441 | + "raw": "" |
| 442 | + }, |
| 443 | + "url": { |
| 444 | + "raw": "{{URL}}/reviewTypes?sortBy=created&orderBy=desc", |
| 445 | + "host": [ |
| 446 | + "{{URL}}" |
| 447 | + ], |
| 448 | + "path": [ |
| 449 | + "reviewTypes" |
| 450 | + ], |
| 451 | + "query": [ |
| 452 | + { |
| 453 | + "key": "sortBy", |
| 454 | + "value": "created" |
| 455 | + }, |
| 456 | + { |
| 457 | + "key": "orderBy", |
| 458 | + "value": "desc" |
| 459 | + } |
| 460 | + ] |
| 461 | + } |
| 462 | + }, |
| 463 | + "response": [] |
| 464 | + }, |
413 | 465 | {
|
414 | 466 | "name": "GET Review types from ES with invalid filters",
|
415 | 467 | "event": [
|
|
749 | 801 | "listen": "test",
|
750 | 802 | "script": {
|
751 | 803 | "id": "b0a4b893-f851-47bb-8b41-5dc60ba76fa0",
|
752 |
| - "type": "text/javascript", |
753 | 804 | "exec": [
|
754 | 805 | "if( responseCode.code === 200) {",
|
755 | 806 | " const response = JSON.parse(responseBody);",
|
756 | 807 | " pm.environment.set(\"reviewID\", response.id);",
|
757 | 808 | "}"
|
758 |
| - ] |
| 809 | + ], |
| 810 | + "type": "text/javascript" |
759 | 811 | }
|
760 | 812 | }
|
761 | 813 | ],
|
|
773 | 825 | ],
|
774 | 826 | "body": {
|
775 | 827 | "mode": "raw",
|
776 |
| - "raw": "{\n\t\"score\": 92.5,\n\t\"scoreCardId\": \"d46a4180-65aa-42ec-a945-5fd21d3d26f8\",\n\t\"submissionId\": \"{{submissionID}}\",\n\t\"typeId\": \"c56a4180-65aa-42ec-a945-5fd21dec0503\",\n\t\"reviewerId\": \"c56a4180-65aa-42ec-a945-5fd21d3d26f8\"\n}" |
| 828 | + "raw": "{\n\t\"score\": 92.5,\n\t\"scoreCardId\": 123456789,\n\t\"submissionId\": \"{{submissionID}}\",\n\t\"typeId\": \"c56a4180-65aa-42ec-a945-5fd21dec0503\",\n\t\"reviewerId\": \"c56a4180-65aa-42ec-a945-5fd21d3d26f8\"\n}" |
777 | 829 | },
|
778 | 830 | "url": {
|
779 | 831 | "raw": "{{URL}}/reviews",
|
|
1101 | 1153 | },
|
1102 | 1154 | "response": []
|
1103 | 1155 | },
|
| 1156 | + { |
| 1157 | + "name": "GET Reviews from ES with sortBy", |
| 1158 | + "event": [ |
| 1159 | + { |
| 1160 | + "listen": "test", |
| 1161 | + "script": { |
| 1162 | + "id": "290c7b35-fc15-468e-81a8-bd2a4eefcd27", |
| 1163 | + "exec": [ |
| 1164 | + "" |
| 1165 | + ], |
| 1166 | + "type": "text/javascript" |
| 1167 | + } |
| 1168 | + } |
| 1169 | + ], |
| 1170 | + "request": { |
| 1171 | + "method": "GET", |
| 1172 | + "header": [ |
| 1173 | + { |
| 1174 | + "key": "Authorization", |
| 1175 | + "value": "Bearer {{ADMIN_TOKEN}}" |
| 1176 | + }, |
| 1177 | + { |
| 1178 | + "key": "Content-Type", |
| 1179 | + "value": "application/json" |
| 1180 | + } |
| 1181 | + ], |
| 1182 | + "body": { |
| 1183 | + "mode": "raw", |
| 1184 | + "raw": "" |
| 1185 | + }, |
| 1186 | + "url": { |
| 1187 | + "raw": "{{URL}}/reviews?sortBy=score", |
| 1188 | + "host": [ |
| 1189 | + "{{URL}}" |
| 1190 | + ], |
| 1191 | + "path": [ |
| 1192 | + "reviews" |
| 1193 | + ], |
| 1194 | + "query": [ |
| 1195 | + { |
| 1196 | + "key": "sortBy", |
| 1197 | + "value": "score" |
| 1198 | + } |
| 1199 | + ] |
| 1200 | + } |
| 1201 | + }, |
| 1202 | + "response": [] |
| 1203 | + }, |
1104 | 1204 | {
|
1105 | 1205 | "name": "GET Reviews from ES with invalid filters",
|
1106 | 1206 | "event": [
|
|
1284 | 1384 | "listen": "test",
|
1285 | 1385 | "script": {
|
1286 | 1386 | "id": "f13eec0d-52e8-4650-b1b0-2db09992067b",
|
1287 |
| - "type": "text/javascript", |
1288 | 1387 | "exec": [
|
1289 | 1388 | ""
|
1290 |
| - ] |
| 1389 | + ], |
| 1390 | + "type": "text/javascript" |
1291 | 1391 | }
|
1292 | 1392 | }
|
1293 | 1393 | ],
|
|
1305 | 1405 | ],
|
1306 | 1406 | "body": {
|
1307 | 1407 | "mode": "raw",
|
1308 |
| - "raw": "{\n\t\"score\": 90.5,\n\t\"scoreCardId\": \"d46a4180-65aa-42ec-a555-5fd21d3d26f8\",\n\t\"submissionId\": \"{{submissionID}}\",\n\t\"typeId\": \"c56a4180-65aa-42ec-a945-5fd21dec0503\",\n\t\"reviewerId\": \"c56a4180-65aa-42ec-a945-5fd21d3d26f8\"\n}" |
| 1408 | + "raw": "{\n\t\"score\": 90.5,\n\t\"scoreCardId\": 123456789,\n\t\"submissionId\": \"{{submissionID}}\",\n\t\"typeId\": \"c56a4180-65aa-42ec-a945-5fd21dec0503\",\n\t\"reviewerId\": \"c56a4180-65aa-42ec-a945-5fd21d3d26f8\"\n}" |
1309 | 1409 | },
|
1310 | 1410 | "url": {
|
1311 | 1411 | "raw": "{{URL}}/reviews/{{reviewID}}",
|
|
1483 | 1583 | "listen": "test",
|
1484 | 1584 | "script": {
|
1485 | 1585 | "id": "9a901742-45ac-4e6e-b3c5-3379ed7e74bf",
|
1486 |
| - "type": "text/javascript", |
1487 | 1586 | "exec": [
|
1488 | 1587 | "if( responseCode.code === 200) {",
|
1489 | 1588 | " const response = JSON.parse(responseBody);",
|
1490 | 1589 | " pm.environment.set(\"reviewSummationID\", response.id);",
|
1491 | 1590 | "}"
|
1492 |
| - ] |
| 1591 | + ], |
| 1592 | + "type": "text/javascript" |
1493 | 1593 | }
|
1494 | 1594 | }
|
1495 | 1595 | ],
|
|
1507 | 1607 | ],
|
1508 | 1608 | "body": {
|
1509 | 1609 | "mode": "raw",
|
1510 |
| - "raw": "{\n\t\"submissionId\": \"{{submissionID}}\",\n\t\"aggregateScore\": 97.8,\n\t\"scoreCardId\": \"d46a4180-65aa-42ec-a945-5fd21d3d26f8\",\n\t\"isPassing\": true\n}" |
| 1610 | + "raw": "{\n\t\"submissionId\": \"{{submissionID}}\",\n\t\"aggregateScore\": 97.8,\n\t\"scoreCardId\": 123456789,\n\t\"isPassing\": true\n}" |
1511 | 1611 | },
|
1512 | 1612 | "url": {
|
1513 | 1613 | "raw": "{{URL}}/reviewSummations",
|
|
1831 | 1931 | },
|
1832 | 1932 | "response": []
|
1833 | 1933 | },
|
| 1934 | + { |
| 1935 | + "name": "GET Review Summations from ES with sortBy", |
| 1936 | + "event": [ |
| 1937 | + { |
| 1938 | + "listen": "test", |
| 1939 | + "script": { |
| 1940 | + "id": "290c7b35-fc15-468e-81a8-bd2a4eefcd27", |
| 1941 | + "exec": [ |
| 1942 | + "" |
| 1943 | + ], |
| 1944 | + "type": "text/javascript" |
| 1945 | + } |
| 1946 | + } |
| 1947 | + ], |
| 1948 | + "request": { |
| 1949 | + "method": "GET", |
| 1950 | + "header": [ |
| 1951 | + { |
| 1952 | + "key": "Authorization", |
| 1953 | + "value": "Bearer {{ADMIN_TOKEN}}" |
| 1954 | + }, |
| 1955 | + { |
| 1956 | + "key": "Content-Type", |
| 1957 | + "value": "application/json" |
| 1958 | + } |
| 1959 | + ], |
| 1960 | + "body": { |
| 1961 | + "mode": "raw", |
| 1962 | + "raw": "" |
| 1963 | + }, |
| 1964 | + "url": { |
| 1965 | + "raw": "{{URL}}/reviewSummations?sortBy=aggregateScore&orderBy=DESC", |
| 1966 | + "host": [ |
| 1967 | + "{{URL}}" |
| 1968 | + ], |
| 1969 | + "path": [ |
| 1970 | + "reviewSummations" |
| 1971 | + ], |
| 1972 | + "query": [ |
| 1973 | + { |
| 1974 | + "key": "sortBy", |
| 1975 | + "value": "aggregateScore" |
| 1976 | + }, |
| 1977 | + { |
| 1978 | + "key": "orderBy", |
| 1979 | + "value": "DESC" |
| 1980 | + } |
| 1981 | + ] |
| 1982 | + } |
| 1983 | + }, |
| 1984 | + "response": [] |
| 1985 | + }, |
1834 | 1986 | {
|
1835 | 1987 | "name": "GET Review Summations from ES with invalid filters",
|
1836 | 1988 | "event": [
|
|
2014 | 2166 | "listen": "test",
|
2015 | 2167 | "script": {
|
2016 | 2168 | "id": "f13eec0d-52e8-4650-b1b0-2db09992067b",
|
2017 |
| - "type": "text/javascript", |
2018 | 2169 | "exec": [
|
2019 | 2170 | ""
|
2020 |
| - ] |
| 2171 | + ], |
| 2172 | + "type": "text/javascript" |
2021 | 2173 | }
|
2022 | 2174 | }
|
2023 | 2175 | ],
|
|
2035 | 2187 | ],
|
2036 | 2188 | "body": {
|
2037 | 2189 | "mode": "raw",
|
2038 |
| - "raw": "{\n\t\"submissionId\": \"{{submissionID}}\",\n\t\"aggregateScore\": 93.5,\n\t\"scoreCardId\": \"d46a4180-65aa-42ec-a945-5fd21d3d26f8\",\n\t\"isPassing\": true\n}" |
| 2190 | + "raw": "{\n\t\"submissionId\": \"{{submissionID}}\",\n\t\"aggregateScore\": 93.5,\n\t\"scoreCardId\": 123456789,\n\t\"isPassing\": true\n}" |
2039 | 2191 | },
|
2040 | 2192 | "url": {
|
2041 | 2193 | "raw": "{{URL}}/reviewSummations/{{reviewSummationID}}",
|
|
2491 | 2643 | },
|
2492 | 2644 | "response": []
|
2493 | 2645 | },
|
| 2646 | + { |
| 2647 | + "name": "Get Submissions from ES with sortBy", |
| 2648 | + "request": { |
| 2649 | + "method": "GET", |
| 2650 | + "header": [ |
| 2651 | + { |
| 2652 | + "key": "Authorization", |
| 2653 | + "value": "Bearer {{USER_TOKEN}}" |
| 2654 | + } |
| 2655 | + ], |
| 2656 | + "body": { |
| 2657 | + "mode": "raw", |
| 2658 | + "raw": "" |
| 2659 | + }, |
| 2660 | + "url": { |
| 2661 | + "raw": "{{URL}}/submissions?sortBy=created&orderBy=asc", |
| 2662 | + "host": [ |
| 2663 | + "{{URL}}" |
| 2664 | + ], |
| 2665 | + "path": [ |
| 2666 | + "submissions" |
| 2667 | + ], |
| 2668 | + "query": [ |
| 2669 | + { |
| 2670 | + "key": "sortBy", |
| 2671 | + "value": "created" |
| 2672 | + }, |
| 2673 | + { |
| 2674 | + "key": "orderBy", |
| 2675 | + "value": "asc" |
| 2676 | + } |
| 2677 | + ] |
| 2678 | + } |
| 2679 | + }, |
| 2680 | + "response": [] |
| 2681 | + }, |
2494 | 2682 | {
|
2495 | 2683 | "name": "Get Submissions from ES with invalid filters",
|
2496 | 2684 | "request": {
|
|
2761 | 2949 | "key": "typeId",
|
2762 | 2950 | "value": "{{artifactID}}",
|
2763 | 2951 | "type": "text"
|
| 2952 | + }, |
| 2953 | + { |
| 2954 | + "key": "filename", |
| 2955 | + "value": "{{filename}}", |
| 2956 | + "type": "text" |
2764 | 2957 | }
|
2765 | 2958 | ]
|
2766 | 2959 | },
|
|
2927 | 3120 | }
|
2928 | 3121 | },
|
2929 | 3122 | "response": []
|
| 3123 | + }, |
| 3124 | + { |
| 3125 | + "name": "Get Submissions from ES with filters Copy", |
| 3126 | + "request": { |
| 3127 | + "method": "GET", |
| 3128 | + "header": [ |
| 3129 | + { |
| 3130 | + "key": "Authorization", |
| 3131 | + "value": "Bearer {{USER_TOKEN}}" |
| 3132 | + } |
| 3133 | + ], |
| 3134 | + "body": { |
| 3135 | + "mode": "raw", |
| 3136 | + "raw": "" |
| 3137 | + }, |
| 3138 | + "url": { |
| 3139 | + "raw": "{{URL}}/submissions?type=ContestSubmission", |
| 3140 | + "host": [ |
| 3141 | + "{{URL}}" |
| 3142 | + ], |
| 3143 | + "path": [ |
| 3144 | + "submissions" |
| 3145 | + ], |
| 3146 | + "query": [ |
| 3147 | + { |
| 3148 | + "key": "type", |
| 3149 | + "value": "ContestSubmission" |
| 3150 | + } |
| 3151 | + ] |
| 3152 | + } |
| 3153 | + }, |
| 3154 | + "response": [] |
2930 | 3155 | }
|
2931 | 3156 | ],
|
2932 | 3157 | "description": "End points related to Submission",
|
|
0 commit comments