C8yCumulocityConnection

public class C8yCumulocityConnection : JcSimpleConnection

Represents a stateless connection to a Cumulocity tenant/instance

  • Represents a connection to be used for the given c8y tenant and instance

    Declaration

    Swift

    public init(tenant: String, server: String)

    Parameters

    tenant

    The name of your c8y tenant (you can find it at the beginning of your url in the web browser after logging in e.g. https://#tenant#.cumulocity.com/..‘

    instance

    The name of your c8y instance to use. Instances are provided for different regions e.g. ‘cumulocity.com’ or ‘eu-cumulocity.com’ etc.

  • Will attempt to check the given credentials and if okay returns information about the connected user via the returned Publisher

    Declaration

    Swift

    public func connect(user: String, password: String) -> AnyPublisher<JcRequestResponse<C8yCumulocityUser>, JcConnectionRequest<C8yCumulocityConnection>.APIError>

    Parameters

    user

    User id to be used to authenticate

    password

    plain text password to be used to authenticate

    Return Value

    Publisher representing connection result including user properties