diff --git a/src/api/telemetry/TelemetryAPI.js b/src/api/telemetry/TelemetryAPI.js index 952e068562..0ccc12dbe7 100644 --- a/src/api/telemetry/TelemetryAPI.js +++ b/src/api/telemetry/TelemetryAPI.js @@ -196,6 +196,21 @@ define([ return this.requestProviders.filter(supportsDomainObject)[0]; }; + /** + * @private + */ + TelemetryAPI.prototype.standardizeRequestOptions = function (options) { + if (!options.hasOwnProperty('start')) { + options.start = this.MCT.time.bounds().start; + } + if (!options.hasOwnProperty('end')) { + options.end = this.MCT.time.bounds().end; + } + if (!options.hasOwnProperty('domain')) { + options.domain = this.MCT.time.timeSystem().key; + } + }; + /** * Request historical telemetry for a domain object. * The `options` argument allows you to specify filters @@ -212,6 +227,7 @@ define([ * telemetry data */ TelemetryAPI.prototype.request = function (domainObject, options) { + this.standardizeRequestOptions(options); var provider = this.findRequestProvider.apply(this, arguments); return provider.request.apply(provider, arguments); };