These are chat archives for ushahidi/Community

8th
Nov 2016
Nesp
@Nesp
Nov 08 2016 12:10
if I submit that request this is what I get
blob
Ushbot
@ushbot
Nov 08 2016 12:12
[David Losada, Ushahidi] what do you send in the body?
[David Losada, Ushahidi] `\
[David Losada, Ushahidi] it should be something like this:
{"grant_type":"client_credentials","client_id":"ushahidiui","client_secret":"35e7f0bca957836d05ca0492211b0ac707671261","scope":"posts media forms api tags savedsearches sets users stats layers config messages notifications contacts roles permissions csv"}
Nesp
@Nesp
Nov 08 2016 12:52
I am afraid I am used to the Ushahidi APIs V2, which means I am used just to one url. Should I execute these operations from command line? What if my deployment is on the cloud and I would like to send apis requests from Windows? Is it possible? (thanks a lot!)
Ushbot
@ushbot
Nov 08 2016 12:55
[David Losada, Ushahidi] yes all that is possible, you can use command line, a programming library or a utility like postman ( https://www.getpostman.com/ )
[David Losada, Ushahidi] you’d need to be familiar with general design of REST APIs, this may help https://developer.marklogic.com/try/rest/index
Nesp
@Nesp
Nov 08 2016 13:08
Ok, thanks! I would like to use the APIs to connect a website and a ushahidi V3 deployment. Could I do that with postman?
Or is it more of a tool to test requests?
Ushbot
@ushbot
Nov 08 2016 13:27
[David Losada, Ushahidi] it is more like a test tool, just like the command line. In order to connect a website you would write routines that interact with the API and reflect the results back in your website somehow
Nesp
@Nesp
Nov 08 2016 13:32
can I do that with javascript or do I need some php?
Ushbot
@ushbot
Nov 08 2016 13:32
[David Losada, Ushahidi] javascript would work
Nesp
@Nesp
Nov 08 2016 13:34
with ushahidi V2 I would send ajax requests and then parse the json result, but in this case I have more than a url, how would that work?
(sorry for asking so many questions :D )
Ushbot
@ushbot
Nov 08 2016 13:36
[David Losada, Ushahidi] well, if I understand your question right, you would have several methods in your javascript code. Each method would send requests to a different url endpoint