NBA Teams

These endpoints allow you to retrieve all NBA teams, a single NBA team by its id, or a random NBA team. The response will be an array of JSON objects if you request all teams, or a single JSON object if you request a single team or a random team.

The NBA Team model

PropTypeDefault
id
integer
-
city
string
-
conference
string
-
division
string
-
full_name
string
-
name
string
-

All NBA teams

GET/nba-teams

Retrieve all NBA teams.

{
  "data": [
    {
      "id": 1,
      "city": "Atlanta",
      "conference": "East",
      "division": "Southeast",
      "full_name": "Atlanta Hawks",
      "name": "Hawks"
    },
    {
      "id": 2,
      "city": "Boston",
      "conference": "East",
      "division": "Atlantic",
      "full_name": "Boston Celtics",
      "name": "Celtics"
    }
    // ...
  ],
  "meta": {
    "isFirstPage": true,
    "isLastPage": true,
    "currentPage": 1,
    "previousPage": null,
    "nextPage": null,
    "pageCount": 1,
    "totalCount": 2
  }
}

Single NBA team

GET/nba-teams/<id>

Retrieve a single NBA team by its id.

{
  "data": {
    "id": 1,
    "city": "Atlanta",
    "conference": "East",
    "division": "Southeast",
    "full_name": "Atlanta Hawks",
    "name": "Hawks"
  },
  "meta": {}
}

Random NBA team

GET/nba-teams/random

Retrieve a random NBA team.

{
  "data": {
    "id": 5,
    "city": "Chicago",
    "conference": "East",
    "division": "Central",
    "full_name": "Chicago Bulls",
    "name": "Bulls"
  },
  "meta": {}
}