Hi,
Small correction to my previous mail, actually I was using *GET* http://
<DAS_HOST>:<API_PORT>/simulation/feed/{simulationName}, and got the
mentioned response from it. I was *not* using /simulation/single endpoint.Any help you can provide is most welcome! On Wed, Jul 5, 2017 at 9:41 AM, Sriskandarajah Suhothayan <[email protected]> wrote: > I don't think you can send a simulation config by calling http:// > <DAS_HOST>:<API_PORT>/simulation/single/ > > @Mohan/Ramindu can you guide him on the API of DAS 4.0 Event Simulation > > On Tue, Jul 4, 2017 at 9:48 PM, Madhawa Vidanapathirana < > [email protected]> wrote: > >> Hi, >> >> I am currently working on developing a Python Client for DAS 4.0 Event >> Simulator as a part of my GSOC project with WSO2. >> >> When I used the REST endpoint *GET* http://<DAS_HOST>:<API_PORT>/s >> imulation/single/{simulationName}, I get a JSON response with an >> incorrect field value. >> >> The JSON response consist of two string fields "status" and "message" >> where the value of "message" is an *invalid JSON text* describing a >> Simulation Configuration. For example, the following is a message field I >> got from DAS 4.0. >> >> Simulation configuration : {"sources":[{"timeStampInterva >> l":"5","simulationType":"RANDOM_DATA_SIMULATION","attri >> buteConfiguration":[{"length":"10","type":"PRIMITIVE_BASED"} >> ,{"min":"30000","max":"30000","precision":"2","type":"PRIMIT >> IVE_BASED"},{"min":"300","max":"300","type":"PRIMITIVE_ >> BASED"}],"streamName":"FooStream","siddhiAppName":" >> TestSiddhiApp"}],"properties":{"timestampStartTime":"1488615 >> 136958","simulationName":"simulationPrimitive","timeInterval >> ":"1000","timestampEndTime":null,"noOfEvents":"8"}} >> >> In the above, Simulation configuration should be within inverted commas, >> such as "Simulation Configuration" to properly support JSON parsing. >> (tested with standard JSON parser of Python3) >> >> P.s. I am using DAS 4.0, latest version from master branch. >> >> Kind Regards, >> -- >> *Madhawa Vidanapathirana* >> Student >> Department of Computer Science and Engineering >> University of Moratuwa >> Sri Lanka >> >> Mobile: (+94) 716874425 <071%20687%204425> >> Email: [email protected] >> Linked-In: https://lk.linkedin.com/in/madhawa-vidanapathirana-3430b94 >> > > > > -- > > *S. Suhothayan* > Associate Director / Architect > *WSO2 Inc. *http://wso2.com > * <http://wso2.com/>* > lean . enterprise . middleware > > > *cell: (+94) 779 756 757 <+94%2077%20975%206757> | blog: > http://suhothayan.blogspot.com/ <http://suhothayan.blogspot.com/>twitter: > http://twitter.com/suhothayan <http://twitter.com/suhothayan> | linked-in: > http://lk.linkedin.com/in/suhothayan <http://lk.linkedin.com/in/suhothayan>* > -- *Madhawa Vidanapathirana* Student Department of Computer Science and Engineering University of Moratuwa Sri Lanka Mobile: (+94) 716874425 Email: [email protected] Linked-In: https://lk.linkedin.com/in/madhawa-vidanapathirana-3430b94
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
