[ckan-dev] Accessing Data.gov's CKAN API through JavaScript
Alessio Dragoni
alessio.dragoni at gmail.com
Sat Apr 19 15:13:35 UTC 2014
It might be because catalog.data.gov is using different ckan version of
demo.ckan.org
You can check it with http://catalog.data.gov/api/action/status_show
You can use the legacy v1 api in case you need just informatin about
groups. Such api is present in all versions
On Apr 19, 2014 5:01 PM, "Andy Dufilie" <andy.dufilie at gmail.com> wrote:
> Hi ckan-dev,
>
> I'm working on adding support for CKAN in Weave (oicweave.org). I have
> it working with demo.ckan.org, but not catalog.data.gov.
> See this page for my tests, results shown at the end of this email:
> http://jsfiddle.net/2xFq7/9/
>
> I was getting the "Bad request - JSON Error: No request body data" error
> from demo.ckan.org when I had the wrong Content-Type earlier, so I
> thought setting the Content-Type may fix the problem with data.gov, but
> the CORS preflight request fails on data.gov when I specify any request
> headers.
>
> Does data.gov not want me to use the action API at all? I noticed that
> it does not allow me to use the package_list action.
>
>
> Test results:
> {
> "method": "GET",
> "url": "
> http://demo.ckan.org/api/3/action/group_show?id=collectivites-locales&",
> "status": "200 OK",
> "success": true
> }
>
> {
> "method": "POST",
> "url": "http://demo.ckan.org/api/3/action/group_show",
> "params": {
> "id": "collectivites-locales"
> },
> "status": "200 OK",
> "success": true
> }
>
> {
> "method": "GET",
> "url": "http://catalog.data.gov/api/3/action/group_show?id=law1129&",
> "status": "400 Bad Request",
> "response": "Bad request - JSON Error: No request body data"
> }
>
> {
> "method": "POST",
> "url": "http://catalog.data.gov/api/3/action/group_show",
> "params": {
> "id": "law1129"
> },
> "status": "400 Bad Request",
> "response": "Bad request - JSON Error: No request body data"
> }
>
> {
> "method": "GET",
> "url": "http://catalog.data.gov/api/3/action/tag_show?id=2010-data&",
> "status": "200 OK",
> "success": true
> }
>
> {
> "method": "POST",
> "url": "http://catalog.data.gov/api/3/action/tag_show",
> "params": {
> "id": "2010-data"
> },
> "status": "409 Conflict",
> "success": false,
> "error": {
> "__type": "Validation Error",
> "id": "Missing value"
> }
> }
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140419/5c5e30a3/attachment-0003.html>
More information about the ckan-dev
mailing list