Allocate V2
Documentation for Allocate V2
Read time 1 minuteLast updated 2 months ago
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 parameter accepts the ID of the fleet to which the allocation belongs. | No |
regionid | The 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 parameter accepts a profile ID. The provided profile ID is applied to the game servers. | No |
uuid | The 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 is the project ID identifying the Unity project GUID (globally unique identifier). Refer to . | Yes (unless using ) |
restart | The parameter accepts true or false. If set to true, the allocation will restart the game server. | Yes |
Response fields
|
|
|
|
|---|---|---|---|
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 | 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> }}