From: subhash kumar singh Date: Wed, 9 Oct 2024 07:40:00 +0000 (+0000) Subject: Sample request for the TM APIs X-Git-Tag: 3.0.0~85^2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=f1cebd3fcbfd0ce0d549024345301073a89c909c;p=aiml-fw%2Fawmf%2Ftm.git Sample request for the TM APIs Sample request for TM APIs to use fro rest client. Change-Id: I593166ece53dce4a0df3eae170ba2c7be70c7441 Signed-off-by: subhash kumar singh --- diff --git a/request.http b/request.http new file mode 100644 index 0000000..65ba600 --- /dev/null +++ b/request.http @@ -0,0 +1,139 @@ +# ================================================================================== +# +# Copyright (c) 2024 Samsung Electronics Co., Ltd. All Rights Reserved. +# +# 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. +# +# ================================================================================== +@base = x.x.x.x:32002 +@base_data_extraction = x.x.x.x:32000 +@feature_grp = teating_influxdb_104 +# @feature_grp = sample_fg_01 +@trainingjob_name = testing_influxdb_101 +# @trainingjob_name = test_influx_1 +@trainingjob_version = 1 +### TM: API for training +POST http://{{base}}/trainingjobs/{{trainingjob_name}}/training +content-type: application/json + +### TM: Initiate training jobs +POST http://{{base}}/trainingjobs/{{trainingjob_name}}/training +content-type: application/json + +### TM: Data extraction notification and invoke kf +POST http://{{base}}/trainingjob/dataExtractionNotification +content-type: application/json + +{ + "trainingjob_name": "{{trainingjob_name}}" +} + +### TM: Get all the training job +GET http://{{base}}/trainingjobs/latest +Content-Type: application/json +### TM: get status +GET http://{{base}}/task_status/{{trainingjob_name}} +Content-Type: application/json + +### TM: Get status +GET http://{{base}}/trainingjobs/{{trainingjob_name}}/1 + +### TM: create feature group +POST http://{{base}}/featureGroup +Content-Type: application/json + +{ + "featureGroupName":"sample_fg_02", + "feature_list":"pdcpBytesDl,pdcpBytesUl", + "datalake_source":"InfluxSource", + "enable_Dme":false, + "Host":"my-release-influxdb.traininghost", + "Port":"8086", + "dmePort":"", + "bucket":"UEData", + "token":"########", + "source_name":"", + "measured_obj_class":"", + "_measurement":"liveCell", + "dbOrg":"primary" +} +### TM: Get feature group +GET http://{{base}}/featureGroup +Content-Type: application/json + +### TM: Get training jobs +GET http://{{base}}/trainingjobs/latest +Content-Type: application/json + +### TM: Get training jobs +GET http://{{base}}/trainingjobs/{{trainingjob_name}}/{{trainingjob_version}} +Content-Type: application/json + + +### TM: Create training job +POST http://{{base}}/trainingjobs/test_influx_2 +Content-Type: application/json + +{ + "trainingjob_name":"{{trainingjob_name}}", + "is_mme":false, + "model_name":"", + "pipeline_name":"qoe_Pipeline", + "experiment_name":"Default", + "featureGroup_name":"sample_fg_01", + "query_filter":"", + "arguments":{ + "epochs":"1", + "trainingjob_name":"{{trainingjob_name}}" + }, + "enable_versioning":false, + "description":"test", + "pipeline_version":"qoe_Pipeline", + "datalake_source":"InfluxSource" +} + +### tm: get pipelines +GET http://{{base}}/pipelines +Content-Type: application/json + +### data-extraction: start data extraction +POST http://{{base_data_extraction}}/feature-groups +Content-Type: application/json + +{ + "source": { + "InfluxSource": { + "query": "from(bucket:\"UEData\") |> range(start: 0, stop: now()) |> filter(fn: (r) => r._measurement == \"liveCell\") |> pivot(rowKey:[\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")" + } + }, + "transform": [ + { + "operation": "SQLTransform", + "FeatureList": "pdcpBytesDl,pdcpBytesUl", + "SQLFilter": "" + } + ], + "sink": { + "CassandraSink": { + "CollectionName": "testing_influxdb_101" + } + }, + "influxdb_info": { + "host": "my-release-influxdb.default", + "port": "8086", + "bucket": "UEData", + "token": "#######", + "db_org": "primary", + "source_name": "" + } +} \ No newline at end of file