[ckan-dev] action api problem

Armin Retterath armin.retterath at gmail.com
Mon Nov 14 13:41:58 UTC 2016


hi together,
the problem is solved - the client class set the key header more than once
and then the 403 message was invoked :-( .
best regards
armin

2016-11-14 13:38 GMT+01:00 Armin Retterath <armin.retterath at gmail.com>:

> hi stefan,
>
> thanks for the advice - i know this. i installed just a testinstance on a
> local virtual host to test the api for syncing our geoportal metadata. last
> time i do so was 2012 and there was no organization entity in ckan
> 1.8.1beta at this time ;-) .
> i'll do some further investigations.
>
> best regards
> armin
>
>
> 2016-11-14 11:46 GMT+01:00 Stefan Oderbolz <stefan.oderbolz at liip.ch>:
>
>> Hi Armin,
>>
>> I guess you followed the user documentation (
>> http://docs.ckan.org/en/latest/maintaining/getting-started.
>> html#create-admin-user) and created a new sysadmin user called "seanh"
>> (you can change that name to anything you want).
>>
>> Be aware that the API-Key is somewhat similar to a password and should be
>> kept secret, as you can do anything on the CKAN instance if you have it.
>> So if your CKAN instance is public, I would suggest to change the API key
>> of the admin user (you can do that if you login with the user and then
>> there is a button called "Regenerate API key").
>>
>> Best regards Stefan
>>
>> On Mon, Nov 14, 2016 at 11:32 AM, Armin Retterath <
>> armin.retterath at gmail.com> wrote:
>>
>>> hi together,
>>>
>>> i added following to the http header:
>>>
>>> X-CKAN-API-Key: d469d6af-a2e8-4d35-abe2-17f6d4198822
>>>
>>> where d469d6af-a2e8-4d35-abe2-17f6d4198822 is the api key for the
>>> default sysadmin seanh user ;-) ?
>>>
>>> armin
>>>
>>>
>>>
>>> 2016-11-14 9:51 GMT+01:00 Hendrik Bunke <bunke.hendrik at gmail.com>:
>>>
>>>> Hi Armin,
>>>>
>>>> this looks like you did not submit the API key, which authenticates the
>>>> user.
>>>> Have a look at the CKAN docs:
>>>> http://docs.ckan.org/en/latest/api/index.html#authentication
>>>> -and-api-keys
>>>>
>>>> regards
>>>> hendrik
>>>>
>>>> --On 2016-11-11 14:19, Armin Retterath wrote:
>>>> > hello together,
>>>> >
>>>> > i try to create new organizations with the action api
>>>> organization_create
>>>> > command as default user seanh under ckan 2.5.2 (ubuntu 14.04).
>>>> > the organization has only id, name, title, description and image_url
>>>> > elements.
>>>> > i get following response:
>>>> >
>>>> > response: {"help": "
>>>> > http://192.168.2.132/api/3/action/help_show?name=organization_create
>>>> ",
>>>> > "success": false, "error": {"message": "Access denied: <function
>>>> > organization_create at 0x7f9d4a66e578> requires an authenticated
>>>> user",
>>>> > "__type": "Authorization Error"}}
>>>> >
>>>> > what is the problem? have this feature to be activated in the ini
>>>> file or
>>>> > are there some missing elements for the organization (maybe my user
>>>> itself)
>>>> > ?
>>>> >
>>>> > thanx in advance
>>>> >
>>>> > armin
>>>>
>>>> > _______________________________________________
>>>> > 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
>>>>
>>>>
>>>> --
>>>> Dr. Hendrik Bunke
>>>> http://www.hbxt.org
>>>> http://twitter.com/hbunke
>>>> _______________________________________________
>>>> 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
>>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>
>>
>> --
>> Liip AG  // Limmatstrasse 183 //  CH-8005 Zürich
>> Tel +41 43 500 39 80 // GnuPG 0x7B588C67 // www.liip.ch
>>
>> _______________________________________________
>> 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/20161114/92533490/attachment-0003.html>


More information about the ckan-dev mailing list