/// <summary> /// This method returns shared datasources of a specific dashboard. /// </summary> /// <param name="apiSharedDataSourceRequest">Details(User id, Dashboard id, dashboard path) about the dashboard to get their shared data sources.</param> /// <returns>Shared datasources of a specific dashboard.</returns> public List <ApiSharedDataSourceResponse> GetSharedDataSources( ApiSharedDataSourceRequestV4 apiSharedDataSourceRequest) { var requestUrl = _baseUrl + "/dashboards/shared-datasources"; var datasource = new List <ApiSharedDataSourceResponse>(); var result = _serverClientV4.Post(apiSharedDataSourceRequest, requestUrl); if (result != null) { return(JsonConvert.DeserializeObject <List <ApiSharedDataSourceResponse> >(result.Content)); } else { return(datasource); } }
/// <summary> /// Add Schedule /// </summary> /// <remarks>Users who have create access for schedule can add new schedule to the server by providing respective schedule details in the request body.</remarks> /// <param name="apiScheduleRequest">Details about the schedule passed will be added to the server.</param> /// <returns>The response is sent as a ApiScheduleResponse object</returns> public ApiScheduleResponse AddSchedule(ApiDashboardScheduleRequest apiDashboardScheduleRequest) { var result = _serverClientV4.Post(apiDashboardScheduleRequest, _baseUrl + "/dashboard/schedule"); var response = new ApiScheduleResponse(); if (result != null) { return(JsonConvert.DeserializeObject <ApiScheduleResponse>(result.Content)); } else { return(response); } }