rollback method
- RollbackRemoteConfigRequest request,
- String project, {
- String? $fields,
Roll back a project's published Remote Config template to the one specified by the provided version number.
A rollback is equivalent to getting a previously published Remote Config template, and re-publishing it using a force update. Returns the published RemoteConfig and the updated ETag as a response header if successful, or an error. See the publishing guide for a list of [error codes](/docs/remote-config/use-config-rest#step_5_publish_json_data_to_replace_data_in_the_service). In particular, note that the method returns an error with HTTP Status 404 if the requested version_number to rollback to is not found.
request
- The metadata request object.
Request parameters:
project
- Required. The Firebase project's Project ID or Project Number,
prefixed with "projects/".
Value must have pattern ^projects/\[^/\]+$
.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a RemoteConfig.
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<RemoteConfig> rollback(
RollbackRemoteConfigRequest request,
core.String project, {
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 =
'v1/' + core.Uri.encodeFull('$project') + '/remoteConfig:rollback';
final _response = await _requester.request(
_url,
'POST',
body: _body,
queryParams: _queryParams,
);
return RemoteConfig.fromJson(
_response as core.Map<core.String, core.dynamic>);
}