[ckan-dev] problem inserting a row in the dataset

Dominik Moritz dominik.moritz at okfn.org
Fri May 31 18:20:38 UTC 2013


Hi,

use POST, instead of GET[1] to write data to datastore_upsert.

Cheers,
Dominik

[1] http://www.w3schools.com/tags/ref_httpmethods.asp

On 31 May 2013, at 18:35, fwolanczyk at cs.com wrote:

> 
> 
> hi there,
> we tried to ask 
> Gavin Chait | Head of Services | Open Knowledge Foundation
> for  help, but were asked to post to the dev list - i hope someone can help - we have a deadline for this NYC BigApps contest of june 7, so this is timely critical!
> 
> 
> i made a dataset, and i have no problem querying the set using this string (i blocked out the id number)
> 
> 
> 
>    NSString *feedURLString = @"http://sandboxdw.pediacities.com/api/3/action/datastore_search?resource_id=XXX&limit=5";
> 
> 
> 
> 
> 
> i am getting "http error" (400) when i try to insert a row in it 
> here is the url i use
> 
> 
> 
> http://sandboxdw.pediacities.com/api/3/action/datastore_upsert?resource_id=XXX&records=%7B%22Division%22:%20%22BMTFake%22,%20%22Line%22:%20%22BroadwayFake%22,%22Station_Name%22:%20%2249th%20St%22,%22Station_Latitude%22:%20%22BMTFake%22,%22Station_Longitude%22:%20%20%22-73.984139%22%7D&method=insert
> 
> 
> 
> i am only providing a few of the columns on the dataset - that cant be the problem... it must be the syntax... i have spent hours researching this, to no avail - any ideas??
> thnx,
> fran
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev

Dominik Moritz
CKAN developer  |  skype: d.moritz  |  @doobly_doo
The Open Knowledge Foundation
Empowering through Open Knowledge
http://okfn.org/  |  @okfn  |  http://ckan.org  |  @CKANproject





More information about the ckan-dev mailing list