-
Notifications
You must be signed in to change notification settings - Fork 1
/
swagger.json
3371 lines (3371 loc) · 107 KB
/
swagger.json
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.0.1",
"info": {
"title": "FTC Events API",
"description": "FTC Events API is a service to return relevant information about the _FIRST_ Tech Challenge (FTC). Information is made available from events operating around the world\n\nInformation is currently made available after the conclusion of the tournament. The API will provide data as soon as it has synced, and we do not add any artificial delays.\n\n## Documentation Notes\n\n### Timezones\n\nAll times are listed in the local time to the event venue. HTTP-date values will show their timezone.\n\n### Query Parameters\n\nIf you specify a parameter, but no value for that parameter, it will be ignored. For example, if you request `URL?teamNumber=` the `teamNumber` parameter would be ignored.\n\nFor all APIs that accept a query string in addition to the base URI, the order of parameters do not matter, but the name shown in the documentation must match exactly, as does the associated value format as described in details.\n\nFor response codes that are not HTTP 200 (OK), the documentation will show a body message that represents a possible response value. While the \"title\" of the HTTP Status Code will match those shown in the response codes documentation section exactly, the body of the response will be a more detailed explanation of why that status code is being returned and may not always be exactly as shown in the examples.\n\n### Experimenting with the API\n\nThis documentation is rendered at both [api-docs](https://ftc-events.firstinspires.org/api-docs) and [try-it-out](https://ftc-events.firstinspires.org/try-it-out).\n\n[api-docs](https://ftc-events.firstinspires.org/api-docs) has a three panel, easy to read layout, while [try-it-out](https://ftc-events.firstinspires.org/try-it-out)\nhas a feature that allows you try out endpoints from within the page.\n\nAdditionally, the Open API Json is availabe at [Open API](https://ftc-events.firstinspires.org/swagger/v2.0/swagger.json). This can be imported into a tool\nsuch as [Postman](https://www.postman.com) for experimentation as well.\n\n\n### Last-Modified, FMS-OnlyModifiedSince, and If-Modified-Since Headers\nThe FTC Events API utilizes the `Last-Modified` and `If-Modified-Since` Headers to communicate with consumers regarding the age of the data they are requesting. With a couple of exceptions, all calls will return a `Last-Modified` Header set with the time at which the data at that endpoint was last modified. The Header will always be set in the HTTP-date format, as described in the HTTP Protocol. There are two exceptions: the `Last-Modified` Header is not set if the endpoint returns no results (such as a request for a schedule with no matches).\n\nConsumers should keep track of the `Last-Modified` Header, and return it on subsequent calls to the same endpoint as the If-Modified-Since. The server will recognize this request, and will only return a result if the data has been modified since the last request. If no changes have been made, an HTTP 304 will be returned. If data has been modified, ALL data on that call will be returned (for \"only modified\" data, see below).\n\nThe FTC Events API also allows a custom header used to filter the return data to a specific subset. This is done by specifying a `FMS-OnlyModifiedSince` header with each call. As with the `If-Modified-Since` header, consumers should keep track of the Last-Modified Header, and return it on subsequent calls to the same endpoint as the `FMS-OnlyModifiedSince` Header. The server will recognize this request, and will only return a result if the data has been modified since the last request, and, if returned, the data will only be those portions modified since the included date. If no changes, have been made, an HTTP 304 will be returned. Using this method, the server and consumer save processing time by only receiving modified data that is in need of update on the consumer side.\n\nIf the Headers are improperly passed (such as the wrong Day of Week for the matching date, or a date in the future), the endpoint will simply ignore the Header and return all results. If both headers are specified, the request will be denied.\n\n## Response Codes\n\nThe FTC Events API HTTP Status Codes correspond with the [common codes](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html), but occasionally with different \"titles\". The \"title\" used by the API is shown next to each of the below possible response HTTP Status Codes. Throughout the documentation, Apiary may automatically show the common \"title\" in example returns (like \"Not Found\" for 404) but on the production server, the \"title\" will instead match those listed below.\n\n### HTTP 200 - \"OK\"\nThe request has succeeded. An entity corresponding to the requested resource is sent in the response. This will be returned as the HTTP Status Code for all request that succeed, even if the body is empty (such as an event that has no rankings, but with a valid season and event code were used)\n\n### HTTP 304 - \"Not Modified\"\nWhen utilizing a Header that allows filtered data returns, such as `If-Modified-Since`, this response indicates that no data meets the request.\n\n### HTTP 400 - \"Invalid Season Requested\"/\"Malformed Parameter Format In Request\"/\"Missing Parameter In Request\"/\"Invalid API Version Requested\":\nThe request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications. Specifically for this API, a 400 response indicates that the requested URI matches with a valid API, but one or more required parameter was malformed or invalid. Examples include an event code that is too short or team number that contains a letter.\n\n### HTTP 401 - \"Unauthorized\"\nAll requests against the API require authentication via a valid user token. Failing to provide one, or providing an invalid one, will warrant a 401 response. The client MAY repeat the request with a suitable Authorization header field.\n\n### HTTP 404 - \"Invalid Event Requested\"\nEven though the 404 code usually indicates any not found status, a 404 will only be issued in this API when an event cannot be found for the requested season and event code. If the request didn't match a valid API or there were malformed parameters, the response would not receive a 404 but rather a 400 or 501. If this HTTP code is received, the season was a valid season and the event code matched the acceptable style of an event code, but there were no records of an event matching the combination of that season and event code. For example, HTTP 404 would be issued when the event had a different code in the requested season (the codes can change year to year based on event location).\n\n### HTTP 500 - \"Internal Server Error\"\nThe server encountered an unexpected condition which prevented it from fulfilling the request. This is a code sent directly by the server, and has no special alternate definition specific to this API.\n\n### HTTP 501 - \"Request Did Not Match Any Current API Pattern\"\nThe server does not support the functionality required to fulfill the request. Specifically, the request pattern did not match any of the possible APIs, and thus processing was discontinued. This code is also issued when too many optional parameters were included in a single request and fulfilling it would make the result confusing or misleading. Each API will specify which parameters or combination of parameters can be used at the same time.\n\n### HTTP 503 - \"Service Unavailable\"\nThe server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a `Retry-After` header. This code will not always appear, sometimes the server may outright refuse the connection instead. This is a code sent directly by the server, and has no special alternate definition specific to this API.\n\n## Authorization\nIn order to make calls against the FTC Events API, you must include an HTTP Header called `Authorization` with the value set as specified below. If a request is made without this header, processing stops and an HTTP 401 is issued. All `Authorization` headers follow the same format:\n\n```\nAuthorization: Basic 000000000000000000000000000000000000000000000000000000000000\n```\n\nWhere the Zeros are replaced by your Token. The Token can be formed by taking your username and your AuthorizationKey and adding a colon. For example, if your username is `sampleuser` and your AuthorizationKey is `7eaa6338-a097-4221-ac04-b6120fcc4d49` you would have this string:\n\n```\nsampleuser:7eaa6338-a097-4221-ac04-b6120fcc4d49\n```\n\nThis string must then be encoded using Base64 Encoded to form the Token, which will be the same length as the example above, but include letters and numbers. For our example, we would have:\n\n```\nc2FtcGxldXNlcjo3ZWFhNjMzOC1hMDk3LTQyMjEtYWMwNC1iNjEyMGZjYzRkNDk=\n```\n\nMost API client libraries can handle computing the authorization header using a username and password for you\n\nNOTICE: Publicly distributing an application, code snippet, etc, that has your username and token in it, encoded or not, WILL result in your token being blocked from the API. Each user should apply for their own token.\n\nIf you wish to acquire a token for your development, you may do so by requesting a token through our automated system on this website.\n",
"version": "v2.0"
},
"servers": [
{
"url": "http://ftc-api.firstinspires.org"
}
],
"paths": {
"/v2.0/{season}/leagues": {
"get": {
"tags": [
"Leagues"
],
"summary": "League Listings",
"description": "The league listings API returns all FTC leagues in a particular season. You can specify a `regionCode` to filter to leagues within a particular region. To filter to a specific league, supply both a `regionCode` and a `leagueCode`. The returned objects have a `parentLeagueCode` field, which indicates the league is a child league if not null and provides the code of the parent league. The `regionCode` of the parent league will always match the child.",
"parameters": [
{
"name": "season",
"in": "path",
"description": "Numeric year from which the league listings are requested. Must be 4 digits",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "regionCode",
"in": "query",
"description": "Case-sensitive alphanumeric `regionCode` of a region to filter for.",
"schema": {
"type": "string",
"nullable": true
}
},
{
"name": "leagueCode",
"in": "query",
"description": "Case-sensitive alphanumeric `leagueCode` of the league within the specified region to query.",
"schema": {
"type": "string",
"nullable": true
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SeasonLeagueListingsModel_Version2"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"basic": [ ]
}
]
}
},
"/v2.0/{season}/leagues/members/{regionCode}/{leagueCode}": {
"get": {
"tags": [
"Leagues"
],
"summary": "League Membership",
"description": "The league membership API returns the list of team numbers for the teams that are members of a particular league. Leagues are specified by a `regionCode` in combination with a `leagueCode`.",
"parameters": [
{
"name": "season",
"in": "path",
"description": "Numeric year. Must be 4 digits",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "regionCode",
"in": "path",
"description": "Case sensitive alphanumeric `regionCode` of the region the league belongs to.",
"required": true,
"schema": {
"type": "string",
"nullable": true
}
},
{
"name": "leagueCode",
"in": "path",
"description": "Case sensitive alphanumeric `leagueCode` of the league.",
"required": true,
"schema": {
"type": "string",
"nullable": true
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LeagueMemberListModel"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"basic": [ ]
}
]
}
},
"/v2.0/{season}/leagues/rankings/{regionCode}/{leagueCode}": {
"get": {
"tags": [
"Leagues"
],
"summary": "League Rankings",
"description": "The league rankings API returns team ranking detail from a particular league in a particular season. League rankings are only the cumulative rankings from League Meets - they do not include performance at the League Tournament. To get League Tournament Rankings, use the Event Rankings endpoint.",
"parameters": [
{
"name": "season",
"in": "path",
"description": "Numeric year. Must be 4 digits",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "regionCode",
"in": "path",
"description": "Case sensitive alphanumeric `regionCode` of the region the league belongs to.",
"required": true,
"schema": {
"type": "string",
"nullable": true
}
},
{
"name": "leagueCode",
"in": "path",
"description": "Case sensitive alphanumeric `leagueCode` of the league.",
"required": true,
"schema": {
"type": "string",
"nullable": true
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventRankingsModel"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"basic": [ ]
}
]
}
},
"/v2.0": {
"get": {
"tags": [
"General"
],
"summary": "API Index",
"description": "Root level call with no parameters.",
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiIndexModel"
}
}
}
}
}
}
},
"/v2.0/{season}": {
"get": {
"tags": [
"Season Data"
],
"summary": "Season Summary",
"description": "The season summary API returns a high level glance of a particular FTC season.",
"parameters": [
{
"name": "season",
"in": "path",
"description": "Numeric year of the event from which the season summary is requested. Must be 4 digits.",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SeasonSummaryModel_Version2"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"basic": [ ]
}
]
}
},
"/v2.0/{season}/events": {
"get": {
"tags": [
"Season Data"
],
"summary": "Event Listings",
"description": "The event listings API returns all FTC official regional events in a particular season. You can specify an `eventCode` if you would only like data about one specific event. If you specify an `eventCode` you cannot specify any other optional parameters. Alternately, you can specify a `teamNumber` to retrieve only the listings of events being attended by the particular team. If you specify a `teamNumber` you cannot specify an `eventCode`.\n\nThe response for event listings contains a special field called divisionCode. For example, the FIRST Championship contains two Divisions. As an example of a response, the event listings for a Division will have a divisionCode that matches the FIRST Championship event code (as they are divisions of that event). This allows you to see the full structure of events, and how they relate to each other.",
"parameters": [
{
"name": "season",
"in": "path",
"description": "Numeric year from which the event listings are requested. Must be 4 digits",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "eventCode",
"in": "query",
"description": "Case insensitive alphanumeric `eventCode` of the event about which details are requested.",
"schema": {
"type": "string",
"default": "0",
"nullable": true
}
},
{
"name": "teamNumber",
"in": "query",
"description": "Numeric `teamNumber` of the team from which the attending event listings are requested.",
"schema": {
"type": "integer",
"format": "int32",
"default": 0
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SeasonEventListingsModel_Version2"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"basic": [ ]
}
]
}
},
"/v2.0/{season}/teams": {
"get": {
"tags": [
"Season Data"
],
"summary": "Team Listings",
"description": "The team listings API returns all FTC official teams in a particular season. If specified, the `teamNumber` parameter will return only one result with the details of the requested `teamNumber`. Alternately, the `eventCode` parameter allows sorting of the team list to only those teams attending a particular event in the particular season. If you specify a teamNumber parameter, you cannot additionally specify an `eventCode` and/or `state` in the same request, or you will receive an HTTP 501. If you specify the `state` parameter, it should be the full legal name of the US state or international state/prov, such as New Hampshire or Ontario. Values on this endpoint are \"pass through\" values from the TIMS registration system. As such, if the team does not specify a value for a field, it may be presented in the API as null.",
"parameters": [
{
"name": "season",
"in": "path",
"description": "Numeric year from which the team listings are requested. Must be 4 digits.",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "teamNumber",
"in": "query",
"description": "Numeric `teamNumber` of the team about which information is requested. Must be 1 to 5 digits.",
"schema": {
"type": "integer",
"format": "int32",
"default": 0
}
},
{
"name": "eventCode",
"in": "query",
"description": "Case insensitive alphanumeric `eventCode` of the event from which details are requested.",
"schema": {
"type": "string",
"default": "0",
"nullable": true
}
},
{
"name": "state",
"in": "query",
"description": "Full legal name of the US state or international state/prov",
"schema": {
"type": "string",
"default": "",
"nullable": true
}
},
{
"name": "page",
"in": "query",
"description": "Numeric page of results to return.",
"schema": {
"type": "integer",
"format": "int32",
"default": 1
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SeasonTeamListingsModel_Version2"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"basic": [ ]
}
]
}
},
"/v2.0/{season}/schedule/{eventCode}/{tournamentLevel}/hybrid": {
"get": {
"tags": [
"Schedule"
],
"summary": "Hybrid Schedule",
"description": "The schedule API returns the match schedule for the desired tournament level of a particular event in a particular season in the hybrid format. When a match has been played, the match result related details will be filled. When a match has not yet happened, match result related fields will be null. All parameters, except start and end, are required for the hybrid schedule.",
"parameters": [
{
"name": "season",
"in": "path",
"description": "Numeric year of the event from which the hybrid schedule is requested. Must be 4 digits",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "eventCode",
"in": "path",
"description": "Case insensitive alphanumeric eventCode of the event from which the hybrid schedule is requested. Must be at least 3 characters.",
"required": true,
"schema": {
"type": "string",
"nullable": true
}
},
{
"name": "tournamentLevel",
"in": "path",
"description": "Required tournamentLevel of desired score details.",
"required": true,
"schema": {
"enum": [
"qual",
"playoff"
],
"type": "string",
"nullable": true
}
},
{
"name": "start",
"in": "query",
"description": "`start` match number for subset of results to return (inclusive).",
"schema": {
"type": "integer",
"format": "int32",
"default": 0
}
},
{
"name": "end",
"in": "query",
"description": "`end` match number for subset of results to return (inclusive).",
"schema": {
"type": "integer",
"format": "int32",
"default": 999
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventScheduleHybridModel_Version2"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"basic": [ ]
}
]
}
},
"/v2.0/{season}/schedule/{eventCode}": {
"get": {
"tags": [
"Schedule"
],
"summary": "Event Schedule",
"description": "The schedule API returns the match schedule for the desired tournament level of a particular event in a particular season. You must also specify a `tournamentLevel` from which to return the results. Alternately, you can specify a `teamNumber` to filter the results to only those in which a particular team is participating. There is no validation that the `teamNumber` you request is actually competing at the event, if they are not, the response will be empty. You can also specify the parameters together, but cannot make a request without at least one of the two.",
"parameters": [
{
"name": "season",
"in": "path",
"description": "Numeric year of the event from which the schedule is requested. Must be 4 digits",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "eventCode",
"in": "path",
"description": "Case insensitive alphanumeric `eventCode` of the event from which the schedule are requested. Must be at least 3 characters.",
"required": true,
"schema": {
"type": "string",
"nullable": true
}
},
{
"name": "tournamentLevel",
"in": "query",
"description": "Required tournamentLevel of desired score details.",
"schema": {
"enum": [
"qual",
"playoff"
],
"type": "string",
"default": "0",
"nullable": true
}
},
{
"name": "teamNumber",
"in": "query",
"description": "`teamNumber` to search for within the schedule. Only returns matches in which the requested team participated.",
"schema": {
"type": "integer",
"format": "int32",
"default": 0
}
},
{
"name": "start",
"in": "query",
"description": "`start` match number for subset of results to return (inclusive).",
"schema": {
"type": "integer",
"format": "int32",
"default": 0
}
},
{
"name": "end",
"in": "query",
"description": "`end` match number for subset of results to return (inclusive).",
"schema": {
"type": "integer",
"format": "int32",
"default": 999
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventScheduleModel_Version2"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"basic": [ ]
}
]
}
},
"/v2.0/{season}/rankings/{eventCode}": {
"get": {
"tags": [
"Rankings"
],
"summary": "Event Rankings",
"description": "The rankings API returns team ranking detail from a particular event in a particular season. Optionally, the `top` parameter can be added to the query string to request a subset of the rankings based on the highest ranked teams at the time of the request. Alternately, you can specify the `teamNumber` parameter to retrieve the ranking on one specific team. You cannot specify both a `top` and `teamNumber` in the same call.",
"parameters": [
{
"name": "season",
"in": "path",
"description": "Numeric year of the event from which the rankings are requested. Must be 4 digits",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "eventCode",
"in": "path",
"description": "Case insensitive alphanumeric `eventCode` of the event from which the rankings are requested. Must be at least 3 characters.",
"required": true,
"schema": {
"type": "string",
"nullable": true
}
},
{
"name": "teamNumber",
"in": "query",
"description": "Team number of the team whose ranking is requested.",
"schema": {
"type": "integer",
"format": "int32",
"default": 0
}
},
{
"name": "top",
"in": "query",
"description": "number of requested `top` ranked teams to return in result.",
"schema": {
"type": "integer",
"format": "int32",
"default": 0
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventRankingsModel"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"basic": [ ]
}
]
}
},
"/v2.0/{season}/alliances/{eventCode}": {
"get": {
"tags": [
"Alliance Selection"
],
"summary": "Event Alliances",
"description": "The alliances API returns details about alliance selection at a particular event in a particular season.",
"parameters": [
{
"name": "season",
"in": "path",
"description": "Numeric year of the event from which the event alliances are requested. Must be 4 digits.",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "eventCode",
"in": "path",
"description": "Case insensitive alphanumeric `eventCode` of the event from which the alliance selection results are requested. Must be at least 3 characters.",
"required": true,
"schema": {
"type": "string",
"nullable": true
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AllianceSelectionModel_Version2"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"basic": [ ]
}
]
}
},
"/v2.0/{season}/alliances/{eventCode}/selection": {
"get": {
"tags": [
"Alliance Selection"
],
"summary": "Alliance Selection Details",
"description": "This returns the in-order details of each step through the alliance selection process for a particular event.",
"parameters": [
{
"name": "season",
"in": "path",
"description": "Numeric year of the event from which the event alliances are requested. Must be 4 digits.",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "eventCode",
"in": "path",
"description": "Case insensitive alphanumeric `eventCode` of the event from which the alliance selection results are requested. Must be at least 3 characters.",
"required": true,
"schema": {
"type": "string",
"nullable": true
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AllianceSelectionDetailModel"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"basic": [ ]
}
]
}
},
"/v2.0/{season}/matches/{eventCode}": {
"get": {
"tags": [
"Match Results"
],
"summary": "Event Match Results",
"description": "The match results API returns the match results for all matches of a particular event in a particular season. Match results are only available once a match has been played, retrieving info about future matches requires the event schedule API. You cannot receive data about a match that is in progress. You can, however, request the Hybrid Schedule if you would like data about upcoming and played matches at the same time. \n\nIf you specify the `matchNumber`, `start` and/or `end` optional parameters, you must also specify a `tournamentLevel`. If you specify the `teamNumber` parameter, you cannot specify a `matchNumber` parameter. If you specify the `matchNumber`, you cannot define a start or end. \n\nNote: If you specify `start`, and it is higher than the maximum match number at the event, you will not receive any match results in the response. The same is true in reverse for the `end` parameter.",
"parameters": [
{
"name": "season",
"in": "path",
"description": "Numeric year of the event from which the match results are requested. Must be 4 digits.",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "eventCode",
"in": "path",
"description": "Case insensitive alphanumeric `eventCode` of the event from which the results are requested. Must be at least 3 characters.",
"required": true,
"schema": {
"type": "string",
"nullable": true
}
},
{
"name": "tournamentLevel",
"in": "query",
"description": "Required tournamentLevel of desired score details.",
"schema": {
"enum": [
"qual",
"playoff"
],
"type": "string",
"default": "0",
"nullable": true
}
},
{
"name": "teamNumber",
"in": "query",
"description": "`teamNumber` to search for within the results. Only returns match results in which the requested team was a participant.",
"schema": {
"type": "integer",
"format": "int32",
"nullable": true
}
},
{
"name": "matchNumber",
"in": "query",
"description": "specific single `matchNumber` of result.",
"schema": {
"type": "integer",
"format": "int32",
"nullable": true
}
},
{
"name": "start",
"in": "query",
"description": "`start` match number for subset of results to return.",
"schema": {
"type": "integer",
"format": "int32",
"default": 0
}
},
{
"name": "end",
"in": "query",
"description": "`end` match number for subset of results to return (inclusive).",
"schema": {
"type": "integer",
"format": "int32",
"default": 999
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventMatchResultsModel_Version2"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"basic": [ ]
}
]
}
},
"/v2.0/{season}/scores/{eventCode}/{tournamentLevel}": {
"get": {
"tags": [
"Match Results"
],
"summary": "Score Details",
"description": "The score details API returns the score detail for all matches of a particular event in a particular season and a particular tournament level. Score details are only available once a match has been played, retrieving info about future matches requires the event schedule API. You cannot receive data about a match that is in progress.",
"parameters": [
{
"name": "season",
"in": "path",
"description": "Numeric year of the event from which the match results are requested. Must be 4 digits.",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "eventCode",
"in": "path",
"description": "Case insensitive alphanumeric eventCode of the event from which the details are requested. Must be at least 3 characters.",
"required": true,
"schema": {
"type": "string",
"nullable": true
}
},
{
"name": "tournamentLevel",
"in": "path",
"description": "Required tournamentLevel of desired score details.",
"required": true,
"schema": {
"enum": [
"qual",
"playoff"
],
"type": "string",
"nullable": true
}
},
{
"name": "teamNumber",
"in": "query",
"description": "`teamNumber` to search for within the results. Only returns details in which the requested team was a participant.",
"schema": {
"type": "integer",
"format": "int32",
"nullable": true
}
},
{
"name": "matchNumber",
"in": "query",
"description": "specific single `matchNumber` of result.",
"schema": {
"type": "integer",
"format": "int32",
"nullable": true
}
},
{
"name": "start",
"in": "query",
"description": "`start` match number for subset of results to return (inclusive).",
"schema": {
"type": "integer",
"format": "int32",
"default": 0
}
},
{
"name": "end",
"in": "query",
"description": "`end` match number for subset of results to return (inclusive).",
"schema": {
"type": "integer",
"format": "int32",
"default": 999
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MatchScoresModel"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"basic": [ ]
}
]
}
},
"/v2.0/{season}/awards/list": {
"get": {
"tags": [
"Awards"
],
"summary": "Award Listings",
"description": "The award listings API returns a listing of the various awards that can be distributed in the requested season. This is especially useful in order to avoid having to use the name field of the event awards API to know which award was won. Instead the awardId field can be matched between the two APIs.",
"parameters": [
{
"name": "season",
"in": "path",
"description": "Numeric year of the event from which the award listings are requested. Must be 4 digits",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SeasonAwardListingsModel"
}
}
}
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"basic": [ ]
}
]