Ban Lobby

A “Ban Lobby” is basically an object in which the pick and ban of the team will take place or took place. You are only able to change settings if the Pick/Ban hasn’t started.

API Endpoint:
https://api.mapban.gg/v1/ban/lobby

Create a Ban Lobby

This Request will create a new lobby and respond with all important information of that new lobby.

POST:
https://api.mapban.gg/v1/ban/lobby

RAW data: One Lobby:

{
  "game": "<gameId>",
  "mappool": ["<mapId>","<mapId>","<mapId>","<mapId>","<mapId>","<mapId>","<mapId>"],
  "bo": <bestOf>
}

Multiple Lobbies:

[
  {
    "game": "<gameId>",
    "mappool": ["<mapId>","<mapId>","<mapId>","<mapId>","<mapId>","<mapId>","<mapId>"],
    "bo": <bestOf>
  },
  {
    "game": "<gameId>",
    "mappool": ["<mapId>","<mapId>","<mapId>","<mapId>","<mapId>","<mapId>","<mapId>"],
    "bo": <bestOf>
  }
]
variable description
gameId: Id of the game you want the lobby to be for. (get all games)
mappool: Array with mapIds of the Maps you want to use. (get all maps of a game)
bestOf: Best of (bo) as Integer. 1, 2, 3 or 5

Optional Parameters

variable description
settings: array of settings you would like to have set. (change settings)
voteOrder: Array with voteorder. (change voteorder)
teamNames: Array with teamnames. (change teamnames)

Response Example: One Lobby:

{
    "lobby": {
        "lobbyId": "hSacnq9V9TIwjCtZ",
        "teamId": [
            "benni7EabAxj5Phr",
            "ljtfqVBFetkUe35a"
        ],
        "viewId": "1LzBFUAJA6bdst16",
        "urls": {
            "lobby": "https://www.mapban.gg/ban/lobby/hSacnq9V9TIwjCtZ",
            "team1": "https://www.mapban.gg/ban/team/1/benni7EabAxj5Phr",
            "team2": "https://www.mapban.gg/ban/team/2/ljtfqVBFetkUe35a",
            "viewer": "https://www.mapban.gg/ban/view/1LzBFUAJA6bdst16",
            "log": "https://www.mapban.gg/ban/log/1LzBFUAJA6bdst16",
            "browsersource": "https://www.mapban.gg/browsersource/ban/1LzBFUAJA6bdst16"
        },
        "created": "2019-02-01 09:04:29",
        "game": "r6s",
        "bo": 3,
        "mappoolKey": "Custom",
        "mapIds": [
            "bank",
            "border",
            "club_house",
            "coastline",
            "consulate"
        ],
        "voteOrder": [
            "Ban1",
            "Ban2",
            "Pick1",
            "Pick2",
            "Decider"
        ],
        "settings": {
            "sidePick": true
        }
    }
}

Multiple lobbies:

{
    "lobbies": [
		{
			"lobbyId": "hSacnq9V9TIwjCtZ",
			"teamId": [
				"benni7EabAxj5Phr",
				"ljtfqVBFetkUe35a"
			],
			"viewId": "..."
		},
		{
			"lobbyId": "hSacnq9V9TIwjCtZ",
			"teamId": [
				"benni7EabAxj5Phr",
				"ljtfqVBFetkUe35a"
			],
			"viewId": "..."
		}
	]
}

Get multiple Ban Lobby

This request will get the most important data from all lobbies that have been created with the API. We support some GET filters in order to filter the needed Lobbies a bit more.

GET:
https://api.mapban.gg/v1/ban/lobby

GET filter:

parameter key default description
page 0 Page (starts at 0) of all lobbies, this is needed if the amount of lobbies are higher than the limit
limit 100 (or less) The max Limit you can use is determined by the get limit of your API Level
order DESC DESC = newest Lobby fist; ASC = oldest Lobby first
game none Allows you to only get the lobbies of the supplied game key
from none Unix timestamp of the oldest Lobby you want to receive back
to none Unix timestamp of the newest Lobby you want to receive back

Response Example:
Array with total lobbies, used limit, current page, page count and data of the fetched lobbies.

