Allocate V2

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.

Queues an allocation request with the option to include a payload set in the body. When the request completes, Game Server Hosting (Multiplay) associates the first available game server identified by the reactive scaling system with the allocation. You can query the status of outstanding requests with Server Allocations calls.

https://api.multiplay.co.uk/cfp/v2/fleet/<fleetid>/server/allocate

METHOD

CONTENT TYPE
POSTraw/text/plain

Note: You can use any MIME type that stores data within the request body. For example, text/cvs, image/png, and video/mp4 are all acceptable MIME types.

Request parameters

VARIABLEDESCRIPTIONOPTIONAL
fleetidThe <fleetid> parameter accepts the ID of the fleet to which the allocation belongs.No
regionidThe <regionid> parameter accepts the ID of the region to use for the allocation. Region IDs are provided by Game Server Hosting (Multiplay) and unique to your account.No
profileidThe <profileid> parameter accepts a profile ID. The provided profile ID is applied to the game servers.No
uuidThe <uuid> parameter accepts a UUID to use as the allocation identifier for the game server after the allocation has been fulfilled. This must be a valid UUID that you generate.No
project_guidThe <project_guid> is the project ID identifying the Unity project GUID (globally unique identifier).
Refer to Setting up your project for Unity services.
Yes (unless using Allocations Payload)
restartThe <restart> parameter accepts true or false. If set to true, the allocation will restart the game server.Yes

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 allocation was createdNo
requestedstringTime at which the allocation was requestedNo
readystringTime at which the allocation was marked as ready for playersYes
fleetidstringID of the fleet this server is inNo

Example request

curl --location --request POST 'https://api.multiplay.co.uk/cfp/v2/fleet/<fleetid>/server/allocate?regionid=<regionid>&profileid=<profileid>&uuid=<uuid>&project_guid=<project_guid>' \
--header 'Authorization: Basic YOUR_AUTH_CREDENTIALS'\
--header 'X-Enable-Payload: true' \
--header 'Content-Type: text/plain' \
--data-raw 'This can be anything.'

Example response

{
    "success": true,
    "messages": [],
    "allocation": {
        "profileid": <profileid>,
        "uuid": <uuid>,
        "regions": <regions>,
        "requested": <daterequested>,
        "created": <datecreated>,
        "fleetid": <fleetid>,
        "ready": <status>
    }
}