summaryrefslogtreecommitdiffstats
path: root/src/main/resources/clds/camel/rest/clds-services.xml
blob: 61e1efbdcdf85b35b2a142e77caf8975d886ca70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<rests xmlns="http://camel.apache.org/schema/spring">
	<rest>
		<get uri="/v1/healthcheck" produces="application/json"
			outType="org.onap.policy.clamp.clds.model.CldsHealthCheck">
			<route>
				<setBody>
					<method ref="org.onap.policy.clamp.clds.service.CldsHealthcheckService"
						method="gethealthcheck()" />
				</setBody>
				<when>
					<simple> ${body} == 'NOT-OK'</simple>
					<setHeader headerName="CamelHttpResponseCode">
						<constant>404</constant>
					</setHeader>
					<log loggingLevel="ERROR" message="HealthCheck failed" />
				</when>
			</route>
		</get>

		<get uri="/v1/user/getUser" produces="text/plain">
			<to uri="bean:org.onap.policy.clamp.authorization.UserService?method=getUser()" />
		</get>
	</rest>
</rests>