listSAMLConnections method

Future<SAMLConnections?> listSAMLConnections({
  1. int? limit,
  2. int? offset,
  3. String? query,
  4. String? orderBy,
  5. List<String>? organizationId,
})

Get a list of SAML Connections for an instance

Returns the list of SAML Connections for an instance. Results can be paginated using the optional limit and offset query parameters. The SAML Connections are ordered by descending creation date and the most recent will be returned first.

Parameters:

  • int limit: Applies a limit to the number of results returned. Can be used for paginating the results together with offset.

  • int offset: Skip the first offset results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with limit.

  • String query: Returns SAML connections that have a name that matches the given query, via case-insensitive partial match.

  • String orderBy: Sorts organizations memberships by phone_number, email_address, created_at, first_name, last_name or username. By prepending one of those values with + or -, we can choose to sort in ascending (ASC) or descending (DESC) order.

  • List<String> organizationId: Returns SAML connections that have an associated organization ID to the given organizations. For each organization id, the + and - can be prepended to the id, which denote whether the respective organization should be included or excluded from the result set. Accepts up to 100 organization ids.

Implementation

Future<SAMLConnections?> listSAMLConnections({
  int? limit,
  int? offset,
  String? query,
  String? orderBy,
  List<String>? organizationId,
}) async {
  final response = await listSAMLConnectionsWithHttpInfo(
    limit: limit,
    offset: offset,
    query: query,
    orderBy: orderBy,
    organizationId: organizationId,
  );
  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),
      'SAMLConnections',
    ) as SAMLConnections;
  }
  return null;
}