[ckan-dev] How to access an array in extra-fields ?

Pascal Christoph christoph at hbz-nrw.de
Thu Apr 28 16:14:59 UTC 2011


Hello David,

Am 28.04.2011 16:41 schrieb David Read:
> On 28 April 2011 15:55, Pascal Christoph <christoph at hbz-nrw.de> wrote:
>> but if I try to query this:
>>
>> wget
>> 'http://ckan.net/api/search/package?q=lobid&publishingInstitution="http://lobid.org/organisation/DE-605"'
>>
>> I get only two packages, among the package "hbz_unioncatalog" is
>> missing. (These two packages have only one value for
>> "publishingInstitution").
> 
> It looks like a quoting problem in your command. This gives a result
> of 15 packages including the hbz_unioncatalog:

ya, thats the right result!

> wget http://ckan.net/api/search/package?q=lobid&publishingInstitution="http://lobid.org/organisation/DE-605"

ok, here I am in trouble. Being on *nix the '&' will be interpreted as
"putting process into background", so the wget command you give is not
working for me.

"man wget" tells me to use %3A:
{
You can encode unsafe characters in a URL as `%xy', `xy' being the
hexadecimal representation of the character's ASCII value.  Some common
unsafe characters include `%' (quoted as `%25'), `:' (quoted as `%3A'),
and `@' (quoted as `%40').  Refer to RFC1738 for a comprehensive list of
unsafe characters.
}
I tried that:

wget
"http://ckan.net/api/search/package?q=lobid&publishingInstitution=http%3A//lobid.org/organisation/DE-605"

but got an "400: Bad Request".

Is there a way to use curl , maybe with "curl --data" ?

-o




More information about the ckan-dev mailing list