Skip to content

MAPI service Authority

To get Authority service use:

authority = MAPIServices.instance.get_service("Authority")

Bases: MAPIService

Authority MAPI service allows to get Authority info. Use the authority server to get authentification token that has to used in each web requests.

Source code in restmapi\restmapi\services.py
class AuthorityServiceServiceProxy(MAPIService):
	"""Authority MAPI service allows to get Authority info. Use the authority server to get authentification token that has to used in each web requests. 
	"""
	def __init__(self, url):
		"""DO NOT create AuthorityServiceServiceServiceProxy by yourself. Always use MAPIServices.get_service("Authority") method to create it.

		Parameters
		----------
		url : string
			Base URL to create of the REST service.
		"""
		super().__init__(url)

	def info(self):
		""" returns authority info struct:
		* authMode: None or Flexlab or AzureAd
		* url: if authMode is Flexlab, url contains Flexlab server URL used for authentication.
		* clientId/tenantId: if authMode is AzureAd, clientId and tenantId define azure connection properties.
		"""
		return self.invoke_web_get_request("Info")

__init__(url)

DO NOT create AuthorityServiceServiceServiceProxy by yourself. Always use MAPIServices.get_service("Authority") method to create it.

Parameters:

  • url (string) –
    Base URL to create of the REST service.
    
Source code in restmapi\restmapi\services.py
def __init__(self, url):
	"""DO NOT create AuthorityServiceServiceServiceProxy by yourself. Always use MAPIServices.get_service("Authority") method to create it.

	Parameters
	----------
	url : string
		Base URL to create of the REST service.
	"""
	super().__init__(url)

info()

returns authority info struct: * authMode: None or Flexlab or AzureAd * url: if authMode is Flexlab, url contains Flexlab server URL used for authentication. * clientId/tenantId: if authMode is AzureAd, clientId and tenantId define azure connection properties.

Source code in restmapi\restmapi\services.py
def info(self):
	""" returns authority info struct:
	* authMode: None or Flexlab or AzureAd
	* url: if authMode is Flexlab, url contains Flexlab server URL used for authentication.
	* clientId/tenantId: if authMode is AzureAd, clientId and tenantId define azure connection properties.
	"""
	return self.invoke_web_get_request("Info")