Custom Query (2152 matches)
Results (331 - 333 of 2152)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #342 | fixed | JSONP parameter in API | dread | dread |
| Description |
As aCKAN client using JQuery I want tocall the CKAN API and instead of receiving back JSON I get JSONP. i.e. "%s(%s)" % (callback, json_content) Suggested implementationAll API calls allow the JSONP 'callback' parameter to be specified in the request and this wraps the JSON response. See suggested patch to rest.py by Donovan Hide: http://knowledgeforge.net/ckan/trac/attachment/ticket/336/resource.patch Testimport re import unittest def test_jsonp_callback():
I think the point needs to be made that JSONP only works for GET requests and not POST/PUT/DELETE, so there needs to be a check for that in the _finish_ok method. (thanks to Donovan Hide for test) |
|||
| #343 | fixed | Packages referred by ID in API | johnbywater | dread |
| Description |
When you do a Package Search or query a Package Relationship in the API version 2, the responses have relationships which refer to packages by name, not by ID. |
|||
| #344 | fixed | REST Create package with incorrect format gives 500 error | dread | |
| Description |
PUT to /rest/api/package of {"name": "name", "resources": ["someurl.com/data"] } (i.e. resource is a string, not a dictionary) gives 500 error, when it should give a 400 error and helpful error message. Exception: Module ckan.controllers.rest:154 in create
<< if register == 'package' and not subregister:
fs = ckan.forms.get_standard_fieldset()
request_fa_dict = ckan.forms.edit_package_dict(ckan.forms.get_package_dict(fs=fs), request_data)
fs = fs.bind(model.Package, data=request_fa_dict, session=model.Session)
elif register == 'package' and subregister in model.PackageRelationship.get_all_types():
>> request_fa_dict = ckan.forms.edit_package_dict(ckan.forms.get_package_dict(fs=fs), request_data)
Module ckan.forms.package_dict:88 in edit_package_dict
<< for res_dict in value:
res_dict_str = {}
for key, value in res_dict.items():
res_dict_str[str(key)] = value
resources.append(res_dict_str)
>> for key, value in res_dict.items():
AttributeError: 'unicode' object has no attribute 'items'
|
|||
