Wendy L
Wendy L

Reputation: 1

Change CKAN API Interface - are there limitations on the API?

I've looked around the site to see if there are any people who have changed the CKAN API interface so that instead of uploading documents and databases, they can directly type onto the site, but I haven't found any use cases.

Currently, we have a page where people upload data sets through excel forms that they've filled out, but we want to make it a bit more user friendly by changing the API so that they can fill out a form on the page rather than downloading the template, filling it out and then uploading it.

Does CKAN have the ability to support this? If so, are there any examples or use cases of websites that have use forms rather than uploads?

Upvotes: 0

Views: 126

Answers (1)

Florian Brucker
Florian Brucker

Reputation: 10365

This is certainly possible.

I'm not aware of any existing extensions that provide that functionality, but you can check the official list of CKAN extensions if there's anything that fulfills your needs.

If there is no existing extension that suits you then you could write your own, see the extension guide for details on how to do that.

Adding an API function to CKAN's API is possible, but probably not what you want in this case: the web UI usually does not interact with CKAN via the API but via Flask/Pylons controllers. Hence, you would add your add controller which first serves your form and then processes the submitted inputs.

You can take a look at the ckanext-pages extension, which does exactly that (for editing static pages instead of datasets, but your code would be similar).

Upvotes: 1

Related Questions