[ckan-dev] API Search does not return deleted packages
Philipp Lämmel
philipp.laemmel at fokus.fraunhofer.de
Fri Jan 20 09:42:43 UTC 2012
Hey David,
Our use case is somehow similar to an additional draft state. But in
more detail, our use case is the following:
Our platform separates two types of users : readers and so called
package owners. Package owners are allowed to add or edit datasets.
Additionally, package owners have the possibility to 'hide' a (faulty)
dataset and publish it later again. This is achieved by setting the
state of this particular dataset to 'deleted' / 'active'.
We have to different API calls for readers and package owners: readers
use an API call without a key (that's why they don't see deleted
packages) and data owners used a call with an API key (therefore they
saw their own 'deleted' packages, too).
On CKAN 1.5.1 this won't work anymore, since package owners don't see
deleted packages and can't republish them.
A note on an additional draft state: This would be an elegant solution
to this use case. But I do think, that you have to reinsert a
distinction between a call with or without an API key.
Best,
Philipp
On 01/18/2012 05:52 PM, David Read wrote:
> Philipp,
>
> Yes this changed because it was confusing lots of people. We decided
> that deleted packages should be hived off into a 'trash can' area for
> administrators, rather than in the main list, search results etc..
> That's the way it's viewed in the front-end. Admittedly the trash can
> is not available (yet) in the API - no-one's asked for it yet but
> maybe this is what you're after.
>
> The whole concept of deleted packages is something we've gradually
> developed, as it's difficult to get right.
>
> Do tell us what you're using hidden packages for. Here are my guesses:
>
> * a sort of 'draft' state? We envision using the state field for this,
> but work needs to be done to achieve this - perhaps you can help spec
> it out.
>
> * Or is the intention to keep these datasets private to particular
> people? Maybe try removing the 'read' permission for the average user?
>
> David
>
> On 18 January 2012 16:36, Philipp Lämmel
> <philipp.laemmel at fokus.fraunhofer.de> wrote:
>> Hey all,
>>
>> I've updated my CKAN to 1.5.1 and noticed that there is no difference
>> anymore in the output of the call
>>
>> http://<ckan-instance>/api/rest/dataset
>>
>> for package owners (with API-Key) or anonymous users.
>>
>> In CKAN 1.4.2 this call showed all deleted packages for package owners, too.
>> This was quite handy for us, because we used this for hiding datasets.
>>
>> So my question is (rather short and simple): Why did you drop this
>> distinction?
>>
>> Thanks and best regards,
>> Philipp
>>
>>
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
More information about the ckan-dev
mailing list