deleteKnowledgeConnectorsByProvider method

Future<ConnectionOut?> deleteKnowledgeConnectorsByProvider(
  1. String provider
)

Revokes a connection: it tombstones the stored credential so a later sync cannot reuse it, purges this provider's points from the org's vector namespace, and marks the connector disconnected.

Revokes a connection: it tombstones the stored credential so a later sync cannot reuse it, purges this provider's points from the org's vector namespace, and marks the connector disconnected. The documents already ingested stay in the org's store — they are the org's own data — but stop being retrievable by search; a caller deletes them through the document surface.

Parameters:

  • String provider (required): Provider is the connector to act on: github, slack, google or notion.

Implementation

Future<ConnectionOut?> deleteKnowledgeConnectorsByProvider(String provider,) async {
  final response = await deleteKnowledgeConnectorsByProviderWithHttpInfo(provider,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ConnectionOut',) as ConnectionOut;

  }
  return null;
}