aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml')
-rw-r--r--runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml34
1 files changed, 34 insertions, 0 deletions
diff --git a/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml
index d560db660..8a7523c2b 100644
--- a/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml
+++ b/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml
@@ -1575,6 +1575,40 @@
</doTry>
</route>
</get>
+ <get uri="/v2/toscaControlLoop/getJsonSchema" outType="java.lang.String" bindingMode="off" produces="application/json">
+ <route>
+ <removeHeaders pattern="*"
+ excludePattern="section"/>
+ <doTry>
+ <to uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Json Schema ')"/>
+ <to uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')"/>
+ <setHeader name="Content-Type">
+ <constant>application/json</constant>
+ </setHeader>
+ <setProperty name="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setProperty>
+ <to uri="direct:get-json-schema"/>
+ <to uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="GET JSON Schema request failed: ${exception.stacktrace}"/>
+ <setHeader name="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET JSON Schema FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </get>
<post uri="/v2/toscaControlLoop/postToscaInstantiation"
type="java.lang.String"