You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2026/01/22 21:59:28 UTC
(streampipes) branch add-typescript-delete-dataset created (now fbef19c735)
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a change to branch add-typescript-delete-dataset
in repository https://gitbox.apache.org/repos/asf/streampipes.git
at fbef19c735 feat: Support deletion in typescript dataset api
This branch includes the following new commits:
new fbef19c735 feat: Support deletion in typescript dataset api
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(streampipes) 01/01: feat: Support deletion in typescript dataset api
Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch add-typescript-delete-dataset
in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit fbef19c7354da0fee8c0d3e19bf9523d37d5af65
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Thu Jan 22 22:59:12 2026 +0100
feat: Support deletion in typescript dataset api
---
.../streampipes/rest/impl/datalake/DataLakeResource.java | 8 ++++----
.../src/lib/apis/datalake-rest.service.ts | 14 ++++++++++++++
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeResource.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeResource.java
index 5332a92bbb..ede898126e 100644
--- a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeResource.java
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeResource.java
@@ -106,20 +106,20 @@ public class DataLakeResource extends AbstractDataLakeResource {
this.dataExplorerQueryManagement = dataExplorerQueryManagement;
}
- @DeleteMapping(path = "/measurements/{measurementID}")
+ @DeleteMapping(path = "/measurements/{measurementName}")
@PreAuthorize("this.hasWriteAuthority() and this.checkPermissionByName(#measurementID, 'WRITE')")
@Operation(summary = "Remove data from a single measurement series with given id", tags = {
"Data Lake" }, responses = {
@ApiResponse(responseCode = "200", description = "Data from measurement series successfully removed"),
@ApiResponse(responseCode = "400", description = "Measurement series with given id not found") })
public ResponseEntity<?> deleteData(
- @Parameter(in = ParameterIn.PATH, description = "the id of the measurement series", required = true) @PathVariable("measurementID") String measurementID,
+ @Parameter(in = ParameterIn.PATH, description = "the id of the measurement series", required = true) @PathVariable("measurementName") String measurementName,
@Parameter(in = ParameterIn.QUERY, description = "start date for slicing operation") @RequestParam(value = "startDate", required = false) Long startDate,
@Parameter(in = ParameterIn.QUERY, description = "end date for slicing operation") @RequestParam(value = "endDate", required = false) Long endDate) {
- if (this.dataExplorerQueryManagement.deleteData(measurementID, startDate, endDate)) {
+ if (this.dataExplorerQueryManagement.deleteData(measurementName, startDate, endDate)) {
return ok(Notifications
- .success("Successfully deleted measure " + measurementID + " between " + startDate + " and " + endDate));
+ .success("Successfully deleted measure " + measurementName + " between " + startDate + " and " + endDate));
} else {
return ResponseEntity
.status(HttpStatus.NOT_FOUND)
diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts
index 0b89eecce9..c7f8aeec7a 100644
--- a/ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts
+++ b/ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts
@@ -174,6 +174,20 @@ export class DatalakeRestService {
return this.http.request(request);
}
+ deleteData(
+ measurementName: string,
+ startTime: number,
+ endTime: number,
+ ): Observable<void> {
+ const params = new HttpParams()
+ .set('startDate', startTime.toString())
+ .set('endDate', endTime.toString());
+ return this.http.delete<void>(
+ `${this.dataLakeUrl}/measurements/${measurementName}`,
+ { params },
+ );
+ }
+
deleteCleanup(index: string) {
const url = `${this.dataLakeUrl}/${index}/cleanup`;
return this.http.delete(url);