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.
Response
The response for a successful request contains the following properties:
Name | Data Type | Description |
---|---|---|
@id | String | Indicates the relative path to this endpoint. |
@type | String | Returns Collection. |
items | List of dictionaries | Contains a list of regions. |
total_items | Number | Indicates the total number of regions. |
items List
The items list describes each region through the following properties:
Name | Data Type | Description |
---|---|---|
@id | String | Indicates the relative path to a resource-specific endpoint. |
@type | String | Returns ManagedSlicerRegion. |
id | String | Indicates the region's system-defined ID. |
name | String | Indicates the region's name. |
location | String | Indicates 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
}