Im trying to get the complete match schedule into my scouting app, and looking at events that happened in the past, all of the information is updated (obv because the matches alr happened). Is there anyway (besides waiting for a schedule to be posted for another event) to see what it would be like when we get the schedule?
There is not a way to see the actual qualification match schedule for an event until the schedule is generated and posted. This typically occurs 12-15 hours before the start of the qualification matches.
There are ways to generate simulated schedules, but these are just random samples. They would not be the actual schedule. Depending on what you mean by “what it would be like when we get the schedule”, a simulated schedule may or may not be helpful.
I was just messing around with the API the other day.
You can get the match schedule from the FIRST API at
https://frc-api.firstinspires.org/v3.0/2023/matches/WEEK0?tournamentlevel=Qualification
where WEEK0
is the event code of the event of interest. Check your event’s entry on the Event List for the code.
You’ll get a response like
"Matches":[
{"isReplay":false,
"matchVideoLink":[],
"description":"Qualification 1",
"level":"Qualification",
"matchNumber":1,
"scoreRedFinal":47,
"scoreRedFoul":0,
"scoreRedAuto":10,
"scoreBlueFinal":54,
"scoreBlueFoul":15,
"scoreBlueAuto":11,
"autoStartTime":"2023-02-18T09:00:19.763",
"actualStartTime":"2023-02-18T09:00:19.763",
"tournamentLevel":"Qualification",
"postResultTime":"2023-02-18T09:03:51.97",
"teams":[
{"teamNumber":246,
"station":"Red1",
"dq":false},
{"teamNumber":4905,
"station":"Red2",
"dq":false},
{"teamNumber":2342,
"station":"Red3",
"dq":false},
{"teamNumber":157,
"station":"Blue1",
"dq":false},
{"teamNumber":4041,
"station":"Blue2",
"dq":false},
{"teamNumber":509,
"station":"Blue3",
"dq":false}
]
},
{ ... },
...
]
The main elements of interest for generating the match schedule are
Matches[i].matchNumber
Matches[i].teams[j].teamNumber
Matches[i].teams[j].station
with i
and j
as list indexes from (1-last match) and (1-6) respectively.
I suggest checking out the FIRST API Docs for further information, even though they were last updated in 2020.
If im remembering correctly, they usually are posted the night before competitions, so usually the night of practice matches right? So should I check on one of the competition nights and save that file for testing?
Based on this last question, I think I understand more what you are looking for. You want to see what the API response related to schedule will look like after the schedule is posted, but before any matches take place. Is that right?
If so, here is the first part of the response from The Blue Alliance API V3 /event/{event_key}/matches endpoint for the Chezy Champs offseason event in 2022 after the schedule was available, but before any matches began. I expect 2023 will be exactly the same or very similar.
/event/2022cc/matches
[
{
“actual_time”: null,
“alliances”: {
“blue”: {
“dq_team_keys”: [],
“score”: -1,
“surrogate_team_keys”: [],
“team_keys”: [
“frc3647”,
“frc254”,
“frc604”
]
},
“red”: {
“dq_team_keys”: [],
“score”: -1,
“surrogate_team_keys”: [],
“team_keys”: [
“frc6036”,
“frc7157”,
“frc8033”
]
}
},
“comp_level”: “qm”,
“event_key”: “2022cc”,
“key”: “2022cc_qm1”,
“match_number”: 1,
“post_result_time”: null,
“predicted_time”: 1664038800,
“score_breakdown”: null,
“set_number”: 1,
“time”: 1664038800,
“videos”: [],
“winning_alliance”: “”
},
{
“actual_time”: null,
“alliances”: {
“blue”: {
“dq_team_keys”: [],
“score”: -1,
“surrogate_team_keys”: [],
“team_keys”: [
“frc1700”,
“frc696”,
“frc1690”
]
},
“red”: {
“dq_team_keys”: [],
“score”: -1,
“surrogate_team_keys”: [],
“team_keys”: [
“frc2046”,
“frc973”,
“frc6036”
]
}
},
“comp_level”: “qm”,
“event_key”: “2022cc”,
“key”: “2022cc_qm10”,
“match_number”: 10,
“post_result_time”: null,
“predicted_time”: 1664043525,
“score_breakdown”: null,
“set_number”: 1,
“time”: 1664043525,
“videos”: [],
“winning_alliance”: “”
},
{
“actual_time”: null,
“alliances”: {
“blue”: {
“dq_team_keys”: [],
“score”: -1,
“surrogate_team_keys”: [],
“team_keys”: [
“frc114”,
“frc2930”,
“frc971”
]
},
“red”: {
“dq_team_keys”: [],
“score”: -1,
“surrogate_team_keys”: [],
“team_keys”: [
“frc3940”,
“frc2813”,
“frc604”
]
}
},
“comp_level”: “qm”,
“event_key”: “2022cc”,
“key”: “2022cc_qm11”,
“match_number”: 11,
“post_result_time”: null,
“predicted_time”: 1664044020,
“score_breakdown”: null,
“set_number”: 1,
“time”: 1664044020,
“videos”: [],
“winning_alliance”: “”
},
{
“actual_time”: null,
“alliances”: {
“blue”: {
“dq_team_keys”: [],
“score”: -1,
“surrogate_team_keys”: [],
“team_keys”: [
“frc6800”,
“frc2910”,
“frc846”
]
},
“red”: {
“dq_team_keys”: [],
“score”: -1,
“surrogate_team_keys”: [],
“team_keys”: [
“frc3476”,
“frc7157”,
“frc3175”
]
}
},
“comp_level”: “qm”,
“event_key”: “2022cc”,
“key”: “2022cc_qm12”,
“match_number”: 12,
“post_result_time”: null,
“predicted_time”: 1664044515,
“score_breakdown”: null,
“set_number”: 1,
“time”: 1664044515,
“videos”: [],
“winning_alliance”: “”
},
{
“actual_time”: null,
“alliances”: {
“blue”: {
“dq_team_keys”: [],
“score”: -1,
“surrogate_team_keys”: [],
“team_keys”: [
“frc1619”,
“frc2486”,
“frc5507”
]
},
“red”: {
“dq_team_keys”: [],
“score”: -1,
“surrogate_team_keys”: [],
“team_keys”: [
“frc5104”,
“frc4255”,
“frc254”
]
}
},
I think the Israel District Event #1 is scheduled to start matches tomorrow. The schedule is not yet up. If it gets posted in the next few hours, you might be able to hit the TBA API for the matches endpoint for event 2023isde1 and verify that the 2023 version of the JSON is the same as 2022.
perfect. Thanks!