listSAMLConnectionsWithHttpInfo method

Future<Response> listSAMLConnectionsWithHttpInfo({
  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.

Note: This method returns the HTTP Response.

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<http.Response> listSAMLConnectionsWithHttpInfo({
  int? limit,
  int? offset,
  String? query,
  String? orderBy,
  List<String>? organizationId,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/saml_connections';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (limit != null) {
    queryParams.addAll(_queryParams('', 'limit', limit));
  }
  if (offset != null) {
    queryParams.addAll(_queryParams('', 'offset', offset));
  }
  if (query != null) {
    queryParams.addAll(_queryParams('', 'query', query));
  }
  if (orderBy != null) {
    queryParams.addAll(_queryParams('', 'order_by', orderBy));
  }
  if (organizationId != null) {
    queryParams
        .addAll(_queryParams('multi', 'organization_id', organizationId));
  }

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}