Export API

18 views
Skip to first unread message

Nicholas Ng

unread,
Jul 26, 2013, 10:24:18 PM7/26/13
to commcar...@googlegroups.com
I tried to use the Export API, but when I try to GET or POST, it return me forbidden status, I guess It have to be authorized first only can export?

I'm using ROR technology.

Cory Zue

unread,
Jul 27, 2013, 1:27:48 PM7/27/13
to commcar...@googlegroups.com
Hi,

Yes you have to authenticate with something like digest auth in order to use the APIs.

Using curl this would looks something like this:

curl --digest -u "user:password" [url]

Cory


On Fri, Jul 26, 2013 at 10:24 PM, Nicholas Ng <nichth...@gmail.com> wrote:
I tried to use the Export API, but when I try to GET or POST, it return me forbidden status, I guess It have to be authorized first only can export?

I'm using ROR technology.

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

Nicholas Ng

unread,
Jul 28, 2013, 10:16:58 AM7/28/13
to commcar...@googlegroups.com
Can I pass extra params in the API in order to get authorized at once?

Cory Zue

unread,
Jul 28, 2013, 11:15:37 AM7/28/13
to commcar...@googlegroups.com
Hi Nicholas,

Not currently, though digest auth should be supported by most modern web tools.

Cory


--

Nicholas Ng

unread,
Jul 28, 2013, 9:07:02 PM7/28/13
to commcar...@googlegroups.com
oic,thanks...


--
You received this message because you are subscribed to a topic in the Google Groups "commcare-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/commcare-users/U0UvBZoUPhQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commcare-user...@googlegroups.com.

Daniel Myung

unread,
Jul 28, 2013, 9:11:26 PM7/28/13
to commcare-users
Another option is to do an initial login programmatically and get the session id from the returned cookie.

From there, in curl, curl --cookie "sessionid=123123213213" https://server/some/url

Issue here is you then will need to manage the sessionID from here on out once logged in. 
Reply all
Reply to author
Forward
0 new messages