listAllOrganizationDomainsWithHttpInfo method

Future<Response> listAllOrganizationDomainsWithHttpInfo({
  1. String? organizationId,
  2. String? verified,
  3. List<String>? enrollmentMode,
  4. String? query,
  5. String? orderBy,
  6. int? offset,
  7. int? limit,
})

List all organization domains

Retrieves a list of all organization domains within the current instance. This endpoint can be used to list all domains across all organizations or filter domains by organization, verification status, enrollment mode, or search query. The response includes pagination information and details about each domain including its verification status, enrollment mode, and associated counts.

Note: This method returns the HTTP Response.

Parameters:

  • String organizationId: The ID of the organization to filter domains by

  • String verified: Filter by verification status

  • List<String> enrollmentMode: Filter by enrollment mode

  • String query: Search domains by name or organization ID. If the query starts with "org_", it will search by exact organization ID match. Otherwise, it performs a case-insensitive partial match on the domain name. Note: An empty string or whitespace-only value is not allowed and will result in a validation error.

  • String orderBy: Allows to return organization domains in a particular order. At the moment, you can order the returned domains by their name or created_at. In order to specify the direction, you can use the +/- symbols prepended to the property to order by. For example, if you want domains to be returned in descending order according to their created_at property, you can use -created_at. If you don't use + or -, then + is implied. Defaults to -created_at.

  • 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.

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

Implementation

Future<http.Response> listAllOrganizationDomainsWithHttpInfo({
  String? organizationId,
  String? verified,
  List<String>? enrollmentMode,
  String? query,
  String? orderBy,
  int? offset,
  int? limit,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/organization_domains';

  // ignore: prefer_final_locals
  Object? postBody;

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

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

  const contentTypes = <String>[];

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