Skip to content
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

current_package_list_with_resources returns list with only ten datasets rather than all datasets #3483

Closed
kmbn opened this issue Mar 14, 2017 · 3 comments
Assignees

Comments

@kmbn
Copy link
Contributor

kmbn commented Mar 14, 2017

CKAN Version if known (or site URL)

API ver. 3, http://demo.ckan.org and http://beta.ckan.org.

Please describe the expected behavior

According to the API documentation (http://docs.ckan.org/en/latest/api/), ckan.logic.action.get.package_list(context, data_dict) and `ckan.logic.action.get.current_package_list_with_resources(context, data_dict) both return 'return a list of the site’s datasets (packages)' (with the latter being a list of dicts that include the resources for each dataset.

Based on the docs, if no parameters are set, both functions should return lists with all the site's datasets and the length of the two lists for a given site should be the same.

Please describe the actual behavior

While package_list does return a list of all of a site's datasets, current_package_list_with_resources returns a list with only ten datasets, regardless of how many datasets the site has.

What steps can be taken to reproduce the issue?

Case 1:

import requests
r = requests.get(url='http://demo.ckan.org/api/3/action/current_package_list_with_resources')
plist_resources = r.json()
r = requests.get(url='http://demo.ckan.org/api/3/action/package_list')
just_plist = r.json()

print(len(plist_resources['result']))
print(len(just_plist['result']))

Case 2:

import requests
r = requests.get(url='http://beta.ckan.org/api/3/action/current_package_list_with_resources')
plist_resources = r.json()
r = requests.get(url='http://beta.ckan.org/api/3/action/package_list')
just_plist = r.json()

print(len(plist_resources['result']))
print(len(just_plist['result']))
@kmbn
Copy link
Contributor Author

kmbn commented Mar 14, 2017

If the actual behavior is correct and the docs need to be updated or clarified, I'd be happy to do so. Likewise if current_package_list_with_resources needs to be tweaked to produce the expected behavior.

@amercader amercader self-assigned this Mar 16, 2017
@kmbn
Copy link
Contributor Author

kmbn commented Jan 22, 2019

We decided to close old issues that are not actively worked on so that we can focus our effort and attention on issues affecting the current versions of CKAN.

If this issue is still affecting the version of CKAN you're working with now, please feel free to comment or reopen the issue.

If you do reopen this issue, please update it with new details. One reason it might not have been resolved in the past is that it wasn't clear how a contributor could address the issue.

@kmbn kmbn closed this as completed Jan 22, 2019
@fishfree
Copy link

The problem still exists. Only 10 resutls returned. How to re-open this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants