How to Get Team or Event ID for RobotEvents API

Hi everyone,
My friends and I started a team a few months ago (23900B), and I wanted to make a log of our matches. I requested an API key from robotevents.com, and received one, but it keeps on asking me for an integer id when requesting the data for events and teams.
Would anyone happen to know how to receive this key?

Thanks!

The documentation on robotevents.com/api/v2 is good. For example, to find your team (assuming you properly put your API key in the header) would use the following request URL:

https://www.robotevents.com/api/v2/teams?number%5B%5D=23900B&myTeams=false

Similar for Event Code (which they call SKU)

3 Likes

Thank you!
But I’m still a little bit confused on what a team or event ID is.

The “team ID” is a number used to uniquely identify a team in RobotEvents. It is not the same as your “team number”. For example, a VRC team and an IQ team could both have number 1234A in their respective programs, but those teams would have different IDs in RobotEvents. You can use the “teams” API endpoint to get a team’s ID searching by team number, program, and/or other parameters.

3 Likes

Thank you for the info!

Team Number is the team number most of us are familiar with (e.g. 23900B. TeamID will be in the response body:

{
  "meta": {
    "current_page": 1,
    "first_page_url": "https://www.robotevents.com/api/v2/teams?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://www.robotevents.com/api/v2/teams?page=1",
    "next_page_url": null,
    "path": "https://www.robotevents.com/api/v2/teams",
    "per_page": 15,
    "prev_page_url": null,
    "to": 2,
    "total": 2
  },
  "data": [
    {
      "id": 125430,
      "number": "23900B",
      "team_name": "Bengal Bots B",
      "robot_name": "",
      "organization": "Beechwood Middle School",
      "location": {
        "venue": null,
        "address_1": "",
        "address_2": null,
        "city": "Lexington",
        "region": "South Carolina",
        "postcode": "29072",
        "country": "United States",
        "coordinates": {
          "lat": 34,
          "lon": -81.3
        }
      },
      "registered": true,
      "program": {
        "id": 41,
        "name": "VEX IQ Challenge",
        "code": "VIQC"
      },
      "grade": "Middle School"
    },
    {
      "id": 136072,
      "number": "23900B",
      "team_name": "ICCWVMiddle2-SPeedZAppeRs",
      "robot_name": null,
      "organization": "India Community Center",
      "location": {
        "venue": null,
        "address_1": "",
        "address_2": null,
        "city": "Milpitas",
        "region": "California",
        "postcode": "95035",
        "country": "United States",
        "coordinates": {
          "lat": 37.4,
          "lon": -121.9
        }
      },
      "registered": true,
      "program": {
        "id": 1,
        "name": "VEX Robotics Competition",
        "code": "VRC"
      },
      "grade": "Middle School"
    }
  ]
}

In your case, your TeamID is 125430, which is pretty meaningless outside this API.

The “Event SKU” is the “Event Code” published by RobotEvents. This will typically be a string that looks like “RE-VRC-XX-YYYY” where XX is a 2 digit year (e.g. 21 or 22) and YYYY is some numeric for the event. The EventID will come back much like it does for teams.

4 Likes