TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaMoziVdsOrganizationCreateRequest req = new AlibabaMoziVdsOrganizationCreateRequest();
AlibabaMoziVdsOrganizationCreateRequest.CreateOrganizationRequest obj1 = new AlibabaMoziVdsOrganizationCreateRequest.CreateOrganizationRequest();
obj1.setOrganizationCode("orgCode1");
obj1.setTenantId(10000035003L);
obj1.setOrganizationName("orgName1");
obj1.setDisplayOrder(1L);
obj1.setParentCode("3630487d-60b3-4aba-8338-172150be15ad");
AlibabaMoziVdsOrganizationCreateRequest.OrganizationBaseProperties obj2 = new AlibabaMoziVdsOrganizationCreateRequest.OrganizationBaseProperties();
obj2.setAlias("aliasName1");
obj2.setFullName("fullName1");
obj2.setShortName("shortName1");
AlibabaMoziVdsOrganizationCreateRequest.Label obj3 = new AlibabaMoziVdsOrganizationCreateRequest.Label();
obj3.setCode("test");
obj2.setOrgType(obj3);
obj1.setBaseProperties(obj2);
obj1.setCreator("testCreator1");
req.setParam0(obj1);
AlibabaMoziVdsOrganizationCreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaMoziVdsOrganizationCreateRequest req = new AlibabaMoziVdsOrganizationCreateRequest();
AlibabaMoziVdsOrganizationCreateRequest.CreateOrganizationRequestDomain obj1 = new AlibabaMoziVdsOrganizationCreateRequest.CreateOrganizationRequestDomain();
obj1.OrganizationCode = "orgCode1";
obj1.TenantId = 10000035003L;
obj1.OrganizationName = "orgName1";
obj1.DisplayOrder = 1L;
obj1.ParentCode = "3630487d-60b3-4aba-8338-172150be15ad";
AlibabaMoziVdsOrganizationCreateRequest.OrganizationBasePropertiesDomain obj2 = new AlibabaMoziVdsOrganizationCreateRequest.OrganizationBasePropertiesDomain();
obj2.Alias = "aliasName1";
obj2.FullName = "fullName1";
obj2.ShortName = "shortName1";
AlibabaMoziVdsOrganizationCreateRequest.LabelDomain obj3 = new AlibabaMoziVdsOrganizationCreateRequest.LabelDomain();
obj3.Code = "test";
obj2.OrgType= obj3;
obj1.BaseProperties= obj2;
obj1.Creator = "testCreator1";
req.Param0_ = obj1;
AlibabaMoziVdsOrganizationCreateResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaMoziVdsOrganizationCreateRequest;
$param0 = new CreateOrganizationRequest;
$param0->organization_code="orgCode1";
$param0->tenant_id="10000035003";
$param0->organization_name="orgName1";
$param0->display_order="1";
$param0->parent_code="3630487d-60b3-4aba-8338-172150be15ad";
$base_properties = new OrganizationBaseProperties;
$base_properties->alias="aliasName1";
$base_properties->full_name="fullName1";
$base_properties->short_name="shortName1";
$org_type = new Label;
$org_type->code="test";
$base_properties->org_type = $org_type;
$param0->base_properties = $base_properties;
$param0->creator="testCreator1";
$req->setParam0(json_encode($param0));
$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.mozi.vds.organization.create' \
-d 'partner_id=apidoc' \
-d 'sign=E845239AE9BC23456AFF63BE14A3808B' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-06-26+04%3A15%3A07' \
-d 'v=2.0' \
-d 'param0=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaMoziVdsOrganizationCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param0=""
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.mozi.vds.organization.create");
add_param(pRequest,"param0","数据结构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.mozi.vds.organization.create', {
'param0':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})