Leaseweb API for aggregation packs (v2)

Network Automation Team: development-networkautomation@leaseweb.com License: Apache 2.0

This documents the rest api aggregation packs provides.

Errors

The API uses standard HTTP status codes to indicate the success or failure of the API call. The response will be JSON. Most APIs use the following format:

{
    "errorCode": "APP00800",
    "errorMessage": "The connection with the DB cannot be established.",
    "correlationId": "550e8400-e29b-41d4-a716-446655440000",
    "userMessage": "Cannot handle your request at the moment. Please try again later.",
    "reference": "https://developer.leaseweb.com/errors/APP00800"
}

API Key Authentication

Authentication for the APIs is required. To authenticate your call, you will need to sent your API key as X-LSW-Auth header.

You can generate API keys in the Customer Portal.

Aggregation Packs

List aggregation packs

List your Aggregation Packs. This api call supports pagination. Use the limit and offset query string parameters to paginate through all your aggregation packs.

Every aggregation pack object in the json response lists a few properties of a aggregation pack. Use the single resource api call to get more details for a single aggregation pack.

Authorizations:
X-LSW-Auth
query Parameters
limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/bareMetals/v2/aggregationPacks?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'X-LSW-Auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "connectContractItems": [
    ]
}

Get aggregation pack

Use this API to get information about a single aggregation pack.

Authorizations:
X-LSW-Auth
path Parameters
aggregationPackId
required
string

The ID of aggregation pack

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/bareMetals/v2/aggregationPacks/%7BaggregationPackId%7D \
  --header 'X-LSW-Auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "aggregationType": "Hybrid",
  • "billingType": "95TH",
  • "connectivityType": "BANDWIDTH_POOL",
  • "contractStartDate": "2022-07-01T00:00:00Z",
  • "contractTerm": 36,
  • "customerId": "1234",
  • "dataTrafficCommit": 20000,
  • "dataTrafficCommitUnit": "Mbps",
  • "id": "123456",
  • "networkPerformanceType": "VOLUME",
  • "salesOrgId": "2000"
}