Get Allowed Users

Retrieves a list of users that are authorized to use a failover group.

Request

Request syntax:

GET /failover-groups/Failover Group ID/allowed-owners

Request URL variable:

Define the following variable when submitting the above request:

VariableA variable represents a value that must be replaced. A variable consists of either a URL segment (e.g., "0001" in /0001/) or a query string value (e.g., "3" in mediaTypes=3).Description
Failover Group ID RequiredReplace this variable with the system-defined ID assigned to the desired failover group. Use the Get All Failover Groups endpoint to retrieve a list of failover groups and their system-defined ID.

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 users that are authorized to use this failover group.
total_itemsStringIndicates the total number of authorized users.

The response for a successful request contains the following properties:

NameData TypeDescription
idStringReserved for future use.
ownerStringIndicates the system-defined ID for a user that is authorized to use this failover group.
failover_group_idStringIdentifies this failover group by its system-defined ID.

Sample Request/Response

Call the get_allowed_users module (Python 3) to retrieve a list of authorized users for a specific failover group. This module imports names from the api_auth module.

import requests
from api_auth import APICredentials, APIParams

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

    def run(self):
        self._get_allowed_users()

    def _get_allowed_users(self):
        failover_group_id = 'e8d6b5cb940c40cc9ec6ad081a38f3f0' # Replace with the ID for the desired failover group.
        url = "{}{}{}{}".format(self.host, "/api/v4/failover-groups/", failover_group_id, "/allowed-owners")

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

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

        print(response.json())

FailoverGroup().run()

Response:

{
	'@id': '/api/v4/failover-groups/054d58556a7441cbbe71d4fb7f366480/allowed-owners',
	'@type': 'Collection',
	'items': [{
			'id': '52487b0f83c94c2d96c64672a4a8da37',
			'failover_group_id': 'e8d6b5cb940c40cc9ec6ad081a38f3f0',
			'owner': 't345643dn409198f523flniu1234n34i'
		}, {
			'id': '23bh0cba29f44e87a6e049e00a8e90ae',
			'failover_group_id': 'e8d6b5cb940c40cc9ec6ad081a38f3f0',
			'owner': 'ff41643dn419198f523flniu1234n34i'
		}
	],
	'total_items': 2
}