Hi Madhawa, Yes, Simulation configuration should be within inverted commas. I will fix it and let you know.
Best Regards, Ramindu. On Wed, Jul 5, 2017 at 9:49 AM, Madhawa Vidanapathirana < madhawavidanapathir...@gmail.com> wrote: > 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 <s...@wso2.com> > 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 < >> madhawavidanapathir...@gmail.com> 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","attributeC >>> onfiguration":[{"length":"10","type":"PRIMITIVE_BASED"},{" >>> min":"30000","max":"30000","precision":"2","type":"PRIMITI >>> VE_BASED"},{"min":"300","max":"300","type":"PRIMITIVE_BASED" >>> }],"streamName":"FooStream","siddhiAppName":"TestSiddhiApp" >>> }],"properties":{"timestampStartTime":"148861513 >>> 6958","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: madhawavidanapathir...@gmail.com >>> 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 <+94%2071%20687%204425> > Email: madhawavidanapathir...@gmail.com > Linked-In: https://lk.linkedin.com/in/madhawa-vidanapathirana-3430b94 > -- *Ramindu De Silva* Software Engineer WSO2 Inc.: http://wso2.com lean.enterprise.middleware email: ramin...@wso2.com <sanj...@wso2.com> mob: +94 719678895
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev