[ckan-dev] "Access denied" when POSTing to a dataset I created
Timothy Lebo
lebot at rpi.edu
Mon Dec 12 18:24:34 UTC 2011
Dave,
Thanks for reflecting the changes in the documentation.
Regards,
Tim
On Dec 7, 2011, at 12:05 PM, David Read wrote:
> On 7 December 2011 13:55, Timothy Lebo <lebot at rpi.edu> wrote:
>> cpan-dev,
>>
>>
>> On Dec 6, 2011, at 6:24 PM, Rufus Pollock wrote:
>>
>>> On 6 December 2011 18:16, Timothy Lebo <lebot at rpi.edu> wrote:
>>>>
>>>
>>>> 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.)
>>
>> Would it be appropriate to modify
>> http://wiki.ckan.org/Using_the_API
>> to reflect this change from "package" to "dataset"?
>
> Yes, it looks like the wiki was missed off from the big rename in the
> code and docs. I'll do this now.
>
>> Also, a note about using X-CPAN instead of "Authorization" header would be helpful at
>> http://docs.ckan.org/en/latest/api.html#api-keys
>
> The X-CKAN header was added as a fall-back - the intention is to keep
> using the 'Authorization' header, but we're still trying to fix this.
> I'll add a note about it in the docs now.
>
> David
>
>>
>> Thanks,
>> Tim
>>
>>
>>>
>>>> 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 ...
>>>
>>> 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
>
More information about the ckan-dev
mailing list