[ckan-dev] How to access an array in extra-fields ?
David Read
david.read at okfn.org
Thu Apr 28 17:12:38 UTC 2011
On 28 April 2011 18:14, Pascal Christoph <christoph at hbz-nrw.de> wrote:
> 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" ?
curl does quotes better:
curl 'http://ckan.net/api/search/package?q=lobid&publishingInstitution="http://lobid.org/organisation/DE-605"'
and it may help to encode request params in json using the 'qjson' parameter.
Just to say I'm also investigating the filter_by_openness question and
will get back tomorrow, royal wedding watching permitting.
David
>
> -o
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
More information about the ckan-dev
mailing list