Delete a Connection

Deleting Existing Connections

Overview

The deleteConnection method in the b.well SDK enables the deletion of existing data connections for a given user. Deleting a data connection prevents future retrieval of health data from the connection while also deleting previously retrieved health data.

Method Signature

suspend fun deleteConnection(connectionId: String): OperationOutcome
  • connectionId: The unique identifier of the connection to be deleted.
  • OperationOutcome: Represents the outcome of the delete operation.

Deleting a Connection

To delete an existing connection, provide the connectionId of the connection you wish to delete.

Due to the asynchronous nature of the data deletion process, when deleteConnection is called the given connection will be marked as DELETED and will return as such when getMemberConnections is called. Once the data deletion process is complete, the connection will be permanently deleted and will not longer return with getMemberConnections.

Best Practices

  • Correct Identification: Ensure that the connectionId provided is accurate to avoid unintentionally deleting the wrong connection.
  • Outcome Verification: Analyze the OperationOutcome to understand the result of the delete operation, ensuring that it was successful or handling any issues that may have arisen.