Fleet profile switch

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

Switch the profile of all game servers within a reservation-based fleet to the specified profile ID.

The fleet profile switch endpoint accepts a FleetID, a ProfileID parameter, Timeout parameter, and optionally, a MaxMachines parameter. Fleet profile switch restarts all game servers in a reservation-based fleet specified by the FleetID to use the profile identified by the ProfileID parameter. If any of the game servers fail to restart before the specified Timeout parameter value, Game Server Hosting (Clanforge) will force-restart the game servers.

The fleet profile switch endpoint is for reservation-based fleets ONLY. If you have an allocation-based fleet, Game Server Hosting (Clanforge) automatically switches the game server profile when you use the Allocate API call.

https://api.multiplay.co.uk/cfp/v2/fleet/<fleetID>/switchprofile

METHOD

CONTENT TYPE
PATCHapplication/json

Request parameters

VARIABLEDESCRIPTIONOPTIONAL
FleetIDFleet ID to apply the profile switch to.No
ProfileIDThe provided profile ID will be applied to the game servers.No
TimeoutThe time to wait before force restarting all remaining game servers.

You must specify the unit of time (e.g., 60s for 60 seconds, 6000ns for 6000 nanoseconds, 2h for two hours).

No
MaxMachinesAn integer representing the maximum number of machines to process at a time in batches.

This parameter is optional, however, Game Server Hosting (Clanforge) recommends using it to control how many servers will be unavailable at a time. If undefined, all empty game servers will be processed at once.

Yes

Response fields

FieldTypeDescriptionOptional
ServersPendingnumberNumber of servers still to be processed.No
ServersProcessednumberNumber of servers that have been processed.No
ProfileIDnumberThe ID of the profile.No
StatestringThe current state of the switch. The following possible values can be set: pending, processing, complete, not requested.No
DeadlinestringThe time of the deadline if a timeout was set in the switch profile request. The format is 2019-02-28T12:34:03.58Z UTC.Yes

Example request

curl --location --request PATCH 'https://api.multiplay.co.uk/cfp/v2/fleet/<fleetID>/switchprofile' \
--header 'Authorization: Basic YOUR_AUTH_CREDENTIALS'\
--header 'Content-Type: application/json' \
--data-raw '{"ProfileID": <profileID>, "Timeout": "<time>", "MaxMachines": <count>}'

Example response

{
    "ServersPending": <ServersPending>,
    "ServersProcessed": <ServersProcessed>,
    "ProfileID": <ProfileID>
    "Deadline": <Deadline> 
    "State": <State>
}