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

Method dataGetV3

lib/Controller/ApiDataController.php:215–234  ·  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

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

Calls 2

readOwnDatasetReportMethod · 0.80
readMethod · 0.45