list method
Looks up an enterprise by domain name.
This is only supported for enterprises created via the Google-initiated creation flow. Lookup of the id is not needed for enterprises created via the EMM-initiated flow since the EMM learns the enterprise ID in the callback specified in the Enterprises.generateSignupUrl call.
Request parameters:
domain
- Required. The exact primary domain name of the enterprise to
look up.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a EnterprisesListResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<EnterprisesListResponse> list(
core.String domain, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'domain': [domain],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'androidenterprise/v1/enterprises';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return EnterprisesListResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}