In the first instance I'm just looking to talk to the REST service using
some of the simpler commands
implemented with GET by pasting the URL into the browser.
I've also installed the Advanced REST client on CHROME and tried some post
/ get commands.
The problem is I'm not quite sure from reading the spec
What a practical URL for one of these commands would look like (I've tried
quite a few combinations also tried sending UID and password parameters
with the request)
I would really appreciate it if someone could post a practical example to
get me started (I could probably figure out the rest from the Doc )
Be advised that this spec is updated periodically to match the development
tip (uiexperiment).
It may therefore work slightly differently in the 1.4.4 release.
Because of authentication, when working to understand the interface, it is
best to grant the anonymous user Synchronize Tables or Adminster Tables
privileges.
This will eliminate any problems related to authentication. Note that you
can use several means of authentication once you get the base API
interactions worked out.
···
---------------------------
There is a slick Chrome extension, "Advanced Rest Client" that is very
helpful when working with REST APIs.
Requests to the server should specify an Accept header. Communications are
either in json(preferred) or XML (should work, but not really tested).
i.e.,
Accept: application/json
The opendatakit-simpledemo server has anonymous Synchronize Tables
privileges, so you can issue this request:
To get the list of tables (just one) on that server. (the base of the REST
api is 'odktables', the appId on the server is 'tables', and you are
requesting the list of all 'tables' on the server). This corresponds to
this API
In the first instance I'm just looking to talk to the REST service using
some of the simpler commands
implemented with GET by pasting the URL into the browser.
I've also installed the Advanced REST client on CHROME and tried some post
/ get commands.
The problem is I'm not quite sure from reading the spec
What a practical URL for one of these commands would look like (I've
tried quite a few combinations also tried sending UID and password
parameters with the request)
I would really appreciate it if someone could post a practical example to
get me started (I could probably figure out the rest from the Doc )
... and if you use the Chrome extension, be advised that you will get a 304
(not changed) error every other time you use the API.
This is because Chrome remembers ETag headers on the server's responses and
adds If-Modified headers even if you don't specify them.
···
On Mon, Oct 13, 2014 at 10:28 AM, Mitch Sundt wrote:
Be advised that this spec is updated periodically to match the development
tip (uiexperiment).
It may therefore work slightly differently in the 1.4.4 release.
Because of authentication, when working to understand the interface, it is
best to grant the anonymous user Synchronize Tables or Adminster Tables
privileges.
This will eliminate any problems related to authentication. Note that you
can use several means of authentication once you get the base API
interactions worked out.
There is a slick Chrome extension, "Advanced Rest Client" that is very
helpful when working with REST APIs.
Requests to the server should specify an Accept header. Communications are
either in json(preferred) or XML (should work, but not really tested).
i.e.,
Accept: application/json
The opendatakit-simpledemo server has anonymous Synchronize Tables
privileges, so you can issue this request:
To get the list of tables (just one) on that server. (the base of the REST
api is 'odktables', the appId on the server is 'tables', and you are
requesting the list of all 'tables' on the server). This corresponds to
this API
In the first instance I'm just looking to talk to the REST service using
some of the simpler commands
implemented with GET by pasting the URL into the browser.
I've also installed the Advanced REST client on CHROME and tried some
post / get commands.
The problem is I'm not quite sure from reading the spec
What a practical URL for one of these commands would look like (I've
tried quite a few combinations also tried sending UID and password
parameters with the request)
I would really appreciate it if someone could post a practical example to
get me started (I could probably figure out the rest from the Doc )