TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAdlabAdsimCaseInfoImportRequest req = new AlibabaAdlabAdsimCaseInfoImportRequest();
AlibabaAdlabAdsimCaseInfoImportRequest.AdsimBatchCaseVo obj1 = new AlibabaAdlabAdsimCaseInfoImportRequest.AdsimBatchCaseVo();
obj1.setRepeatStrategy("skip");
List<AlibabaAdlabAdsimCaseInfoImportRequest.AdsimCaseVo> list3 = new ArrayList<AlibabaAdlabAdsimCaseInfoImportRequest.AdsimCaseVo>();
AlibabaAdlabAdsimCaseInfoImportRequest.AdsimCaseVo obj4 = new AlibabaAdlabAdsimCaseInfoImportRequest.AdsimCaseVo();
list3.add(obj4);
obj4.setCreatorUserId(1L);
obj4.setSimTime(123456789L);
obj4.setUsrDefinedLabel("usrDefinedLabel");
obj4.setSourceLogInvalidCode(1L);
obj4.setSource("x_lab");
obj4.setTemplateId(0L);
obj4.setType("logSim");
obj4.setScenarioDefinitionUrl("compose/case-definition/2020-12-17/5f8b2658-da8b-444e-9173-6dd49e7960cf/d21fede7-5c3d-4c1e-9053-9e9f8148cef1.yaml");
obj4.setSourceDockerVersion("v4.3.3.77");
obj4.setEnable(1L);
obj4.setCopyType("hard");
obj4.setCaseName("场景名test");
obj4.setBagStartTime(123456789L);
obj4.setId(1L);
obj4.setCaseSetId(7360L);
obj4.setVehicleType("G3");
obj4.setXgoCaseVersion("XIAOG_4.3");
obj4.setBagEndTime(123456789L);
obj4.setEntryTime(123456789L);
obj4.setMapVersion("loc.20200928100356.1236");
obj4.setExtension("{}");
obj4.setAutoTestConfig("autoTestConfig");
obj4.setBagLabelType("bagLabelType");
obj4.setDescription("描述");
obj4.setRemark("备注");
obj4.setSourceDeviceName("G3-006");
obj4.setMapSceneName("hvy");
obj4.setTestObject("xgo");
obj4.setEventTime(123456789L);
obj4.setSourceAoneStatus("New");
obj4.setStartTime(123456789L);
obj4.setSourceIdentity("33805400");
obj4.setSimStartTime(123456789L);
obj4.setMapType("xlab.vector");
obj4.setExitTime(123456789L);
obj4.setBagLabelInfo("bagLabelInfo");
obj4.setSourceDeviceUdid("G3-006");
obj4.setEndTime(123456789L);
obj4.setSourceAoneId("31427077");
obj4.setScenarioDataVersion("1.0");
obj4.setMapId(168L);
obj4.setScenarioContent("\"\"");
obj1.setCaseVOList(list3);
obj1.setCaseSetId(7360L);
req.setAdsimBatchCaseVo(obj1);
AlibabaAdlabAdsimCaseInfoImportResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAdlabAdsimCaseInfoImportRequest req = new AlibabaAdlabAdsimCaseInfoImportRequest();
AlibabaAdlabAdsimCaseInfoImportRequest.AdsimBatchCaseVoDomain obj1 = new AlibabaAdlabAdsimCaseInfoImportRequest.AdsimBatchCaseVoDomain();
obj1.RepeatStrategy = "skip";
List<AlibabaAdlabAdsimCaseInfoImportRequest.AdsimCaseVoDomain> list3 = new List<AlibabaAdlabAdsimCaseInfoImportRequest.AdsimCaseVoDomain>();
AlibabaAdlabAdsimCaseInfoImportRequest.AdsimCaseVoDomain obj4 = new AlibabaAdlabAdsimCaseInfoImportRequest.AdsimCaseVoDomain();
list3.Add(obj4);
obj4.CreatorUserId = 1L;
obj4.SimTime = 123456789L;
obj4.UsrDefinedLabel = "usrDefinedLabel";
obj4.SourceLogInvalidCode = 1L;
obj4.Source = "x_lab";
obj4.TemplateId = 0L;
obj4.Type = "logSim";
obj4.ScenarioDefinitionUrl = "compose/case-definition/2020-12-17/5f8b2658-da8b-444e-9173-6dd49e7960cf/d21fede7-5c3d-4c1e-9053-9e9f8148cef1.yaml";
obj4.SourceDockerVersion = "v4.3.3.77";
obj4.Enable = 1L;
obj4.CopyType = "hard";
obj4.CaseName = "场景名test";
obj4.BagStartTime = 123456789L;
obj4.Id = 1L;
obj4.CaseSetId = 7360L;
obj4.VehicleType = "G3";
obj4.XgoCaseVersion = "XIAOG_4.3";
obj4.BagEndTime = 123456789L;
obj4.EntryTime = 123456789L;
obj4.MapVersion = "loc.20200928100356.1236";
obj4.Extension = "{}";
obj4.AutoTestConfig = "autoTestConfig";
obj4.BagLabelType = "bagLabelType";
obj4.Description = "描述";
obj4.Remark = "备注";
obj4.SourceDeviceName = "G3-006";
obj4.MapSceneName = "hvy";
obj4.TestObject = "xgo";
obj4.EventTime = 123456789L;
obj4.SourceAoneStatus = "New";
obj4.StartTime = 123456789L;
obj4.SourceIdentity = "33805400";
obj4.SimStartTime = 123456789L;
obj4.MapType = "xlab.vector";
obj4.ExitTime = 123456789L;
obj4.BagLabelInfo = "bagLabelInfo";
obj4.SourceDeviceUdid = "G3-006";
obj4.EndTime = 123456789L;
obj4.SourceAoneId = "31427077";
obj4.ScenarioDataVersion = "1.0";
obj4.MapId = 168L;
obj4.ScenarioContent = "\"\"";
obj1.CaseVOList= list3;
obj1.CaseSetId = 7360L;
req.AdsimBatchCaseVo_ = obj1;
AlibabaAdlabAdsimCaseInfoImportResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAdlabAdsimCaseInfoImportRequest;
$adsim_batch_case_vo = new AdsimBatchCaseVo;
$adsim_batch_case_vo->repeat_strategy="skip";
$case_v_o_list = new AdsimCaseVo;
$case_v_o_list->creator_user_id="1";
$case_v_o_list->sim_time="123456789";
$case_v_o_list->usr_defined_label="usrDefinedLabel";
$case_v_o_list->source_log_invalid_code="1";
$case_v_o_list->source="x_lab";
$case_v_o_list->template_id="0";
$case_v_o_list->type="logSim";
$case_v_o_list->scenario_definition_url="compose/case-definition/2020-12-17/5f8b2658-da8b-444e-9173-6dd49e7960cf/d21fede7-5c3d-4c1e-9053-9e9f8148cef1.yaml";
$case_v_o_list->source_docker_version="v4.3.3.77";
$case_v_o_list->enable="1";
$case_v_o_list->copy_type="hard";
$case_v_o_list->case_name="场景名test";
$case_v_o_list->bag_start_time="123456789";
$case_v_o_list->id="1";
$case_v_o_list->case_set_id="7360";
$case_v_o_list->vehicle_type="G3";
$case_v_o_list->xgo_case_version="XIAOG_4.3";
$case_v_o_list->bag_end_time="123456789";
$case_v_o_list->entry_time="123456789";
$case_v_o_list->map_version="loc.20200928100356.1236";
$case_v_o_list->extension="{}";
$case_v_o_list->auto_test_config="autoTestConfig";
$case_v_o_list->bag_label_type="bagLabelType";
$case_v_o_list->description="描述";
$case_v_o_list->remark="备注";
$case_v_o_list->source_device_name="G3-006";
$case_v_o_list->map_scene_name="hvy";
$case_v_o_list->test_object="xgo";
$case_v_o_list->event_time="123456789";
$case_v_o_list->source_aone_status="New";
$case_v_o_list->start_time="123456789";
$case_v_o_list->source_identity="33805400";
$case_v_o_list->sim_start_time="123456789";
$case_v_o_list->map_type="xlab.vector";
$case_v_o_list->exit_time="123456789";
$case_v_o_list->bag_label_info="bagLabelInfo";
$case_v_o_list->source_device_udid="G3-006";
$case_v_o_list->end_time="123456789";
$case_v_o_list->source_aone_id="31427077";
$case_v_o_list->scenario_data_version="1.0";
$case_v_o_list->map_id="168";
$case_v_o_list->scenario_content="\"\"";
$adsim_batch_case_vo->case_v_o_list = $case_v_o_list;
$adsim_batch_case_vo->case_set_id="7360";
$req->setAdsimBatchCaseVo(json_encode($adsim_batch_case_vo));
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=alibaba.adlab.adsim.case.info.import' \
-d 'partner_id=apidoc' \
-d 'sign=C4ED50C823EC139AC303CF3026F4FFB5' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-24+17%3A16%3A49' \
-d 'v=2.0' \
-d 'adsim_batch_case_vo=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaAdlabAdsimCaseInfoImportRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.adsim_batch_case_vo=""
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"alibaba.adlab.adsim.case.info.import");
add_param(pRequest,"adsim_batch_case_vo","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('alibaba.adlab.adsim.case.info.import', {
'adsim_batch_case_vo':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})