Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
ServiceNow ComponentAvailable as of Camel 2.18 The ServiceNow component provides access to all of ServiceNow REST API. Maven users will need to add the following dependency to their pom.xml for this component: <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-servicenow</artifactId> <version>${camel-version}</version> </dependency> URI formatservicenow://instanceName?[options]
Options
Headers
Usage examples:
context.addRoutes(new RouteBuilder() { public void configure() { from("direct:servicenow") .to("servicenow:{{env:SERVICENOW_INSTANCE}}" + "?userName={{env:SERVICENOW_USERNAME}}" + "&password={{env:SERVICENOW_PASSWORD}}" + "&oauthClientId={{env:SERVICENOW_OAUTH2_CLIENT_ID}}" + "&oauthClientSecret={{env:SERVICENOW_OAUTH2_CLIENT_SECRET}}" + "&model.incident=org.apache.camel.component.servicenow.model.Incident") .to("mock:servicenow"); } }); Map<String, Object> headers = new HashMap<>();headers.put(ServiceNowConstants.RESOURCE, "table"); headers.put(ServiceNowConstants.ACTION, ServiceNowConstants.ACTION_RETRIEVE); headers.put(ServiceNowConstants.SYSPARM_LIMIT, "10"); headers.put(ServiceNowConstants.TABLE, "incident");template.sendBodyAndHeaders("direct:servicenow", null, headers); |