List owned datasets with their column labels. */
()
| 112 | |
| 113 | /** List owned datasets with their column labels. */ |
| 114 | #[NoAdminRequired] |
| 115 | #[NoCSRFRequired] |
| 116 | #[ApiRoute(verb: 'GET', url: '/api/v1/datasets')] |
| 117 | public function datasets(): DataResponse { |
| 118 | return new DataResponse(array_map( |
| 119 | static fn (array $dataset): array => array_intersect_key($dataset, array_flip([ |
| 120 | 'id', 'name', 'dimension1', 'dimension2', 'value', |
| 121 | ])), |
| 122 | $this->apiDataController->datasetIndexV3() |
| 123 | )); |
| 124 | } |
| 125 | |
| 126 | /** Add or update rows using the existing V4 validation and write path. */ |
| 127 | #[NoAdminRequired] |