[ckan-dev] "Access denied" when POSTing to a dataset I created
Timothy Lebo
lebot at rpi.edu
Wed Dec 7 02:53:51 UTC 2011
David,
Thanks for looking into my issue.
The X-CKAN header works, and I am using the "whole package" POST (instead of just the tags component).
Thanks for pointing me to a solution.
I hope the Authorization header doesn't cause too much trouble, or that it resolves many other issues.
I think I'm off and running.
Thanks!
Regards,
Tim
On Dec 6, 2011, at 9:18 PM, David Raznick wrote:
> Hello
>
> I had a go at altering your record myself and if failed initially.
> There seems to be an issue on that server passing on http_auth which I
> have not got to the bottom to yet.
>
> If you need to use the api now, you can use the alternate header
> X-CKAN-API-Key i.e
>
> curl http://thedatahub.org/api/rest/dataset/white-house-visitor-access-records
> -d @white-house-visitor-access-records -H "X-CKAN-API-Key:apikey"
>
> Sorry if this caused you any inconvenience.
>
> Thanks
>
> David
>
> p.s I would recommend passing back the whole package json each time
> not just the tag part.
>
>
>
> On Wed, Dec 7, 2011 at 1:28 AM, Timothy Lebo <lebot at rpi.edu> wrote:
>> Rufus,
>>
>> Thanks for suggesting to s/package/dataset/ the URLs.
>>
>> I tried:
>>
>> curl http://thedatahub.org/api/rest/dataset/white-house-visitor-access-records -d '{ "tags": ["no-deref-vocab"] }' -H "Authorization:MYKEY"
>>
>> and still got "Access denied".
>>
>> Should that have responded to your suggestion?
>>
>> Thanks for your help!
>>
>> -Tim
>>
>>
>> On Dec 6, 2011, at 6:24 PM, Rufus Pollock wrote:
>>
>>> On 6 December 2011 18:16, Timothy Lebo <lebot at rpi.edu> wrote:
>>>> ckan-dev,
>>>
>>> Welcome!
>>>
>>>> I am getting an "Access denied" message when trying to POST a modification to a dataset [1] that I originally created using the web page UI [0].
>>>>
>>>> I used the following steps, based on [2]:
>>>>
>>>> 1) curl -O http://thedatahub.org/api/rest/package/white-house-visitor-access-records
>>>> 2) modified local file "white-house-visitor-access-records" to include a tag ("tags": ["no-deref-vocab"])
>>>> 3) curl http://thedatahub.org/api/rest/package/white-house-visitor-access-records -d @white-house-visitor-access-records -H "Authorization:Aa8...Bb2"
>>>> (where "Aa8...Bb2" is my API key from http://thedatahub.org/user/timrdf)
>>>
>>> Can I suggest replacing package with dataset and seeing what happens.
>>>
>>> ("package" terminology has been replaced with "dataset" throughout
>>> CKAN and the DataHub. package urls redirect to dataset but we have
>>> heard that command line tools / clients can have problems with
>>> redirects.)
>>>
>>>> I was successful in applying these steps to add a tag "no-deref-vocab" to the test dataset http://test.ckan.net/dataset/9f825e18-0e0c-40f6-8895-b5392c1ac18a, which I created according to [3].
>>>
>>> I note here you have dataset not package ...
>>>
>>>> Could anyone suggest what I am doing wrong?
>>>>
>>>> Thank you for your consideration.
>>>
>>> Not at all and great to hear from you!
>>>
>>> Rufus
>>>
>>> _______________________________________________
>>> 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
>
> _______________________________________________
> 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