apamax.eplapplications.tenant

CumulocityTenant

class apamax.eplapplications.tenant.CumulocityTenant(url, username, password, tenantId=None)[source]

Bases: object

Class to represent a Cumulocity IoT tenant.

It is used to get a C8yConnection object to perform a REST request against the tenant.

Parameters
  • url – The Cumulocity IoT tenant URL.

  • username – The username.

  • password – The password.

  • tenantId – The optional tenant ID. If not provided, it is fetched from the Cumulocity IoT tenant.

getConnection()[source]

Returns the connection object to the tenant.

Returns

The connection object to the tenant.

Return type

C8yConnection

getTenantId()[source]

Get the tenant ID.