[ckan-dev] List all Private Datasets

Tyler Kennedy tk at tkte.ch
Tue Jun 28 14:45:42 UTC 2016


Actually, that won't work either since we're explicitly forcing
*package_search* to only return public datasets:
https://github.com/ckan/ckan/blob/7a58753aefe8b8edebf4ebb429e65e2b9a5cd1bd/ckan/logic/action/get.py#L1830

You can get around this by adding your own controller that sets
*ignore_capacity_check* to *True* or you can (as a temporary workaround)
call *current_package_list_with_resources* using an admin API key to get
all packages including those that are private since it does its own check -
https://github.com/ckan/ckan/blob/7a58753aefe8b8edebf4ebb429e65e2b9a5cd1bd/ckan/logic/action/get.py#L184

On Tue, Jun 28, 2016 at 10:32 AM, Tyler Kennedy <tk at tkte.ch> wrote:

> Hey,
>
> *capacity:private* or *capacity:public. *
>
> Thank you,
> Tyler Kennedy
>
> On Tue, Jun 28, 2016 at 10:28 AM, Pedro G Silva <
> pedro.gracio at deimos.com.pt> wrote:
>
>> Hi
>> /api/action/package_search?q=private:false
>>
>> works, but using true instead of false shows no results, even if I'm
>> using the auth key of the dataset owner.
>>
>> Is this a bug?
>>
>> On Tue, Jun 28, 2016 at 3:11 PM, Pedro G Silva <
>> pedro.gracio at deimos.com.pt> wrote:
>>
>>> Hi
>>> Is there a way to list all private datasets using the API? Or searching?
>>>
>>> --
>>>
>>>
>>> [image: DEIMOS Engenharia, SA] <http://www.deimos.pt>
>>> *Pedro Gracio Silva*
>>> Aerospace Systems / Production Center
>>>
>>> *Av. D. Joao II, Lt 1.17.01, 10 • 1998-023 Lisboa, Portugal*
>>> Ph: +351 21 893 3020 • Fax: +351 21 896 9099
>>>
>>>
>>
>>
>> --
>>
>>
>> [image: DEIMOS Engenharia, SA] <http://www.deimos.pt>
>> *Pedro Gracio Silva*
>> Aerospace Systems / Production Center
>>
>> *Av. D. Joao II, Lt 1.17.01, 10 • 1998-023 Lisboa, Portugal*
>> Ph: +351 21 893 3020 • Fax: +351 21 896 9099
>>
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160628/0aa0811b/attachment-0003.html>


More information about the ckan-dev mailing list