Important: To improve forward compatibility of clients of the REST API, no manual construction of URLs should be performed, except for the construction of the Query URL.
URLs should be generated by resolving the relative hrefs provided in the XML. These should be resolved against the URL that they were returned from.
<stubs> <stub id="id" name="name" component="component name" version="1.0" href="relative URL" /> <stub id="id" name="name" component="component name" operation="operation name" version="1.1" href="relative URL" /> ... </stubs>
<stub> <configuration href="relative URL to stub definition configuration" /> <instances href="relative URL to stub instances list" /> </stub>
<start-stub> <configuration> ... </configuration> <agents> <agent host="host name or IP (as specified by agent)"> <attributes> <attribute value="attribute name" /> ... </attributes> </agent> </agents> </start-stub>
To start the stub on a default agent with default configuration, just send:
<start-stub />
<configuration> <tags> <tag name="my tag 1" value="default value" /> <tag name="my tag 2" value="" /> <!-- Default to empty string --> <tag name="my tag 3" /> <!-- Default to null --> ... </tags> <behaviours> <behaviour name="behaviour instance name"> <parameters> <parameter name="parameter name" value="default value" /> ... </parameters> </behaviour> ... </behaviours> <logging level="DEFAULT|NONE|NORMAL|DEBUG" /> <response-time distribution="FIXED|UNIFORM|GAUSSIAN" minimum="0" maximum="1000" /> </configuration>
<instances> <instance id="id" status="Deploying|Running|Stopping|Error|Setting" href="relative URL to instance" /> ... </instances>
<instance id="id" status="Deploying|Running|Stopping|Error|Setting" href="relative URL to self"> </instance>