You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kylin.apache.org by pl...@gmail.com on 2019/10/10 11:58:30 UTC

how to create cube or model with RESTful API

Hi folks,



In Kylin.apache.org web, I can’t find any RESTful Api to create cube or model,
only found “List cubes, build cube, disable cube …”.

So, how to create cube with Restful API, or other workarounds? Could you give
me some documents as detailed as possible?



Thanks,

Qiuyu



发送自 Windows 10 版[邮件](https://go.microsoft.com/fwlink/?LinkId=550986)应用




回复: Re: how to create cube or model with RESTful API

Posted by pl...@gmail.com.

Thanks Yaqian,



This is exactly what I need. Thanks a lot.



Thanks,

Qiuyu



发送自 Windows 10 版[邮件](https://go.microsoft.com/fwlink/?LinkId=550986)应用



 **发件人 : **[Yaqian Zhang](mailto:Yaqian_Zhang@126.com)  
 **发送时间 : **Friday, October 11, 2019 1:44 PM  
 **收件人 : **[user@kylin.apache.org](mailto:user@kylin.apache.org)  
 **主题 : **Re: how to create cube or model with RESTful API



Hi Qiuyu:



Yes. Before building cube with REST API,  you need to have cubeDescData.



You can get cubeDescData by API of “[Get cube descriptor (dimension, measure
info, etc)](http://kylin.apache.org/cn/docs/howto/howto_use_restapi.html#get-
cube-descriptor)” ,this requires you to design a cube you want in the WEB UI
first. Then you can modify the cubeDescData and use it to build cube with REST
API.





> 在 2019年10月11日,11:38,<[playboymqy@gmail.com](mailto:playboymqy@gmail.com)>
<[playboymqy@gmail.com](mailto:playboymqy@gmail.com)> 写道:

>

>  
>

> Hi Yaqian,

>

>  
>

> I have got the details by browser’s debug,

>

> I found your UI also call restful api. I think this can help me. Is right?

>

> <1D21FA9ACEF74966919CA5DFC542EB91.png>

>

>  
>

> Thanks,

>

> Qiuyu

>

>  
>

> 发送自 Windows 10 版[邮件](https://go.microsoft.com/fwlink/?LinkId=550986)应用

>

>  
>

>  **发件人** **:  **[playboymqy@gmail.com](mailto:playboymqy@gmail.com)  
>  **发送时间** **:  **Friday, October 11, 2019 11:04 AM  
>  **收件人** **:  **[user@kylin.apache.org](mailto:user@kylin.apache.org)  
>  **主题** **:  **回复: Re: how to create cube or model with RESTful API

>

>  
>

> Hi Yaqian,

>

>  
>

> Thanks for your reply.

>

>  
>

> Could you provide more details for post request body?

>

> Because I need post 100 aggregation groups,  I don’t want to do it on UI.

>

> For example : how to post “dimensions, measures, aggregation groups,
mandatory dimensions and so on… ”,

>

>  
>

> Thanks,

>

> Qiuyu

>

>  
>

> 发送自 Windows 10 版[邮件](https://go.microsoft.com/fwlink/?LinkId=550986)应用

>

>  
>

>  **发件人** **:  **[Yaqian Zhang](mailto:Yaqian_Zhang@126.com)  
>  **发送时间** **:  **Thursday, October 10, 2019 8:41 PM  
>  **收件人** **:  **[user@kylin.apache.org](mailto:user@kylin.apache.org)  
>  **主题** **:  **Re: how to create cube or model with RESTful API

>

>  
>

> Hi:

>

>  
>

> Sorry for the [Kylin.apache.org](http://kylin.apache.org/) web didn’t
provide how to create cube or model with RESTful API.

>

>  
>

> Actually, you can create model and cube with RESTful API as follow:

>

>  
>

> 1、Create a cube with RESTful API:

>

>  
>

>      POST  <http://host:port/kylin/api/cubes>

>

>  
>

>      Request Body:{“cubeDescData”:

>

>                               “cubeName”:

>

>                               “projectName”:}

>

>  
>

> 2、Create a model with RESTful API:

>

>  
>

>       POST  <http://host:port/kylin/api/>models

>

>  
>

>       Request Body:{“modelDescData”:

>

>                               “modelName”:

>

>                               “projectName”:}

>

>  
>

>  
>

>> 在 2019年10月10日,19:58,<[playboymqy@gmail.com](mailto:playboymqy@gmail.com)>
<[playboymqy@gmail.com](mailto:playboymqy@gmail.com)> 写道:

>>

>>  
>>

>> Hi folks,

>>

>>  
>>

>> In [Kylin.apache.org](http://kylin.apache.org/) web, I can’t find any
RESTful Api to create cube or model, only found “List cubes, build cube,
disable cube …”.

>>

>> So, how to create cube with Restful API, or other workarounds? Could you
give me some documents as detailed as possible?

>>

>>  
>>

>> Thanks,

>>

>> Qiuyu

>>

>>  
>>

>> 发送自 Windows 10 版[邮件](https://go.microsoft.com/fwlink/?LinkId=550986)应用






Re: how to create cube or model with RESTful API

Posted by Yaqian Zhang <Ya...@126.com>.
Hi Qiuyu:

Yes. Before building cube with REST API,  you need to have cubeDescData.

You can get cubeDescData by API of “Get cube descriptor (dimension, measure info, etc) <http://kylin.apache.org/cn/docs/howto/howto_use_restapi.html#get-cube-descriptor>” ,this requires you to design a cube you want in the WEB UI  first. Then you can modify the cubeDescData and use it to build cube with REST API.


> 在 2019年10月11日,11:38,<pl...@gmail.com> <pl...@gmail.com> 写道:
> 
> Hi Yaqian,
>  
> I have got the details by browser’s debug,
> I found your UI also call restful api. I think this can help me. Is right?
> <1D21FA9ACEF74966919CA5DFC542EB91.png>
>  
> Thanks,
> Qiuyu
>  
> 发送自 Windows 10 版邮件 <https://go.microsoft.com/fwlink/?LinkId=550986>应用
>  
> 发件人: playboymqy@gmail.com <ma...@gmail.com>
> 发送时间: Friday, October 11, 2019 11:04 AM
> 收件人: user@kylin.apache.org <ma...@kylin.apache.org>
> 主题: 回复: Re: how to create cube or model with RESTful API
>  
> Hi Yaqian,
>  
> Thanks for your reply.
>  
> Could you provide more details for post request body?
> Because I need post 100 aggregation groups,  I don’t want to do it on UI. 
> For example : how to post “dimensions, measures, aggregation groups, mandatory dimensions and so on… ”,
>  
> Thanks,
> Qiuyu
>  
> 发送自 Windows 10 版邮件 <https://go.microsoft.com/fwlink/?LinkId=550986>应用
>  
> 发件人: Yaqian Zhang <ma...@126.com>
> 发送时间: Thursday, October 10, 2019 8:41 PM
> 收件人: user@kylin.apache.org <ma...@kylin.apache.org>
> 主题: Re: how to create cube or model with RESTful API
>  
> Hi:
>  
> Sorry for the Kylin.apache.org <http://kylin.apache.org/> web didn’t provide how to create cube or model with RESTful API.
>  
> Actually, you can create model and cube with RESTful API as follow:
>  
> 1、Create a cube with RESTful API:
>  
>      POST  http://host:port/kylin/api/cubes <http://host:port/kylin/api/cubes>
>      
>      Request Body:{“cubeDescData”:
>                               “cubeName”:
>                               “projectName”:}
>  
> 2、Create a model with RESTful API:
>  
>       POST  http://host:port/kylin/api/ <http://host:port/kylin/api/>models
>      
>       Request Body:{“modelDescData”:
>                               “modelName”:
>                               “projectName”:}
>  
>  
> 
> 在 2019年10月10日,19:58,<playboymqy@gmail.com <ma...@gmail.com>> <playboymqy@gmail.com <ma...@gmail.com>> 写道:
>  
> Hi folks,
>  
> In Kylin.apache.org <http://kylin.apache.org/> web, I can’t find any RESTful Api to create cube or model, only found “List cubes, build cube, disable cube …”.
> So, how to create cube with Restful API, or other workarounds? Could you give me some documents as detailed as possible?
>  
> Thanks,
> Qiuyu
>  
> 发送自 Windows 10 版邮件 <https://go.microsoft.com/fwlink/?LinkId=550986>应用


回复: 回复: Re: how to create cube or model with RESTful API

Posted by pl...@gmail.com.
Hi Yaqian,



I have got the details by browser’s debug,

I found your UI also call restful api. I think this can help me. Is right?

![](cid:image002.png@01D58028.678E8BE0)



Thanks,

Qiuyu



发送自 Windows 10 版[邮件](https://go.microsoft.com/fwlink/?LinkId=550986)应用



 **发件人 : **[playboymqy@gmail.com](mailto:playboymqy@gmail.com)  
 **发送时间 : **Friday, October 11, 2019 11:04 AM  
 **收件人 : **[user@kylin.apache.org](mailto:user@kylin.apache.org)  
 **主题 : **回复: Re: how to create cube or model with RESTful API



Hi Yaqian,



Thanks for your reply.



Could you provide more details for post request body?

Because I need post 100 aggregation groups,  I don’t want to do it on UI.

For example : how to post “dimensions, measures, aggregation groups, mandatory
dimensions and so on… ”,



Thanks,

Qiuyu



发送自 Windows 10 版[邮件](https://go.microsoft.com/fwlink/?LinkId=550986)应用



 **发件人** **:**[Yaqian Zhang](mailto:Yaqian_Zhang@126.com)  
 **发送时间** **:** Thursday, October 10, 2019 8:41 PM  
 **收件人** **:**[user@kylin.apache.org](mailto:user@kylin.apache.org)  
 **主题** **:** Re: how to create cube or model with RESTful API



Hi:



Sorry for the [Kylin.apache.org](http://kylin.apache.org/) web didn’t provide
how to create cube or model with RESTful API.



Actually, you can create model and cube with RESTful API as follow:



1、Create a cube with RESTful API:



     POST  <http://host:port/kylin/api/cubes>

     

     Request Body:{“cubeDescData”:

                              “cubeName”:

                              “projectName”:}



2、Create a model with RESTful API:



      POST  <http://host:port/kylin/api/>models

     

      Request Body:{“modelDescData”:

                              “modelName”:

                              “projectName”:}





> 在 2019年10月10日,19:58,<[playboymqy@gmail.com](mailto:playboymqy@gmail.com)>
<[playboymqy@gmail.com](mailto:playboymqy@gmail.com)> 写道:

>

>  
>

> Hi folks,

>

>  
>

> In [Kylin.apache.org](http://kylin.apache.org/) web, I can’t find any
RESTful Api to create cube or model, only found “List cubes, build cube,
disable cube …”.

>

> So, how to create cube with Restful API, or other workarounds? Could you
give me some documents as detailed as possible?

>

>  
>

> Thanks,

>

> Qiuyu

>

>  
>

> 发送自 Windows 10 版[邮件](https://go.microsoft.com/fwlink/?LinkId=550986)应用








回复: Re: how to create cube or model with RESTful API

Posted by pl...@gmail.com.
Hi Yaqian,



Thanks for your reply.



Could you provide more details for post request body?

Because I need post 100 aggregation groups, I don’t want to do it on UI.

For example : how to post “dimensions, measures, aggregation groups, mandatory
dimensions and so on… ”,



Thanks,

Qiuyu



发送自 Windows 10 版[邮件](https://go.microsoft.com/fwlink/?LinkId=550986)应用



 **发件人 : **[Yaqian Zhang](mailto:Yaqian_Zhang@126.com)  
 **发送时间 : **Thursday, October 10, 2019 8:41 PM  
 **收件人 : **[user@kylin.apache.org](mailto:user@kylin.apache.org)  
 **主题 : **Re: how to create cube or model with RESTful API



Hi:



Sorry for the [Kylin.apache.org](http://kylin.apache.org/) web didn’t provide
how to create cube or model with RESTful API.



Actually, you can create model and cube with RESTful API as follow:



1、Create a cube with RESTful API:



     POST  <http://host:port/kylin/api/cubes>

     

     Request Body:{“cubeDescData”:

                              “cubeName”:

                              “projectName”:}



2、Create a model with RESTful API:



      POST  <http://host:port/kylin/api/>models

     

      Request Body:{“modelDescData”:

                              “modelName”:

                              “projectName”:}



  
  

> 在 2019年10月10日,19:58,<[playboymqy@gmail.com](mailto:playboymqy@gmail.com)>
<[playboymqy@gmail.com](mailto:playboymqy@gmail.com)> 写道:

>

>  
>

> Hi folks,

>

>  
>

> In [Kylin.apache.org](http://kylin.apache.org/) web, I can’t find any
RESTful Api to create cube or model, only found “List cubes, build cube,
disable cube …”.

>

> So, how to create cube with Restful API, or other workarounds? Could you
give me some documents as detailed as possible?

>

>  
>

> Thanks,

>

> Qiuyu

>

>  
>

> 发送自 Windows 10 版[邮件](https://go.microsoft.com/fwlink/?LinkId=550986)应用






Re: how to create cube or model with RESTful API

Posted by Yaqian Zhang <Ya...@126.com>.
Hi:

Sorry for the Kylin.apache.org <http://kylin.apache.org/> web didn’t provide how to create cube or model with RESTful API.

Actually, you can create model and cube with RESTful API as follow:

1、Create a cube with RESTful API:

     POST  http://host:port/kylin/api/cubes <http://host:port/kylin/api/cubes>
     
     Request Body:{“cubeDescData”:
                              “cubeName”:
                              “projectName”:}

2、Create a model with RESTful API:

      POST  http://host:port/kylin/api/ <http://host:port/kylin/api/>models
     
      Request Body:{“modelDescData”:
                              “modelName”:
                              “projectName”:}


> 在 2019年10月10日,19:58,<pl...@gmail.com> <pl...@gmail.com> 写道:
> 
> Hi folks,
>  
> In Kylin.apache.org <http://kylin.apache.org/> web, I can’t find any RESTful Api to create cube or model, only found “List cubes, build cube, disable cube …”.
> So, how to create cube with Restful API, or other workarounds? Could you give me some documents as detailed as possible?
>  
> Thanks,
> Qiuyu
>  
> 发送自 Windows 10 版邮件 <https://go.microsoft.com/fwlink/?LinkId=550986>应用