JSON Publisher

Hi everybody,

I have been trying to publish my data using the Z-ALPHA JSON Server for a while now without success. I can't seem to find any errors on the App Engine log nor on my server's log.

Do any of you have a working example that shows how to retrieve ODK's JSON post that I can work off of?

Thank you very much!
Yael

Can you access the server you are trying to publish to from the internet?

I.e., from a public wifi location?

If not, then AppEngine will also not be able to transmit to it.

··· On Tue, Nov 26, 2013 at 6:24 AM, wrote:

Hi everybody,

I have been trying to publish my data using the Z-ALPHA JSON Server for a
while now without success. I can't seem to find any errors on the App
Engine log nor on my server's log.

Do any of you have a working example that shows how to retrieve ODK's JSON
post that I can work off of?

Thank you very much!
Yael

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Hi Mitch,

Yes, I set up a public website to receive the json file. I just don't have that much experience working with JSON so I could really use an example to see if I am doing things correctly...

Thanks!

··· El martes, 26 de noviembre de 2013 09:41:11 UTC-6, Mitch Sundt escribió: > Can you access the server you are trying to publish to from the internet? > > I.e., from a public wifi location? > > If not, then AppEngine will also not be able to transmit to it. > > > > > > > > > > > > > > > On Tue, Nov 26, 2013 at 6:24 AM, wrote: > > > Hi everybody, > > > > I have been trying to publish my data using the Z-ALPHA JSON Server for a while now without success. I can't seem to find any errors on the App Engine log nor on my server's log. > > > > Do any of you have a working example that shows how to retrieve ODK's JSON post that I can work off of? > > > > Thank you very much! > > Yael > > > > -- > > -- > > Post: opend...@googlegroups.com > > Unsubscribe: opendatakit...@googlegroups.com > > Options: http://groups.google.com/group/opendatakit?hl=en > > > > --- > > You received this message because you are subscribed to the Google Groups "ODK Community" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit...@googlegroups.com. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com

I would start simple. First just set up your public server to not have any
security/authentication and to read any POST requests and print their
contents to your server's log file.

Set up the Z-ALPHA JSON Server Publisher. And be sure you use ODK
Aggregate 1.4 -- this publisher has changed between 1.3.x and 1.4.

The POST entity body that ODK Aggregate will send to your server will be a
JSON serialization of an object, as described here:
http://code.google.com/p/opendatakit/wiki/AggregateToJSonXmlREDCapPublishers
under the Simple JSON Publisher heading.

i.e., a JSON serialization of this Javascript object:

{ token: "authToken",
content: "record",
formId: "yourFormId",
formVersion: "yourFormVersion",
data: [* { ... } *, ... ]
}

Where the fields in bold are replaced with the appropriate information
specific to your site.

Once you get the server reading and handling the POST requests from ODK
Aggregate, you can then enable authentication (rejecting any requests that
have an unexpected authToken value), and then move on to parsing the data
field as needed for your downstream processing.

Mitch

··· On Tue, Dec 10, 2013 at 7:57 AM, wrote:

Hi Mitch,

Yes, I set up a public website to receive the json file. I just don't have
that much experience working with JSON so I could really use an example to
see if I am doing things correctly...

Thanks!

El martes, 26 de noviembre de 2013 09:41:11 UTC-6, Mitch Sundt escribió:

Can you access the server you are trying to publish to from the internet?

I.e., from a public wifi location?

If not, then AppEngine will also not be able to transmit to it.

On Tue, Nov 26, 2013 at 6:24 AM, ya...@soyhormiga.com wrote:

Hi everybody,

I have been trying to publish my data using the Z-ALPHA JSON Server for
a while now without success. I can't seem to find any errors on the App
Engine log nor on my server's log.

Do any of you have a working example that shows how to retrieve ODK's
JSON post that I can work off of?

Thank you very much!

Yael

--

--

Post: opend...@googlegroups.com

Unsubscribe: opendatakit...@googlegroups.com

Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups "ODK Community" group.

To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Yael,

If you want a quick and dirty server to test with, attached is the
source for a JSON server I hacked together. It listens for posts on
port 12345 and prints the result out to the command line.

Yaw

server.py (557 Bytes)

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Tue, Dec 10, 2013 at 9:22 PM, Mitch Sundt mitchellsundt@gmail.com wrote:

I would start simple. First just set up your public server to not have any
security/authentication and to read any POST requests and print their
contents to your server's log file.

Set up the Z-ALPHA JSON Server Publisher. And be sure you use ODK Aggregate
1.4 -- this publisher has changed between 1.3.x and 1.4.

The POST entity body that ODK Aggregate will send to your server will be a
JSON serialization of an object, as described here:
http://code.google.com/p/opendatakit/wiki/AggregateToJSonXmlREDCapPublishers
under the Simple JSON Publisher heading.

i.e., a JSON serialization of this Javascript object:

{ token: "authToken",
content: "record",
formId: "yourFormId",
formVersion: "yourFormVersion",
data: [ { ... } , ... ]
}

Where the fields in bold are replaced with the appropriate information
specific to your site.

Once you get the server reading and handling the POST requests from ODK
Aggregate, you can then enable authentication (rejecting any requests that
have an unexpected authToken value), and then move on to parsing the data
field as needed for your downstream processing.

Mitch

On Tue, Dec 10, 2013 at 7:57 AM, yael@soyhormiga.com wrote:

Hi Mitch,

Yes, I set up a public website to receive the json file. I just don't have
that much experience working with JSON so I could really use an example to
see if I am doing things correctly...

Thanks!

El martes, 26 de noviembre de 2013 09:41:11 UTC-6, Mitch Sundt escribió:

Can you access the server you are trying to publish to from the
internet?

I.e., from a public wifi location?

If not, then AppEngine will also not be able to transmit to it.

On Tue, Nov 26, 2013 at 6:24 AM, ya...@soyhormiga.com wrote:

Hi everybody,

I have been trying to publish my data using the Z-ALPHA JSON Server for
a while now without success. I can't seem to find any errors on the App
Engine log nor on my server's log.

Do any of you have a working example that shows how to retrieve ODK's
JSON post that I can work off of?

Thank you very much!

Yael

--

--

Post: opend...@googlegroups.com

Unsubscribe: opendatakit...@googlegroups.com

Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups "ODK Community" group.

To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thank you both!!

I ended up publishing to Fusion Tables and using the Fusion Tables API (https://developers.google.com/fusiontables) through google´s PHP API Client (https://code.google.com/p/google-api-php-client) and it worked
Cheers,

Yael