Fleet profile switch
Documentation for Fleet profile switch
Read time 1 minuteLast updated a year ago
Switch the profile of all game servers within a reservation-based fleet to the specified profile ID.
The fleet profile switch endpoint accepts a , a parameter, parameter, and optionally, a parameter. Fleet profile switch restarts all game servers in a reservation-based fleet specified by the to use the profile identified by the parameter. If any of the game servers fail to restart before the specified parameter value, Clanforge will force-restart the game servers.
FleetIDProfileIDTimeoutMaxMachinesFleetIDProfileIDTimeoutThe 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., for 60 seconds, for 6000 nanoseconds, for two hours). | 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
|
|
|
|
|---|---|---|---|
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: , , , . | No |
Deadline | string | The time of the deadline if a timeout was set in the switch profile request. The format is 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>}