query method

Future<CompatibleFields> query(
  1. Report request,
  2. String profileId, {
  3. String? $fields,
})

Returns the fields that are compatible to be selected in the respective sections of a report criteria, given the fields already selected in the input report and user permissions.

request - The metadata request object.

Request parameters:

profileId - The Campaign Manager 360 user profile ID.

$fields - Selector specifying which fields to include in a partial response.

Completes with a CompatibleFields.

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<CompatibleFields> query(
  Report request,
  core.String profileId, {
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'userprofiles/' +
      commons.escapeVariable('$profileId') +
      '/reports/compatiblefields/query';

  final response_ = await _requester.request(
    url_,
    'POST',
    body: body_,
    queryParams: queryParams_,
  );
  return CompatibleFields.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}