{
    "total": 15,
    "limit": 100,
    "page": 0,
    "pageCount": 1,
    "data": [
        {
            "lobbyId": "lVVtNwpPHGxIPyDA",
            "teamId": [
                "97f4cMs4jAA3X3di",
                "I9V8pSXE4IS4kvQg"
            ],
            "viewId": "....
key description
total amount of lobbies that were found
limit The limit used to paginate the results. If this is less than ur send limit your account doesn’t support more.
page Current page the request provided
pageCount Total amount of pages possible with this request/limit
data Array with all the important information of the mapban lobbies.

Get a Ban Lobby

This request will get all data of a lobby.

GET:
https://api.mapban.gg/v1/ban/lobby/<lobbyId>

Response Example:
Array with all data of a mapban lobby.

{
    "lobby": {
        "lobbyId": "lVVtNwpPHGxIPyDA",
        "teamId": [
            "UZKllfZUsLlNMj8k",
            "C7kHq2AKXmJdcasi"
        ],
        "viewId": "k21nMjaNYC92ljBk",
        "urls": {
            "lobby": "https://www.mapban.gg/ban/lobby/lVVtNwpPHGxIPyDA",
            "team1": "https://www.mapban.gg/ban/team/1/UZKllfZUsLlNMj8k",
            "team2": "https://www.mapban.gg/ban/team/2/C7kHq2AKXmJdcasi",
            "viewer": "https://www.mapban.gg/ban/view/k21nMjaNYC92ljBk",
            "log": "https://www.mapban.gg/ban/log/k21nMjaNYC92ljBk",
            "browsersource": "https://www.mapban.gg/browsersource/ban/k21nMjaNYC92ljBk"
        },
        "teams": [
            {
                "name": "Best Team",
                "logo": ""
            },
            {
                "name": "Better then Best",
                "logo": ""
            }
        ],
        "created": "2019-06-02 10:09:38",
        "game": "r6s",
        "bo": 3,
        "mappoolKey": "Custom",
        "mapIds": [
            "bank",
            "border",
            "club_house",
            "coastline",
            "consulate",
            "oregon",
            "villa",
            "house",
            "kanal"
        ],
        "voteOrder": [
            "Ban1",
            "Ban2",
            "Ban1",
            "Ban2",
            "Ban1",
            "Ban2",
            "Pick1",
            "Pick2",
            "Decider"
        ],
        "settings": {
            "sidePick": true,
            "sidePickDecider": true,
            "sidePickDeciderTeam1": false,
            "sidePickDeciderTeam2": false
        },
        "status": "CLOSED",
        "finishedMaps": [
            {
                "id": "border",
                "name": "Border",
                "shortName": "Border",
                "image": "https://www.mapban.gg/images/maps/r6s/border.jpg",
                "status": "BANNED",
                "team": 0
            },
            {
                "id": "bank",
                "name": "Bank",
                "shortName": "Bank",
                "image": "https://www.mapban.gg/images/maps/r6s/bank.jpg",
                "status": "BANNED",
                "team": 1
            },
            {
                "id": "club_house",
                "name": "Club House",
                "shortName": "Club House",
                "image": "https://www.mapban.gg/images/maps/r6s/club_house.jpg",
                "status": "BANNED",
                "team": 0
            },
            {
                "id": "coastline",
                "name": "Coastline",
                "shortName": "Coastline",
                "image": "https://www.mapban.gg/images/maps/r6s/coastline.jpg",
                "status": "BANNED",
                "team": 1
            },
            {
                "id": "consulate",
                "name": "Consulate",
                "shortName": "Consulate",
                "image": "https://www.mapban.gg/images/maps/r6s/consulate.jpg",
                "status": "BANNED",
                "team": 0
            },
            {
                "id": "oregon",
                "name": "Oregon",
                "shortName": "Oregon",
                "image": "https://www.mapban.gg/images/maps/r6s/oregon.jpg",
                "status": "BANNED",
                "team": 1
            },
            {
                "id": "kanal",
                "name": "Kanal",
                "shortName": "Kanal",
                "image": "https://www.mapban.gg/images/maps/r6s/kanal.jpg",
                "status": "PICKED",
                "team": 0
            },
            {
                "id": "villa",
                "name": "Villa",
                "shortName": "Villa",
                "image": "https://www.mapban.gg/images/maps/r6s/villa.jpg",
                "status": "PICKED",
                "team": 1
            },
            {
                "id": "house",
                "name": "House",
                "shortName": "House",
                "image": "https://www.mapban.gg/images/maps/r6s/house.jpg",
                "status": "DECIDER",
                "team": null
            }
        ],
        "sidePickData": [
            {
                "map": "Kanal",
                "mapID": 8,
                "pickedTeam": 1,
                "teamSides": [
                    0,
                    1
                ]
            },
            {
                "map": "Villa",
                "mapID": 6,
                "pickedTeam": 0,
                "teamSides": [
                    0,
                    1
                ]
            },
            {
                "map": "House",
                "mapID": 7,
                "pickedTeam": 1,
                "teamSides": [
                    0,
                    1
                ]
            }
        ],
        "logdata": "<u>02. Jun.2019 10:18:34 UTC:</u> Team 1 (Best Team) <b>bans</b> Map \"Border\"!<br><u>02. Jun.2019 10:18:36 UTC:</u> Team 2 (Better then Best) <b>bans</b> Map \"Bank\"!<br><u>02. Jun.2019 10:18:38 UTC:</u> Team 1 (Best Team) <b>bans</b> Map \"Club_House\"!<br><u>02. Jun.2019 10:18:40 UTC:</u> Team 2 (Better then Best) <b>bans</b> Map \"Coastline\"!<br><u>02. Jun.2019 10:18:42 UTC:</u> Team 1 (Best Team) <b>bans</b> Map \"Consulate\"!<br><u>02. Jun.2019 10:18:44 UTC:</u> Team 2 (Better then Best) <b>bans</b> Map \"Oregon\"!<br><u>02. Jun.2019 10:18:47 UTC:</u> Team 1 (Best Team) <b>picks</b> Map \"Kanal\"!<br><u>02. Jun.2019 10:18:50 UTC:</u> Team 2 (Better then Best) <b>picks</b> Map \"Villa\"!<br><u>02. Jun.2019 10:18:50 UTC:</u> Map \"Villa\" will be <b>decider</b>!<br><u>02. Jun.2019 10:18:52 UTC:</u> Team 2 (Better then Best) <b>picked Defender as Side to start on </b> Map \"Kanal\"!<br><u>02. Jun.2019 10:18:56 UTC:</u> Team 1 (Best Team) <b>picked Attacker as Side to start on </b> Map \"Villa\"!<br><u>02. Jun.2019 10:19:02 UTC:</u> Team 2 (Better then Best) <b>picked Defender as Side to start on </b> Map \"House\"!<br>",
        "log": [
            {
                "teamId": "team1",
                "teamName": "Best Team",
                "action": "ban",
                "map": "Border",
                "time": {
                    "unix": 1559470714,
                    "date": "02/06/2019 10:18:34 UTC"
                }
            },
            {
                "teamId": "team2",
                "teamName": "Better then Best",
                "action": "ban",
                "map": "Bank",
                "time": {
                    "unix": 1559470716,
                    "date": "02/06/2019 10:18:36 UTC"
                }
            },
            {
                "teamId": "team1",
                "teamName": "Best Team",
                "action": "ban",
                "map": "Club_House",
                "time": {
                    "unix": 1559470718,
                    "date": "02/06/2019 10:18:38 UTC"
                }
            },
            {
                "teamId": "team2",
                "teamName": "Better then Best",
                "action": "ban",
                "map": "Coastline",
                "time": {
                    "unix": 1559470720,
                    "date": "02/06/2019 10:18:40 UTC"
                }
            },
            {
                "teamId": "team1",
                "teamName": "Best Team",
                "action": "ban",
                "map": "Consulate",
                "time": {
                    "unix": 1559470722,
                    "date": "02/06/2019 10:18:42 UTC"
                }
            },
            {
                "teamId": "team2",
                "teamName": "Better then Best",
                "action": "ban",
                "map": "Oregon",
                "time": {
                    "unix": 1559470724,
                    "date": "02/06/2019 10:18:44 UTC"
                }
            },
            {
                "teamId": "team1",
                "teamName": "Best Team",
                "action": "pick",
                "map": "Kanal",
                "time": {
                    "unix": 1559470727,
                    "date": "02/06/2019 10:18:47 UTC"
                }
            },
            {
                "teamId": "team2",
                "teamName": "Better then Best",
                "action": "pick",
                "map": "Villa",
                "time": {
                    "unix": 1559470730,
                    "date": "02/06/2019 10:18:50 UTC"
                }
            },
            {
                "teamId": "system",
                "teamName": "The System",
                "action": "decider",
                "map": "Villa",
                "time": {
                    "unix": 1559470730,
                    "date": "02/06/2019 10:18:50 UTC"
                }
            },
            {
                "teamId": "team2",
                "teamName": "Better then Best",
                "action": "picksSide2",
                "sideName": "Defender",
                "map": "Kanal",
                "time": {
                    "unix": 1559470732,
                    "date": "02/06/2019 10:18:52 UTC"
                }
            },
            {
                "teamId": "team1",
                "teamName": "Best Team",
                "action": "picksSide1",
                "sideName": "Attacker",
                "map": "Villa",
                "time": {
                    "unix": 1559470736,
                    "date": "02/06/2019 10:18:56 UTC"
                }
            },
            {
                "teamId": "team2",
                "teamName": "Better then Best",
                "action": "picksSide2",
                "sideName": "Defender",
                "map": "House",
                "time": {
                    "unix": 1559470742,
                    "date": "02/06/2019 10:19:02 UTC"
                }
            }
        ]
    }
}

Delete a Lobby

This request will delete not started lobby. This can be used to free space of the Limits

DELETE:
https://api.mapban.gg/v1/ban/lobby/<lobbyId>

Response Example:
will return True when Lobby was deleted.

True

Settings

A Lobby can have some different settings. Most settings depends on the used games. Not all games supports all settings.

Get Settings

API will list all possible Settings even if the game of the lobby doesn’t support that setting. Response is similar to RAW data you will need to change the settings.

GET:
https://api.mapban.gg/v1/ban/lobby/<lobbyId>/settings

Response Example:

{
    "settings": {
        "sidePick": true,
        "sidePickDecider": false,
        "sidePickDeciderTeam1": false,
        "sidePickDeciderTeam2": false
    }
}

Change Settings

You are able to change as many settings as you want. Response is the same as a get request after changing the settings.

POST:
https://api.mapban.gg/v1/ban/lobby/<lobbyId>/settings

RAW data:

{
    "settings": {
        "<setting>": <boolean>
    }
}
variable description
setting: the setting you want to change
boolean: true or false
setting description
sidePick Should the teams be asked to pick sides after banning and picking all maps?
sidePickDecider Should one of the Teams be able to pick a side for the decider map?
sidePickDeciderTeam1 If True Team 1 will pick the Side on Decider. If both options are false, team will be randomly selected!
sidePickDeciderTeam2 If True Team 2 will pick the Side on Decider. If both options are false, team will be randomly selected!

Response Example:

{
    "settings": {
        "sidePick": true,
        "sidePickDecider": true,
        "sidePickDeciderTeam1": false,
        "sidePickDeciderTeam2": false
    }
}

Vote order

The Vote order defines which team will pick and ban at which step of the lobby.

Get Vote Order

Responds with an Array showing the Vote Order. Array can be smaller as the amount of Maps as the Decider will be picked random of the remaining maps.

GET:
https://api.mapban.gg/v1/ban/lobby/<lobbyId>/voteorder

Response Example:

{
    "voteOrder": [
        "Ban1",
        "Ban2",
        "Pick1",
        "Pick2",
        "Ban1",
        "Ban2",
        "Decider"
    ]
}

Change Vote Order

You are able to change the voteorder. If you don’t follow the Rules explained below, you will get an error with information about what’s wrong. Response is the same as a get request after changing the vote order.

POST:
https://api.mapban.gg/v1/ban/lobby/<lobbyId>/voteorder

RAW data example:

{
    "voteOrder": [
        "<function>",
        "<function>",
        "<function>",
        "<function>",
        "<function>",
        "<function>",
        "<function>"
    ]
}
variable description
function What should the lobby do at this position?
function description
Ban1 Team 1 will ban a Map
Ban2 Team 2 will ban a Map
Pick1 Team 1 will pick a Map
Pick2 Team 2 will pick a Map
Decider If best of isn’t 2 this needs to be the last Position

Rules:

  • Amount of functions can’t be more as the amounts of maps, but it can be less.

If best of isn’t 2:

  • “Decider” needs to be the last position.
  • You need to have ONLY one “Decider”.
  • Amount of “Pick1”, “Pick2” and “Decider” needs to be the same as the best of.
  • Amount of “Pick1” and “Pick2” needs to be equal. One team can’t pick more maps as the other team.

If best of is 2:

  • Last Position needs to be a “Pick1” or “Pick2”.
  • You are not allowed to have a “Decider”.
  • Amount of “Pick1” and “Pick2” needs to be the same as the best of.
  • Amount of “Pick1” and “Pick2” needs to be equal. One team can’t pick more maps as the other team.

Response Example:

{
    "voteOrder": [
        "Ban1",
        "Ban2",
        "Ban1",
        "Ban2",
        "Pick1",
        "Pick2",
        "Decider"
    ]
}

Team Names

The names of the teams.

Get Team Names

Responds with an Array showing the team names.

GET:
https://api.mapban.gg/v1/ban/lobby/<lobbyId>/teamnames

Response Example:

{
    "teamNames": [
        "Team 1 Name",
        "Team2"
    ]
}

Change Team Names

Easy way to change team names. Response is the same as a get request after changing the team names.

POST:
https://api.mapban.gg/v1/ban/lobby/<lobbyId>/teamnames

RAW data example:

{
    "teamNames": [
        <name>,
        <name>
    ]
}
variable description
name String. Send null if you don’t want to change that name. Send “” if you want the team to choose the name (default).

Response Example:

{
    "teamNames": [
        "Best Team NA",
        "Best Team EU"
    ]
}

Embedding an iFrame

You can embed a view/team/log url as iFrame into your website. By adding ?iframe at the end of the url you will hide our Navigation and basic footer as well as all ads. It’s important that the language is already set in the url:

https://www.mapban.gg/en/ban/team/1/dSO3hw7Ej9PY0mts?iframe

and not

https://www.mapban.gg/ban/team/1/dSO3hw7Ej9PY0mts?iframe

Currently it’s possible with /ban/team, /ban/view and /ban/log! If other pages might be interesting, let us know.