이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 145. ServiceNow


ServiceNow Component

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>
Copy to Clipboard Toggle word wrap

URI format

servicenow://InstanceName[?Options]
Copy to Clipboard Toggle word wrap

Options

Expand
Name
Default Value
Description
userName
null
The user name to use for authentication
password null The password to use for authentication
oauthClientId null OAuth2 client id
oauthClientSecret null OAuth2 client secret
oauthTokenUrl https://incenceName.service-now.com/oauth_token.do The OAuth2 token url
apiUrl https://incenceName.service-now.com/api/now The ServiceNow API url
table null The default table, can be overridden by header CamelServiceNowTable
excludeReferenceLink false True to exclude Table API links for reference fields
suppressAutoSysField false True to suppress auto generation of system fields
displayValue false
Return the display value (true), actual value (false), or both (all) for reference fields (default: false)
inputDisplayValue false True to set raw value of input fields
models null Defines the default model to use for a table i.e models.incident = my.company.model.Incident
mapper ServiceNow component uses Jackson Databind to translate request/response to/from Json and you can customize how it is done by providing a custom ObjectMapper

Headers

Expand
NameTypeDescription
CamelServiceNowResource String The resource to access TABLE, AGGREGATE, IMPORT
CamelServiceNowTable String
The table to access
CamelServiceNowAction String
The action to perform RETRIEVE, CREATE, MODIFY, DELETE, UPDATE
CamelServiceNowModel Class The data model
CamelServiceNowSysId String ServiceNow sysy_id
CamelServiceNowQuery String An encoded query
CamelServiceNowDisplayValue String Return the display value (true), actual value (false), or both (all) for reference fields (default: false)
CamelServiceNowInputDisplayValue Boolean True to set raw value of input fields
CamelServiceNowExcludeReferenceLink Boolean True to exclude Table API links for reference fields
CamelServiceNowFields String Comma-separated field names to return in the response
CamelServiceNowMinFields String A comma-separated list of fields for which to calculate the minimum value
CamelServiceNowMaxFields String A comma-separated list of fields for which to calculate the maximum value
CamelServiceNowSumFields String A comma-separated list of fields for which to calculate the sum of the values
CamelServiceNowLimit Integer Limit to be applied on pagination
CamelServiceNowView String UI view to determine fields returned in the response.
CamelServiceNowSuppressAutoSysField Boolean True to suppress auto generation of system fields
CamelServiceNowAvgFields String A comma-separated list of fields for which to calculate the average value
CamelServiceNowCount Boolean A boolean flag. You can set this parameter to true for the number of records returned by the query
CamelServiceGroupBy String The fields to group the returned data by
CamelServiceOrderBy String A list of values to order grouped results by
CamelServiceHaving String An additional query allowing you to filter the data based on an aggregate operation

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);
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat