"use strict"; /** *  * Licensed Materials - Property of IBM  * IBM Cognos Products: Cognos * Analytics  * Copyright IBM Corp. 2015, 2016  * US Government Users Restricted * Rights - Use, duplication or disclosure restricted by GSA ADP Schedule * Contract with IBM Corp.   */ define(['jquery', 'underscore', "q", 'bi/admin/common/services/ApiBase'], function ($, _, Q, ApiBase) { 'use strict'; //NOSONAR: meant to be strict var _singletonInstance = null; var ApiService = ApiBase.extend({ getBackupList: function getBackupList() { return this._ajax('backups', this._getRestOptions()); }, generateExportImportDefinition: function generateExportImportDefinition(type, data) { return this._ajax(type, this._getRestOptions('POST', data)); }, executeExportImportDefinition: function executeExportImportDefinition(type, id) { return this._ajax(type + '/' + id + '/run', this._getRestOptions('PUT')); }, queryStatus: function queryStatus(type, id) { return this._ajax(type + '/' + id + '/status', this._getRestOptions()); }, getUploadedStatistics: function getUploadedStatistics() { return this._ajax('disk_usage', this._getRestOptions()); }, getProductionSetting: function getProductionSetting() { return this._ajax('license', this._getRestOptions()); }, updateProductionSetting: function updateProductionSetting(data) { return this._ajax('license', this._getRestOptions('PUT', data)); } }); var _static = { getInstance: function getInstance() { if (!_singletonInstance) { _singletonInstance = new ApiService(); } return _singletonInstance; } }; return _static.getInstance(); });