getKnowledgeConnectors method

Future<KbConnectorsOut?> getKnowledgeConnectors()

Returns every supported knowledge connector with THIS org's connection state and the REAL number of documents each has ingested into the org's store.

Returns every supported knowledge connector with THIS org's connection state and the REAL number of documents each has ingested into the org's store. A provider that is configured for the deployment but not yet connected appears as disconnected, so the console can offer a Connect button. No secret is ever returned.

Implementation

Future<KbConnectorsOut?> getKnowledgeConnectors() async {
  final response = await getKnowledgeConnectorsWithHttpInfo();
  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), 'KbConnectorsOut',) as KbConnectorsOut;

  }
  return null;
}