[Fiware-apps] CKAN list service

Alessandro Portosa alessandro.portosa at eng.it
Fri Jan 23 15:41:38 CET 2015


Many thanks, that was the problem!

Alessandro.

Il 23/01/2015 15:39, Aitor Magán García ha scritto:
> This is not possible unless you include yourself in the list of 
> allowed users. Otherwise this action only returns the list of private 
> datasets that you have acquired not the ones that you have created. I 
> have created some many datasets but when I call this Action I on my 
> get three.
>
> Aitor Magán García
>
> El 23/1/2015, a las 15:30, Alessandro Portosa 
> <alessandro.portosa at eng.it <mailto:alessandro.portosa at eng.it>> escribió:
>
>> The action/acquired_list /gives both my datasets (created/uploaded by 
>> me) and acquired datasets.
>> I understand that only private datasets can be acquired, but MY 
>> private datasets are not acquired so maybe they shouldn't be returned 
>> by this action (otherwise I would prefer to call it something like 
>> "/personal_packages_list/")...
>>
>> Il 23/01/2015 15:20, Aitor Magán García ha scritto:
>>> This API only returns the acquired dataset by the user that is 
>>> performing the request. Please, take into account that only private 
>>> datasets can be acquired.
>>>
>>> BR
>>> Aitor
>>>
>>> Aitor Magán García
>>>
>>> El 23/1/2015, a las 15:17, Alessandro Portosa 
>>> <alessandro.portosa at eng.it <mailto:alessandro.portosa at eng.it>> escribió:
>>>
>>>> Many thanks for your support Aitor.
>>>> Is the intention of this API to get ONLY acquired datasets for a 
>>>> specific user or both private and acquired datasets? I just tried 
>>>> and when I call it I get both my private and acquired datasets. 
>>>> That is fine for me, but I would like to be sure about the meaning 
>>>> of the action since I have to implement it.
>>>>
>>>> Alessandro.
>>>>
>>>> Il 23/01/2015 15:00, Aitor Magán ha scritto:
>>>>> FYI: We have created a new API that allows you to retrieve the 
>>>>> list of acquired datasets. The name of this API is 
>>>>> /acquisitions_list/. For example, to retrieve the list of acquired 
>>>>> datasets in the FIWARE Lab Data portal you should make the 
>>>>> following request:
>>>>>
>>>>> *URL*: https://data.lab.fiware.org/api/action/acquisitions_list
>>>>> *Method*: POST
>>>>> *Content*: {}
>>>>>
>>>>> I hope this meet your needs.
>>>>>
>>>>> BR
>>>>> Aitor
>>>>>
>>>>> 2015-01-22 14:16 GMT+01:00 Aitor Magán <amagan at conwet.com 
>>>>> <mailto:amagan at conwet.com>>:
>>>>>
>>>>>     Yes, the API does not specify this, but I can confirm you that
>>>>>     this works in that way, since the web seacher in the main page
>>>>>     uses the same function to retrieve the list of available
>>>>>     datasets.
>>>>>
>>>>>     BR
>>>>>     Aitor
>>>>>
>>>>>     2015-01-22 14:13 GMT+01:00 Alessandro Portosa
>>>>>     <alessandro.portosa at eng.it <mailto:alessandro.portosa at eng.it>>:
>>>>>
>>>>>         Thanks, just did it. :)
>>>>>         Sadly, there are no such details on the API doc. I had to
>>>>>         try by myself.
>>>>>         Now it's clear enough. Thanks again.
>>>>>
>>>>>         Alessandro.
>>>>>
>>>>>         Il 22/01/2015 14:09, Aitor Magán ha scritto:
>>>>>>         Yes, I seem to remember that it is in that way. However,
>>>>>>         you can check the CKAN API documentation here:
>>>>>>         http://docs.ckan.org/en/ckan-2.2/api.html#ckan.logic.action.get.package_search.
>>>>>>
>>>>>>
>>>>>>         BR
>>>>>>         Aitor
>>>>>>
>>>>>>         2015-01-22 14:02 GMT+01:00 Alessandro Portosa
>>>>>>         <alessandro.portosa at eng.it
>>>>>>         <mailto:alessandro.portosa at eng.it>>:
>>>>>>
>>>>>>             Hi Aitor,
>>>>>>             thanks. Just to be clear, /package_search/ (without
>>>>>>             parameters) return any *searchable *dataset, no
>>>>>>             matter is they are public/private or
>>>>>>             user/organization owned.
>>>>>>             For any *not searchable* dataset, I use
>>>>>>             /organization_show/ and /user_show/ functions instead.
>>>>>>
>>>>>>             Alessandro.
>>>>>>
>>>>>>             Il 22/01/2015 13:21, Aitor Magán ha scritto:
>>>>>>>             Hi Alessando,
>>>>>>>
>>>>>>>             Have you tried to use the /package_search /function?
>>>>>>>             I do not know how /package_list/ works and I'm not
>>>>>>>             pretty sure if this function returns private
>>>>>>>             datasets, but I'm sure that /package_search/ will
>>>>>>>             return both: private and public dataset. However,
>>>>>>>             this function will not return any non-searchable
>>>>>>>             datasets (even if they belongs to an organization).
>>>>>>>             So if you want to retrieve the datasets a user can
>>>>>>>             access within an organization, you will have to ue
>>>>>>>             the /organization_show/ function.
>>>>>>>
>>>>>>>             Let me know if you have more doubts! ;)
>>>>>>>
>>>>>>>             BR
>>>>>>>             Aitor
>>>>>>>
>>>>>>>             2015-01-22 13:13 GMT+01:00 Alessandro Portosa
>>>>>>>             <alessandro.portosa at eng.it
>>>>>>>             <mailto:alessandro.portosa at eng.it>>:
>>>>>>>
>>>>>>>                 Hi,
>>>>>>>                 actually the action /organization_show /allows
>>>>>>>                 to retrieve both private and public datasets for
>>>>>>>                 a specific organization.
>>>>>>>
>>>>>>>                 Let's assume that my use case is to find, for a
>>>>>>>                 specific user, any accessible dataset. I mean
>>>>>>>                 public datasets, user private datasets and
>>>>>>>                 organization private datasets (if the user is a
>>>>>>>                 member of that organization). My tests show that
>>>>>>>                 to achive such result, now I need to call
>>>>>>>                 /package_list/ and /package_show/ (these two
>>>>>>>                 steps can be merged in one using
>>>>>>>                 /current_package_list_with_resources/). Then
>>>>>>>                 call /organization_list_for_user/ e and
>>>>>>>                 /organization show/. Lastly, I need to call
>>>>>>>                 /user_show/ to get his datasets.
>>>>>>>                 Also, I have to filter the results of both
>>>>>>>                 /user_show/ and /organization_show/ because I
>>>>>>>                 need to extract only private datasets here
>>>>>>>                 (public datasets were already retrieved via
>>>>>>>                 /package_list/).
>>>>>>>                 That sounds a bit tricky to me... Is there a
>>>>>>>                 direct way to get the list of accessible dataset
>>>>>>>                 for a specific user? Do I really need to crawl
>>>>>>>                 through all these steps for such common request?
>>>>>>>                 I hope there is a smarter way...
>>>>>>>
>>>>>>>                 Best,
>>>>>>>                 Alessandro.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                 Il 22/01/2015 11:20, Davide Zerbetto ha scritto:
>>>>>>>>                 Hi
>>>>>>>>                 I send you information about the CKAN REST API
>>>>>>>>                 that my colleague Alessandro Portosa tested:
>>>>>>>>                 https://data.lab.fiware.org/api/action/package_list
>>>>>>>>                 : retrieves all the public datasets
>>>>>>>>                 https://data.lab.fiware.org/api/action/currente_package_list_with_resources
>>>>>>>>                 : retrieves all the public datasets +
>>>>>>>>                 associated resources
>>>>>>>>                 https://data.lab.fiware.org/api/action/organization_list_for_user
>>>>>>>>                 : retrieves the list of organizations the user
>>>>>>>>                 belongs to
>>>>>>>>                 https://data.lab.fiware.org/api/action/organization_show?id=<org_name>&include_datasets=true
>>>>>>>>                 : retrieves the organization details with
>>>>>>>>                 datasets, but it's not clear:
>>>>>>>>                 1. are they all organization's private datasets?
>>>>>>>>                 2. it retrieves only 1000 datasets!! how to
>>>>>>>>                 catch all datasets?
>>>>>>>>
>>>>>>>>                 We'll try
>>>>>>>>                 https://data.lab.fiware.org/api/action/package_acquired
>>>>>>>>                 and let you know.
>>>>>>>>
>>>>>>>>                 Best regards
>>>>>>>>                 Davide
>>>>>>>>
>>>>>>>>                 -- 
>>>>>>>>
>>>>>>>>                 *Davide Zerbetto*
>>>>>>>>                 SpagoBI Consultant
>>>>>>>>
>>>>>>>>                 <mime-attachment.png>
>>>>>>>>                 *SpagoBI Labs
>>>>>>>>                 Engineering Group*
>>>>>>>>                 Corso Stati Uniti, 23/C - 35127 Padua - Italy
>>>>>>>>                 Phone: +39 049 8283411 <tel:%2B39%20049%208283411>
>>>>>>>>                 Fax: +39-049.8700272 <tel:%2B39-049.8700272>
>>>>>>>>                 www.spagobi.org <http://www.spagobi.org> -
>>>>>>>>                 www.eng.it <http://www.eng.it/web/eng_en/home>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 <mime-attachment.jpg> 	  Respect the
>>>>>>>>                 environment. Please don't print this e-mail
>>>>>>>>                 unless you really need to.
>>>>>>>>
>>>>>>>>                 The information transmitted is intended only
>>>>>>>>                 for the person or entity to which it is
>>>>>>>>                 addressed and may contain confidential and/or
>>>>>>>>                 privileged material. Any review,
>>>>>>>>                 retransmission, dissemination or other use of,
>>>>>>>>                 or taking of any action in reliance upon, this
>>>>>>>>                 information by persons or entities other than
>>>>>>>>                 the intended recipient is prohibited. If you
>>>>>>>>                 received this in error, please contact the
>>>>>>>>                 sender and delete the material from any computer.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 _______________________________________________
>>>>>>>>                 Fiware-apps mailing list
>>>>>>>>                 Fiware-apps at lists.fi-ware.org  <mailto:Fiware-apps at lists.fi-ware.org>
>>>>>>>>                 https://lists.fi-ware.org/listinfo/fiware-apps
>>>>>>>
>>>>>>>
>>>>>>>                 _______________________________________________
>>>>>>>                 Fiware-apps mailing list
>>>>>>>                 Fiware-apps at lists.fi-ware.org
>>>>>>>                 <mailto:Fiware-apps at lists.fi-ware.org>
>>>>>>>                 https://lists.fi-ware.org/listinfo/fiware-apps
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>             _______________________________________________
>>>>>>>             Fiware-apps mailing list
>>>>>>>             Fiware-apps at lists.fi-ware.org  <mailto:Fiware-apps at lists.fi-ware.org>
>>>>>>>             https://lists.fi-ware.org/listinfo/fiware-apps
>>>>>>
>>>>>>
>>>>>>             _______________________________________________
>>>>>>             Fiware-apps mailing list
>>>>>>             Fiware-apps at lists.fi-ware.org
>>>>>>             <mailto:Fiware-apps at lists.fi-ware.org>
>>>>>>             https://lists.fi-ware.org/listinfo/fiware-apps
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>         _______________________________________________
>>>>>>         Fiware-apps mailing list
>>>>>>         Fiware-apps at lists.fi-ware.org  <mailto:Fiware-apps at lists.fi-ware.org>
>>>>>>         https://lists.fi-ware.org/listinfo/fiware-apps
>>>>>
>>>>>
>>>>>         _______________________________________________
>>>>>         Fiware-apps mailing list
>>>>>         Fiware-apps at lists.fi-ware.org
>>>>>         <mailto:Fiware-apps at lists.fi-ware.org>
>>>>>         https://lists.fi-ware.org/listinfo/fiware-apps
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> Fiware-apps mailing list
>>> Fiware-apps at lists.fi-ware.org
>>> https://lists.fi-ware.org/listinfo/fiware-apps
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-apps/attachments/20150123/f3eee7e1/attachment.html>


More information about the Fiware-apps mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy