getSchemav2 method
Gets a list of metrics and dimensions that can be used to create analytics queries and reports.
Each schema element contains the name of the field, its associated type, and a flag indicating whether it is a standard or custom field.
Request parameters:
name
- Required. Path to the schema. Use the following structure in your
request:
organizations/{org}/environments/{env}/analytics/admin/schemav2
.
Value must have pattern
^organizations/\[^/\]+/environments/\[^/\]+/analytics/admin/schemav2$
.
disableCache
- Flag that specifies whether the schema is be read from
the database or cache. Set to true
to read the schema from the database.
Defaults to cache.
type
- Required. Name of the dataset for which you want to retrieve the
schema. For example: fact
or agg_cus1
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudApigeeV1Schema.
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<GoogleCloudApigeeV1Schema> getSchemav2(
core.String name, {
core.bool? disableCache,
core.String? type,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (disableCache != null) 'disableCache': ['${disableCache}'],
if (type != null) 'type': [type],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleCloudApigeeV1Schema.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}