API reference
Every call a studio makes to Aquila, generated from the API definitions.
Calling the APIs
Fleets, matchmaking and allocation are Connect services. Each RPC is a POST to /<package>.<Service>/<Method> with a JSON body, and answers with JSON.
curl https://api.aquilahosting.com/fleets.v1.FleetService/ListFleets \
-H "Authorization: Bearer $AQUILA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"organizationId": "<your organization id>"}'For a typed client in Go or TypeScript, generate one from the protobuf schema.
Field names are lowerCamelCase in JSON. Enums are sent by name, such as "PORT_PROTOCOL_UDP".
Errors
A failed call answers with a non-200 status and a body holding a code and a message:
{
"code": "resource_exhausted",
"message": "no Ready server in this fleet matches, try again or scale the fleet up"
}| Code | Means |
|---|---|
unauthenticated | No key, or a key this zone does not recognise |
permission_denied | The key lacks the scope the call needs |
not_found | No such fleet, ticket or server in this organization |
invalid_argument | The request broke a field rule. The message names the field |
failed_precondition | The organization is not approved, or the resource is in a state that refuses the call |
resource_exhausted | No Ready server to allocate, or a rate limit was hit |
The APIs
| API | Endpoint | Scope |
|---|---|---|
| Fleets | https://api.aquilahosting.com | fleets:read, fleets:write |
| Matchmaking | https://api.aquilahosting.com | matchmaking |
| Allocation | https://allocate-<zone>.aquilahosting.com | allocate |
| Game server SDK | AQUILA_SDK_URL, inside the server | The server's own token |