Skip to content

Enable or disable bandwidth pooling for a location

PATCH/bandwidth-blocks/pooling

Overview

Enables or disables bandwidth pooling for a location in the current team. Send location_id and enabled. With pooling enabled, the team's servers there share one bandwidth allowance. Each team has its own pools, so servers in the account's other teams are not affected. Otherwise, each server is metered separately. Disabling pooling distributes recorded usage back to individual servers, attaches blocks bound to that location to each of the team's metered servers there, and keeps transfer the pool already drew from a block counting for the servers that block covers. It may immediately throttle servers over their limits. Request a preview first. Returns the team's updated figures for every location.

Permissions

Requires the network.update (Change networking) permission for the selected team. Resources outside that team return 404.

curl --request PATCH \
  --url 'https://console.advinservers.com/api/v1/client/bandwidth-blocks/pooling' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "location_id": 3,
  "enabled": false
}'
{
  "location_id": 3,
  "pooling": false,
  "pooled_locations": [],
  "pools": [
    {
      "location_id": 3,
      "name": "Kansas City, MO",
      "region": "us_eu",
      "region_label": "Americas & EMEA",
      "pooling": false,
      "servers": 2,
      "shaped_servers": 0,
      "base_limit": 10995116277760,
      "usage": 1358993459200,
      "capacity": 12644383719424,
      "covered": 1649267441664,
      "remaining": 11285390260224,
      "blocks": 1,
      "block_bytes_available": 1649267441664,
      "exhausted": false
    }
  ]
}

Authorization

Authorizationstringheaderrequired

Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

Send it as Bearer <token>.

Body

application/json
location_idintegerrequired

The location id ID.

enabledbooleanrequired

The value of enabled.

Response 200

application/json

The record, as a JSON object. There is no envelope.

location_idintegerrequired

The city that was switched.

poolingbooleanrequired

Whether it pools now.

pooled_locationsinteger[]required

Every city where the team pools, after the change.

poolsobject[]required

Every city's figures, as they stand after the change.

Show child attributes
location_idintegerrequired

The location id ID.

namestringrequired

The name shown to customers.

regionstringrequired

The value of region.

One of: us_eu, apac

region_labelstringrequired

The value of region_label.

poolingbooleanrequired

Whether the team's servers here share one budget or are metered one by one.

serversintegerrequired

The value of servers.

shaped_serversintegerrequired

The value of shaped_servers.

base_limitintegerrequired

What the plans alone allow here, in bytes.

usageintegerrequired

The value of usage.

capacityintegerrequired

The budget in force, plans and blocks together.

coveredintegerrequired

How much of that budget the team's blocks are responsible for.

remainingintegerrequired

The value of remaining.

blocksintegerrequired

The value of blocks.

block_bytes_availableintegerrequired

The value of block_bytes_available.

exhaustedbooleanrequired

With pooling on, the whole city at once. With it off, whether at least one server here has been shaped.

Errors

401
The key was missing, malformed, revoked, or belongs to an account that no longer exists.
403
Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
422
A field is missing or invalid, or the resource cannot accept this change in its current state. Check message for details. Field validation also includes an errors object keyed by field name.
429
Too many requests. The Retry-After header says how many seconds to wait. Limits are per account, so several keys on one account share them.