Allocate V2
Warning: The API documentation here is for Clanforge. If you’re using Multiplay Hosting, refer to the Multiplay Hosting API documentation.
Queues an allocation request with the option to include a payload set in the body. When the request completes, Clanforge 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 |
POST | raw/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
VARIABLE | DESCRIPTION | OPTIONAL |
fleetid | The <fleetid> parameter accepts the ID of the fleet to which the allocation belongs. | No |
regionid | The <regionid> parameter accepts the ID of the region to use for the allocation. Region IDs are provided by Clanforge and unique to your account. | No |
profileid | The <profileid> parameter accepts a profile ID. The provided profile ID is applied to the game servers. | No |
uuid | The <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_guid | The <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) |
restart | The <restart> parameter accepts true or false. If set to true, the allocation will restart the game server. | Yes |
Response fields
Field | Type | Description | Optional |
---|---|---|---|
profileid | integer | ID of the profile used by this server | No |
uuid | string | ID of the allocation | No |
regions | string | ID of regions this game server is in | No |
created | string | Time at which the allocation was created | No |
requested | string | Time at which the allocation was requested | No |
ready | string | Time at which the allocation was marked as ready for players | Yes |
fleetid | string | ID of the fleet this server is in | No |
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>
}
}