Searching Private package with CKANR


#1

Hello,

The question might be simple and stupid but I cannot find an answer. I’m trying to search private packages in R with ckanr library. I’m using the code below:

package_search(“rstudio”, include_private=“True”)

It might be wrong but I found no example on using extra parameters in the CKAN Web API calls. The same call works fine in Postman. So basically the question is - how to pass “include_private=true” to the API call in the package_search.


#2

Thanks for your question @alexkoryavets

I’m a little confused by “private packages in R” part of your description. You are working with a CKAN instance, yes?


#3

I’m working with a CKAN instance. There is a dataset, named “package-created-from-rstudio”. If I set its visibility to Private, it is not shown in the results when I run the following code in RStudio:

package_search(q=“rstudio”, as = “table”)

If visibility is set to Public, I can see that dataset in the returned results of the same code. I want to know how one could specify API parameter in the function call to be able to search private datasets in R.


#4

we didn’t support the include_private parameter yet. I just added it. reintsall like remotes::install_github("ropensci/ckanr") and try again with the include_private parameter - you can pass in a regular R boolean TRUE


#5

Thanks a lot for the functionality, that will help us.