REST Web Service

Create a REST Web Service datastore to connect to a REST Web Service.

REST Web Service datastores support a number of specific configurable options. Configure the datastore to match your REST-based web service.

SAP Cloud Integration for data services does not support using web services or RFC function calls as a source in the job’s data flow. However, if you want to call one of them as a source, you have to set it up in the middle of a data flow. Also, you must set up a dummy source with any datastore because data flows require a defined source and target. You can choose any source you like, then use Row_Gen to trigger the data flow to iterate the row for function call. Additionally, you can use a web services datastore as a target.

Option

Possible values

Description

WADL Path

URL

Local path

Specifies the location of the WADL file that describes the REST-based web service.

Display response in history

Yes

No

Specifies whether to display the response from the web service in the Web Service Response tab in the history. The stored web service response will be cleared when the history is cleared.

Authorization schema

Basic

Basic + CSRF

Authorization Header

OAuth 1.0

OAuth 2.0

Specifies the authorization schema to use when connecting to the web service.

You must have knowledge of the provider to which you are connecting in order to obtain some configuration information, such as the consumer key.

For OAuth 2.0-based authentication, the software supports only client_credentials and password-based grant types. It does not support the 3-legged model.

User name

Alphanumeric characters and underscores, or blank

The user name for basic authentication.

This option is required only when basic authentication is needed to connect to the web service provider.

Password

Alphanumeric characters and underscores, or blank

The password for basic authentication.

This option is required only when basic authentication is needed to connect to the web service provider.

Password type

Plain Text

Digest

The password type for basic authentication.

This option is required only when basic authentication is needed to connect to the web service provider.

CSRF Fetch URL

URL

The URL of the CSRF token.

This option is required when CSRF (Cross-Site Request Forgery protection) is needed to connect to the web service provider.

CSRF Fetch URL Method

GET

POST

The preferred method to use to retrieve the CSRF token.

This option is required when CSRF (Cross-Site Request Forgery protection) is needed to connect to the web service provider.

CSRF Header Key

Alphanumeric characters and underscores

The header key to use for CSRF protection.

The default is X-CSRF-Token.

This option is required when CSRF (Cross-Site Request Forgery protection) is needed to connect to the web service provider.

CSRF Header Value

Alphanumeric characters and underscores

The header value to use for CSRF protection.

The default is Fetch.

This option is required when CSRF (Cross-Site Request Forgery protection) is needed to connect to the web service provider.

Header-based API key or token

Alphanumeric characters and underscores

The API key or token to use for header-based authorization.

This option is required only when an authorization header is needed to connect to the web service provider.

Consumer Key

Consumer Secret

Alphanumeric characters and underscores

The OAuth 1.0 consumer key and secret (equivalent to a role account user name and password). You can obtain this information from the web service provider.

This option is required when OAuth 1.0 authentication is needed to connect to the web service provider.

Token Key

Token Secret

Alphanumeric characters and underscores

The OAuth 1.0 token key and secret. This information allows single user authorization. You can obtain this information from the web service provider.

These options are required only when OAuth 1.0 authentication is needed to connect to the web service provider and the provider does not support 2-legged authentication.

Request Token URL

Access Token URL

URL

The URL for requesting a temporary authorization token and the URL for retrieving the final token.

These options are required only when OAuth 1.0 authentication is needed to connect to the web service provider.

Leave these options empty if the server uses only the consumer key and secret to access the protected resource.

Credentials Location

Both

Header

Body

This configuration option is available for OAuth 2.0 and allows you to choose where the authentication is added in the request. by selecting one of the following options:

  • Both (default) - Adds the client ID and client secret to both the authorization header and body of the request

    Note

    Certain REST endpoints may only accept authentication in either the header or body, so selecting this option may cause an authentication failure.

  • Header - Adds the client ID and client secret to only the authorization header of the request

  • Body - Adds the client ID and client secret to only the authorization body of the request

Client ID

Client Secret

Alphanumeric characters and underscores

The OAuth 2.0 client ID (represents your application) and client secret (security key). You can obtain this information from the web service provider.

These options are required only when OAuth 2.0 authentication is needed to connect to the web service provider.

Access Token

Alphanumeric characters and underscores

The location (API endpoint) of the OAuth 2.0 temporary token. This allows you to access protected resources.

This option is required only when OAuth 2.0 authentication is needed to connect to the web service provider.

Refresh Token

Alphanumeric characters and underscores

The OAuth 2.0 refresh token.

This option is required only when OAuth 2.0 authentication is needed to connect to the web service provider.

Grant Type

Client credentials

Password

The type of grant access you want to use to obtain an access token.

  • Client credentials (default): Use your own credentials in order to obtain an access token.

  • Password: Use the resource owner's username and password to obtain an access token.

This option is required only when OAuth 2.0 authentication is needed to connect to the web service provider.

Signature Method

HMAC-SHA1

Plain Text

The signature method to use for HTTP requests.

Preferred Method

Header String (POST)

Query String (GET)

The method that you want to use to test trusted authentication.

Additional Headers

Alphanumeric characters and underscores

Allows you to include additional parameters in the webservices request. Enter one or more key/value pairs. Multiple parameters must be separated by an ampersand (&). For example: resource=https://graph.facebook.com/oauth/access_token&scope=something

Supported only with OAuth 2.0 authorization schema.

XML recursion level

Positive integer

The number of passes the software should run through the XSD to resolve names.

The default is 0.

Use proxy

Yes

No

Specifies whether to use a proxy to connect to the web service provider.

Standard HTTP Header Fields

A semi-colon separated list of header fields

A list of the fields and values that are the same and fixed for all web service functions in the web service datastore.

The values for standard fields also remain the same for all web service calls in a data flow.

Dynamic Base URL

URL

The base URL comprised of the protocol, server name, port number, and path of the service that listens to RESTful web service requests.

You can obtain this information from the WADL file under the element resource and attribute base. This is useful when you have multiple servers serving the same resources and you want to dynamically create the URL during the call.

Note

You must populate Dynamic Base URL if you are using more than one system configuration. Otherwise, the system connects to the server from which the WEB_SERVICE_FUNCTION was imported. Changing the default configuration does not affect the URL; you must add a Dynamic Base URL for this to work.

Preferred Mediatype

Application/XML

Application/JSON

The preferred media type.

Server Certificate File

Path and filename

The path and filename of the .pem server certificate file on the Agent host system. Acquire the REST web services server certificate file from the REST web service provider and download it to this path. The path can be anywhere, however it must be configured on the Agent's allowlist.

Client Certificate File

Path and filename

The path and filename of the .pem client certificate file on the Agent host system. Contact your Security Administrator for this client certificate.

Client Key File

Path and filename

The path and filename of the .pem private key for the client certificate on the Agent host system.

Passphrase

Alphanumeric and special characters, or blank

The passphrase used to generate the private key file.

Data flow options

When you use a web services datastore as a data flow target, there are additional options available. The following options are available in the Web Service Response tab in the data flow editor:

Option

Possible values

Description

Response File Location

File path

The path to the template XML file on the SAP Data Services Agent host system where the response from the web service will be stored.

Delete and re-create file

Selected

Unselected

Specifies whether to delete the existing response file each time the web service is called.