Get CSL Regions

Retrieves a list of regions where you can host a CSL slicer.

Request

Request syntax:

GET /managed-slicer/regions

Authentication

Pass a digital signature based off of msg.

Learn more.

Response

The response for a successful request contains the following properties:

NameData TypeDescription
@idStringIndicates the relative path to this endpoint.
@typeStringReturns Collection.
itemsList of dictionariesContains a list of regions.
total_itemsNumberIndicates the total number of regions.

items List

The items list describes each region through the following properties:

NameData TypeDescription
@idStringIndicates the relative path to a resource-specific endpoint.
@typeStringReturns ManagedSlicerRegion.
idStringIndicates the region's system-defined ID.
nameStringIndicates the region's name.
locationStringIndicates the region's location.

Sample Request/Response

Call the get_csl_regions module (Python 3) to retrieve a list of regions. This module imports names from the api_auth module.

import requests
from api_auth import APICredentials, APIParams

class CSLSlicerRegions:
    def __init__(self):
        self.host = "https://services.uplynk.com"

    def run(self):
        self._get_csl_regions()

    def _get_csl_regions(self):
        url = "{}{}".format(self.host, "/api/v4/managed-slicer/regions")

        headers = {'Content-Type': 'application/json'}

        response = requests.get(
            url, params=APIParams(APICredentials()).get_params({}), headers=headers
        )

        print(response.json())

CSLSlicerRegions().run()

Response:

{
	'@id': '/api/v4/managed-slicer/regions',
	'@type': 'Collection',
	'items': [{
			'@id': '/api/v4/managed-slicer/regions/a7548f530d4347a7a627499ea71e1726',
			'@type': 'ManagedSlicerRegion',
			'id': 'a7548f530d4347a7a627499ea71e1726',
			'name': 'North Virginia',
			'location': 'us-east-1'
		}, {
			'@id': '/api/v4/managed-slicer/regions/e1d9f8f3c9a24be68177654ded5b2912',
			'@type': 'ManagedSlicerRegion',
			'id': 'e1d9f8f3c9a24be68177654ded5b2912',
			'name': 'Ohio',
			'location': 'us-east-2'
		}, {
			'@id': '/api/v4/managed-slicer/regions/ac123581b66c45ecb2660d2da16de109',
			'@type': 'ManagedSlicerRegion',
			'id': 'ac123581b66c45ecb2660d2da16de109',
			'name': 'Oregon',
			'location': 'us-west-2'
		}, {
			'@id': '/api/v4/managed-slicer/regions/0547f4694d474a3aacc152faa205997f',
			'@type': 'ManagedSlicerRegion',
			'id': '0547f4694d474a3aacc152faa205997f',
			'name': 'Frankfurt',
			'location': 'eu-central-1'
		}
	],
	'total_items': 4
}