[ckan-dev] http://ckan.net/package/new integration

Sebastian Tramp tramp at informatik.uni-leipzig.de
Mon Aug 29 16:49:28 UTC 2011


On Mon, Aug 29, 2011 at 05:24:32PM +0100, Rufus Pollock wrote:

> > for the LOD2 project, where CKAN is a project partner, we want to
> > integrate the LOD2 stack (namely OntoWiki) with the CKAN data hub
> > to register knowledge bases from OntoWiki and import datasets from
> > CKAN.
> >
> > I want to provide a link to http://ckan.net/package/new where most
> > of the form fields are prefilled. My question to you is: In which
> > format do I need to submit the fields for the resource section?
> > title, name, url etc. is easy to submit but the resource section
> > uses some array structure.
>
> You can just send relevant parameters in the query string e.g.
>
> <http://thedatahub.org/package/new?name=abc>
>
> This doesn't work for all attributes of course but for basics works
> quite well.

Hi Rufus,

sure - title, url and notes are easy to submit.
I am now interested in the resources section.

I've looked over the template code and I've seen that it should be
possible to submit resource arrays to but I dont know how python wants
to have this arrays.

> Alternative here would be to create the package directly over the API
> and then send user to created package for more editing / tweaking.
> While will's method also is good I think direct creation will be
> preferable because you won't rely on CKAN having to harvest stuff ...

The advantage of the /package/new pre-fill method is, that the user is able to
cancel the process before it is created.

> Note also that ckan.net/thedatahub.org currently requires you to be
> logged in to add data (though we are thinking of relaxing this again
> once we have dealt with recent increase in spam).

ok, I will include a note to the user for that.

> BTW we are renaming ckan.net to thedatahub.org and you can already use
> thedatahub.org so suggest using that ...

ok, will change that in the plugin ...

Best regards

Sebastian Tramp

-- 
Sebastian Tramp - Department of Computer Science; University of Leipzig
WebID: http://sebastian.tramp.name  Tel. (Fax): +49 341 97 323-66 (-29)




More information about the ckan-dev mailing list