Aquila
Allocation

Allocate

POST
/allocation.v1.AllocationService/Allocate

Allocate returns RESOURCE_EXHAUSTED when the fleet has no Ready server matching the selectors. It never waits for one. NOT_FOUND means the org has no fleet of that name in this zone.

Authorization

apiKey
headerAuthorizationBearer <token>

An organization API key with the allocate scope.

Request Body

application/json
  1. body
fleet?fleet

The name of the fleet to allocate from.

Length1 <= length <= 63
selectors?

Only servers whose labels match all of these. SDK-set labels carry the sdk.aquilahosting.com/ prefix.

Propertiesproperties <= 16
labels?

Labels set on the allocated server, under sdk.aquilahosting.com/.

Propertiesproperties <= 16
annotations?

Annotations set on the allocated server, under sdk.aquilahosting.com/. The game reads them through the SDK.

Propertiesproperties <= 16

Response Body

Success

application/json
  1. response
gameServer?game_server

The allocated server's name.

address?address

Players connect to this address on the ports below.

ports?array<>
zone?zone

The zone the server runs in.

Example Request
curl -X POST 'https://allocate-eu.aquilahosting.com/allocation.v1.AllocationService/Allocate' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "gameServer": "string",  "address": "string",  "ports": [    {      "name": "string",      "port": 0,      "protocol": "string"    }  ],  "zone": "string"}