Retrieves all publishing locations.
Request
Request syntax:
GET /syndication-regions
Response
The response for a successful request contains the following properties:
| Name | Data Type | Description |
|---|---|---|
| @id | String | Indicates the relative path to the requested endpoint. |
| @type | String | Returns Collection. |
| items | List of dictionaries | Contains a list of publishing locations. |
| total_items | Integer | Indicates the total number of publishing locations. |
items List
The items list describes each publishing location via the following properties:
| Name | Data Type | Description |
|---|---|---|
| id | String | Identifies this publishing location by its system-defined ID. |
| name | String | Identifies this publishing location by its name. |
Sample Request/Response
The code below (Python 3) shows how to retrieve all publishing locations.
This code imports names from the api_auth module for V4 APIs (see below).
🦉
API Auth for Classic Authentication (V4 APIs)
Open Recipe
import requests
from api_auth import APICredentials, APIParams
class PublishingLocation:
def __init__(self):
self.host = "https://services.uplynk.com"
def run(self):
self._get_publishing_locations()
def _get_publishing_locations(self):
url = "{}{}".format(self.host, "/api/v4/syndication-regions")
headers = {'Content-Type': 'application/json'}
response = requests.get(
url, params=APIParams(APICredentials()).get_params({}), headers=headers
)
print(response.json())
PublishingLocation().run()Response:
{
"@id": "/api/v4/syndication-regions",
"@type": "Collection",
"items": [{
"id": "us-east-1",
"name": "AWS - USA - East - N. Virginia"
}, {
"id": "us-east-2",
"name": "AWS - USA - East - Ohio"
}, {
"id": "us-west-2",
"name": "AWS - USA - West - Oregon"
}, {
"id": "sa-east-1",
"name": "AWS - South America - East - Sao Paulo"
}, {
"id": "eu-central-1",
"name": "AWS - Europe - Central - Frankfurt"
}, {
"id": "eu-west-1",
"name": "AWS - Europe - West - Ireland"
}, {
"id": "ap-south-1",
"name": "AWS - Asia Pacific - South - Mumbai"
}, {
"id": "ap-southeast-1",
"name": "AWS - Asia Pacific - South East - Singapore"
}
],
"total_items": 9
}