← Back to team overview

dhis2-devs team mailing list archive

Re: Can SQL Views be created through API?

 

List of existing ones:
https://play.dhis2.org/demo/api/sqlViews.json

POSTing a new one:
https://play.dhis2.org/demo/api/sqlViews/QAlOivHBY3a.json

On Thu, Dec 1, 2016 at 6:23 PM, Harsh Atal <harsh.atal@xxxxxxxxx> wrote:

> Dear Morten
>
> The documentation talks about executing an existing sqlView but I want to
> create a new one using the API. Not sure if that is possible.
>
> What we are attempting is that a dhis2 app when loaded first checks if the
> sqlView exists(By name let's say). And if not then it creates a new one
> through the API. Once created it can be used as usual..
>
> Could you please confirm.
>
> Thanks
> harsh
>
>
> On 30 November 2016 at 15:54, Harsh Atal <harsh.atal@xxxxxxxxx> wrote:
>
>> Thanks, will check this out and get back.
>>
>> On 30 November 2016 at 10:43, Morten Olav Hansen <morten@xxxxxxxxx>
>> wrote:
>>
>>> You can read more about it here
>>>
>>> https://ci.dhis2.org/docs/master/en/developer/html/webapi_sql_views.html
>>>
>>> --
>>> Morten Olav Hansen
>>> Senior Engineer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org
>>>
>>> On Wed, Nov 30, 2016 at 12:12 PM, Morten Olav Hansen <morten@xxxxxxxxx>
>>> wrote:
>>>
>>>> Hi Harsh
>>>>
>>>> We have a /api/sqlViews endpoint you might want to look at? that should
>>>> enable you to create sql views using the web-api.
>>>>
>>>> --
>>>> Morten Olav Hansen
>>>> Senior Engineer, DHIS 2
>>>> University of Oslo
>>>> http://www.dhis2.org
>>>>
>>>> On Wed, Nov 30, 2016 at 12:09 PM, Harsh Atal <harsh.atal@xxxxxxxxx>
>>>> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> We have a reporting app which uses SQL View with variables. The app
>>>>> has to be used on multiple instances and we don't want to create the sql
>>>>> views manually on each instance. Intention is to make the app make its own
>>>>> sql view on start up.
>>>>> Is that possible?
>>>>>
>>>>> Regards
>>>>> harsh
>>>>>
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>
>>>>>
>>>>
>>>
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org

References