d4872ef45d89833fb6dae1a7d66c5000f3a3df23
[clamp.git] / src / main / resources / clds / camel / rest / clamp-api-v2.xml
1 <rests xmlns="http://camel.apache.org/schema/spring" >
2     <rest >
3         <get uri="/v2/loop/getAllNames"
4             outType="java.lang.String[]"
5             produces="application/json">
6             <route>
7                 <to uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
8                 <to uri="bean:org.onap.clamp.loop.LoopController?method=getLoopNames()" />
9             </route>
10         </get>
11         <get uri="/v2/loop/{loopName}"
12             outType="org.onap.clamp.loop.Loop"
13
14             produces="application/json">
15             <route>
16                 <to uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
17                 <to uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
18             </route>
19         </get>
20         <get uri="/v2/loop/svgRepresentation/{loopName}"
21             outType="java.lang.String"
22
23             produces="application/xml">
24             <to
25                 uri="bean:org.onap.clamp.loop.LoopController?method=getSVGRepresentation(${header.loopName})" />
26         </get>
27
28         <post uri="/v2/loop/updateGlobalProperties/{loopName}"
29               type="com.google.gson.JsonObject"
30               consumes="application/json"
31               outType="org.onap.clamp.loop.Loop"
32               produces="application/json">
33             <to
34                     uri="bean:org.onap.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${body})" />
35         </post>
36         <post uri="/v2/loop/updateOperationalPolicies/{loopName}"
37             type="com.google.gson.JsonArray"
38             consumes="application/json"
39             outType="org.onap.clamp.loop.Loop"
40             produces="application/json">
41             <route>
42                 <to uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
43                 <to uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${body})" />
44             </route>
45         </post>
46         <post uri="/v2/loop/updateMicroservicePolicy/{loopName}"
47             type="org.onap.clamp.policy.microservice.MicroServicePolicy"
48             consumes="application/json"
49             outType="org.onap.clamp.policy.microservice.MicroServicePolicy"
50             produces="application/json">
51             <route>
52                 <to uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
53                 <to uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${body})" />
54             </route>
55         </post>
56     </rest>
57 </rests>
58