Fleet profile switch
Warning: The API documentation here is for Clanforge. If you’re using Multiplay Hosting, refer to the Multiplay Hosting 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, 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, 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 |
PATCH | application/json |
Request parameters
VARIABLE | DESCRIPTION | OPTIONAL |
FleetID | Fleet ID to apply the profile switch to. | No |
ProfileID | The provided profile ID will be applied to the game servers. | No |
Timeout | The time to wait before force restarting all remaining game servers. You must specify the unit of time (e.g., | No |
MaxMachines | An integer representing the maximum number of machines to process at a time in batches. This parameter is optional, however, 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
Field | Type | Description | Optional |
---|---|---|---|
ServersPending | number | Number of servers still to be processed. | No |
ServersProcessed | number | Number of servers that have been processed. | No |
ProfileID | number | The ID of the profile. | No |
State | string | The current state of the switch. The following possible values can be set: pending , processing , complete , not requested . | No |
Deadline | string | The 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>
}