Reserve

Warning: The API documentation here is for Clanforge. If you’re using Multiplay Hosting, refer to the Multiplay Hosting API documentation.

Reserve a game server specified by <serverid> on the machine specified by <machineid>.

Unlike allocations, you must reserve game servers from the dedicated game server when a player joins or the game server is in an active state. Both the machine ID and server ID are generated on Clanforge and passed through to the game server.

https://api.multiplay.co.uk/cfp/v1/machine/<machineid>/reserve_server

METHOD

CONTENT TYPE
GETapplication/x-www-form-urlencoded

Request parameters

VARIABLEDESCRIPTIONOPTIONAL
machineidThe <machineid> parameter accepts an identifier of a machine within a fleet.No
serveridThe <serverid> parameter accepts a game server instance ID of a game server on the specified machine.No

Response fields

FieldTypeDescriptionOptional
profileidintegerID of the profile used by this serverNo
uuidstringID of the allocationNo
regionsstringID of regions this game server is inNo
createdstringTime at which the reservation was createdNo
requestedstringTime at which the reservation was requestedNo
fulfilledstringTime at which the reservation was fulfilledNo
serveridintegerID of the server for this reservationNo
fleetidstringID of the fleet this server is inNo
regionidstringID of the region this server is inNo
machineidintegerID of the machine this server is onNo
ipstringIP (version 4) address of this game serverNo
ipv6stringIP (version 6) address of this game server (if supported by your fleet)Yes
game_portintegerNetwork port for this game serverNo

Example request

curl --location --request GET 'https://api.multiplay.co.uk/cfp/v1/machine/<machineid>/reserve_server?serverid=<serverid>' \
--header 'Authorization: Basic YOUR_AUTH_CREDENTIALS'\
--header 'Content-Type: application/x-www-form-urlencoded'

Example response

{
    "success": <status>,
    "messages": [],
    "allocation": {
        "profileid": <profileid>,
        "uuid": <uuid>,
        "regions": <regions>,
        "created": <created>,
        "requested": <requested>,
        "fulfilled": <fufilled>,
        "serverid": <serverid>,
        "fleetid": <fleetid>,
        "regionid": <regionid>,
        "machineid": <machineid>,
        "ip": <ip>,
        "game_port": <port>
    }
}