Files
openobserve/web/src/services/stream.ts
T
Hengfei Yang 3cca9ad12b feat: stream delete (#193)
* feat: update datafusion to 19

* feat: add stream deleting

* feat: data delete

* feat: stream delete done for local mode

* feat: data delete work on s3

* feat: data delete works with gcs

* feat: improve data delete

* feat: improve data delete

* feat: data delete done with merge file list

* fix: comment some unused code

* test: change coverage

* docs: update readme
2023-03-06 18:44:42 +08:00

60 lines
1.6 KiB
TypeScript

// Copyright 2022 Zinc Labs Inc. and Contributors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http:www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import http from "./http";
const stream = {
nameList: (org_identifier: string, type: string, schema: boolean) => {
let url = `/api/${org_identifier}/streams`;
if (type != "") {
url += "?type=" + type;
}
if (schema) {
url +=
url.indexOf("?") > 0
? "&fetchSchema=" + schema
: "?fetchSchema=" + schema;
}
return http().get(url);
},
schema: (org_identifier: string, stream_name: string, type: string) => {
let url = `/api/${org_identifier}/${stream_name}/schema`;
if (type != "") {
url += "?type=" + type;
}
return http().get(url);
},
updateSettings: (
org_identifier: string,
stream_name: string,
type: string,
data: any
) => {
let url = `/api/${org_identifier}/${stream_name}/settings`;
if (type != "") {
url += "?type=" + type;
}
return http().post(url, data);
},
delete: (org_identifier: string, stream_name: string) => {
return http().delete(`/api/${org_identifier}/${stream_name}`);
},
};
export default stream;