New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CKAN API documentation #2944

Closed
palcu opened this Issue Apr 5, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@palcu
Contributor

palcu commented Apr 5, 2016

CKAN Version if known (or site URL)

release-v2.4-final
http://ec2-52-87-202-213.compute-1.amazonaws.com:5000

Story

I've tried today to create a simple API example for an institution, that only contained creating a dataset and creating a resource for that dataset. However, I've gone through two problems and it took me a lot more time than expected.

First, the example for creating a new dataset does not work because it's missing the owner_org key. I think we should, at least, patch the documentation till #2789 is ready.

Second, there is the problem with the URL field for a resource #2844. I think we should also patch the documentation.

Is it okay if I go and change the docs and add to-do items within the corresponding issues?

@wardi

This comment has been minimized.

Show comment
Hide comment
@wardi

wardi Apr 5, 2016

Contributor

These issues are pretty easy to work around.

You can change your ckan.auth.create_unowned_dataset and ckan.auth.create_dataset_if_not_in_organization settings if you want to allow datasets to be created with no owner_org value, or you can provide the owner's id or name field value as the owner_org value.

Resources need a url to be set until I finish work on #2844, but you can put any value you want in there for now.

Yes please, feel free to update the current docs if it's unclear how to successfully create a dataset with the API.

Contributor

wardi commented Apr 5, 2016

These issues are pretty easy to work around.

You can change your ckan.auth.create_unowned_dataset and ckan.auth.create_dataset_if_not_in_organization settings if you want to allow datasets to be created with no owner_org value, or you can provide the owner's id or name field value as the owner_org value.

Resources need a url to be set until I finish work on #2844, but you can put any value you want in there for now.

Yes please, feel free to update the current docs if it's unclear how to successfully create a dataset with the API.

@klikstermkd

This comment has been minimized.

Show comment
Hide comment
@klikstermkd

klikstermkd Jun 17, 2017

Contributor

@wardi I'll update the docs for missing owner_org in the example for importing datasets with the CKAN API.

Edit: One more thing I noticed is that in the API docs for creating a dataset http://docs.ckan.org/en/latest/api/index.html#ckan.logic.action.create.package_create it says that owner_org is an optional field, which is wrong since the default config option for ckan.auth.create_unowned_dataset is set to false.

I propose we should clarify that by default an organization is must provided, except ckan.auth.create_unowned_dataset is set to true.

Contributor

klikstermkd commented Jun 17, 2017

@wardi I'll update the docs for missing owner_org in the example for importing datasets with the CKAN API.

Edit: One more thing I noticed is that in the API docs for creating a dataset http://docs.ckan.org/en/latest/api/index.html#ckan.logic.action.create.package_create it says that owner_org is an optional field, which is wrong since the default config option for ckan.auth.create_unowned_dataset is set to false.

I propose we should clarify that by default an organization is must provided, except ckan.auth.create_unowned_dataset is set to true.

klikstermkd added a commit to klikstermkd/ckan that referenced this issue Jun 17, 2017

[ckan#2944] Update API docs for import datasets example
Add missing 'owner_org' field for package_create, since it is a required field.

amercader added a commit that referenced this issue Jun 20, 2017

Merge pull request #3613 from klikstermkd/2944-update-api-docs
[#2944] Update API docs for import datasets example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment