MCPcopy Create free account
hub / github.com/Rello/analytics / dataGetV3

Method dataGetV3

lib/Controller/ApiDataController.php:211–228  ·  view source on GitHub ↗

* get all data of a report and respect filter options * @return DataResponse * @throws \Exception */

(int $reportId)

Source from the content-addressed store, hash-verified

209 * @throws \Exception
210 */
211 #[NoAdminRequired]
212 #[NoCSRFRequired]
213 #[CORS]
214 public function dataGetV3(int $reportId) {
215 $params = $this->request->getParams();
216 $reportMetadata = $this->ReportService->read($reportId);
217
218 if (!empty($reportMetadata)) {
219 $options = json_decode($reportMetadata['filteroptions'], true);
220 $allData = $this->StorageMapper->read((int)$reportMetadata['dataset'], $options);
221
222 return new DataResponse($allData, HTTP::STATUS_OK);
223 } else {
224 return new DataResponse([
225 'message' => 'No data available for given report id',
226 ], HTTP::STATUS_OK);
227 }
228 }
229
230 /**
231 * delete data

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected