Skip to main content
Skip table of contents

OData Adapter Reference

Extension Attributes

OData Alias

Attribute
(Name of Setting)

Description

Allowed Values / Examples

Name

Specify a name for the alias.

any string

OData

Version

Select the OData version of the endpoint.

4.0 and 4.01

Standard

Protocol
(protocol)

Specify here the protocol through which the OData endpoint is accessible.

http (default), https

Port
(port)

Specify here the port through which the OData endpoint is accessible.

a valid port

Host
(host)

Specify here the host running the OData endpoint.

a valid host

Base Path
(basePath)

Specify here the base path of the OData endpoint.

a valid path, e.g /v4/northwind/northwind.svc

Ignore HTTP Errors
(ignoreHttpErrors)

Specify here whether you want the OData adapter to throw an exception upon receiving an HTTP error code >= 400.

true

Do not throw an exception upon receiving an HTTP error code >= 400 (default).

false

Throw an exception upon receiving an HTTP error code >= 400.

Additional Request Headers
(additionalHeaders)

This attribute can contain a list of additional headers in form of name/value pairs.

Valid format is: <name>:<value>, e.g. API-Key:acme. Separate multiple headers with a comma.

Advanced

HTTP Header Roles for Requests
(requestHttpHeaderRoles)

In the context of HTTP based adapters (URL, REST), enable automatic header generation for the listed headers. These definitions overwrite the default behavior, and X-Transaction-Id, X-Request-Id, X-Sender-Host and/or X-Sender-Service will be substituted by this definition.

requestHttpHeaderRoles can hold a list of definitions in format <http header name>:<role>, that will automatically be generated for each adapter call on this alias. <role> can be one of the listed allowed values (one list entry per line).

client_host

Provide the client host in a header <http header name> instead of X-Sender-Host.

client_service

Provide the client service in a header <http header name> instead of X-Sender-Service.

correlation_id

Provide the correlation ID in a header <http header name> instead of X-Request-Id.

transaction_id

Provide the transaction ID in a header <http header name> instead of X-Transaction-Id.

passthrough

Pass a present header <http header name> to the called service.

passthrough=<request header name>

Pass an present header <request header name> to the called service under the name of <http header name>.
This is equivalent to renaming a header.

Digest Algorithm
(digestAlgorithm)

Generates a HTTP digest header using the specified algorithm. When applied, a digest header is generated using the specified algorithm, and sent with the request. The generated header conforms with RFC3230 and RFC5843.

Only one value is supported (no multi-value header).

None

No header generated (default).

MD5

Generate header using MD5 algorithm.

SHA

Generate header using SHA algorithm.

SHA-1

Generate header using SHA-1 algorithm.

SHA-256

Generate header using SHA-256 algorithm.

SHA-512

Generate header using SHA-512 algorithm.

Follow Redirects
(followRedirects)

Specify here the maximum number of redirects to follow. Default value is 0 (no redirects).

any integer, 0 (default)

Request Transfer Encoding

Specify whether to disable chunk encoding for POST, PUT, and PATCH requests.

Set to none if the endpoint cannot handle chunked encoding.

none

Send the request body as one continuous stream with a content-length header.

chunked

Send the request body in multiple chunks (default).

Options
(options)

Specify native cURL options as listed on Supported cURL Options.

Use one of the following syntax rules:

  • values separated by ',' in one line

  • values separated by ' ' in one line

  • list of attributes

JSON: Keep Null Values
(jsonKeepNulls)

When jsonKeepNulls is true, attributes of the REST response object having NULL values will be rendered to the REST response, otherwise they will be left out completely (see also chapter NULL Values).

true

Render attributes with NULL values to the REST call.

false

Leave out attributes with NULL values in the REST call (default).

JSON: Compact Format
(jsonCompact)

When jsonCompact is true, the JSON composer will generate compact JSON, otherwise it will generate pretty JSON.

true

Generate compact JSON (default).

false

Generate pretty JSON.

JSON: Write Type Discriminator
(jsonWriteTypeDiscriminator)

If jsonCompact is true, the JSON composer will generate xUML type properties ("e2e:type") to the generated JSON. If this option is true, the Runtime will write the original xUML type to the generated JSON in form of "e2e:type": "<name of the original xUML type>" if the type being serialized does not match the expected metadata. This is necessary if you want to convert the generated JSON back to an xUML class using jsonToClass().

true

false

Authentication

User/Password
(user)

Specify credentials here if the called OData endpoint needs basic authentication.

Valid format is <user>/<password>, e.g. david.stringer/pAsWoRd456

Proxy Settings (if the called REST service is accessed via a proxy)

URL
(proxyURL)

Specify the URL of the proxy server.

See CURLOPT_PROXY.

User
(proxyUser)

Specify the proxy credentials.

See CURLOPT_PROXYUSERPWD, format is <user>/<password>, e.g. david.stringer/pAsWoRd456

Protocol
(proxyType)

Specify the proxy type/protocol.

See CURLOPT_PROXYTYPE.

SSL Settings (if the called REST service uses SSL)

CA Info File
(sslCAInfo)

Specify a file name containing additional certificates for the connection verification (e.g. additional root CAs).

See CURLOPT_CAINFO.

Certificate File
(sslCertificateFile)

Specify a fle name containing the client certificate.

See CURLOPT_SSLCERT.

Certificate Type
(sslCertificateType)

Specify the type of the certificate.

See CURLOPT_SSLCERTTYPE.

Private Key File
(sslPrivateKeyFile)

Specify a file name containing the private key.

See CURLOPT_SSLKEY.

Private Key Password
(sslPrivateKeyPassword)

Specify the password for the private key.

See CURLOPT_KEYPASSWD.

Private Key Type
(sslPrivateKeyType)

Specify the type of the key.

See CURLOPT_SSLKEYTYPE.

Verify Host
(sslVerifyHost)

Specify whether to verify the host information form the SSL connection.

See CURLOPT_SSL_VERIFYHOST.

Verify Peer
(sslVerifyPeer)

Specify whether to verify the peer information from the SSL connection.

See CURLOPT_SSL_VERIFYPEER.

OData Adapter

Attribute
(Name of Setting)

Description

Allowed Values / Examples

Alias
(alias)

Specify the OData alias the adapter should use to establish the connection.

a valid OData alias

Odata Interface

This extension defines an interface as an OData interface. It has no additional attributes.

OData Operation

This extension defines an operation as an OData operation. It has no additional attributes.

OData Primary Key Parameter

Defines this parameter as a primary key.

Attribute
(Name of Setting)

Description

Allowed Values / Examples

External Name

Specify the name under which this parameter is know at the OData endpoint.

Use this if the name of the primary key does not meet the naming requirements for operation parameters in the Designer.

OData Custom Parameter

Defines this parameter as custom.

Attribute
(Name of Setting)

Description

Allowed Values / Examples

In via
(in)

Defines how the parameter will be passed to the OData operation.

query

via a query string (default)

header

via the OData call header

External Name

Defines an external name for the REST parameter.

Use this, when the OData endpoint has parameter names with special characters. In this case, set this name (e.g. ugly@parameter-name) to externalName and give a better name. So you will not have to escape the parameter every time you use it.

any string

OData Entity Set (Class)

Attribute
(Name of Setting)

Description

Allowed Values / Examples

External Name

Defines an external name for the REST parameter.

Use this, when the OData endpoint has parameter names with special characters. In this case, set this name (e.g. ugly@parameter-name) to externalName and give a better name. So you will not have to escape the parameter every time you use it.

any string

OData Entity Type

Specify the OData type of the entity as imported or defined in your data model.

Customer

OData Entity Set Element (Class)

Attribute
(Name of Setting)

Description

Allowed Values / Examples

OData Entity Type

Specify the OData type of the entity as imported or defined in your data model.

Customer

OData Property (Property)

Attribute
(Name of Setting)

Description

Allowed Values / Examples

OData Type

Select the native OData type of the property.

a supported OData type as listed on OData Import Rules

OData Navigation

Define whether this property is a navigation property (defining relations to other entities).

true

The property defines a relation to another entity, and can be used in the _expand parameter.

false

The property cannot be used in the _expand parameter (default).

OData Adapter Parameters

Name

Type

Direction

Description

requestOptions

RequestOptions

in

Use this parameter to configure the REST Adapter dynamically and overwrite the settings from the component diagram.

entities

Any

out

This parameter holds the adapter output and is of that type that is given back by the called OData database service.

REST Utility Functions

Access to HTTP request and response objects is provided through global methods:  getRestHttpRequest() and  getRestHttpResponse() .

Function

Parameter

Return Value

Description

Example

getRestHttpRequest()

none

object of type Request

Returns the request details as provided by the HTTP call. Changing the request object will not have any effects.
For details see getRestHttpRequest().

local request = getRestHttpRequest();

getRestHttpResponse()

none

object of type Response

Set the response details to return them to the caller.
For details see getRestHttpResponse().

local response = getRestHttpResponse();

OData Parameter Types

AdapterResponse

Attribute

Type

Description

Allowed Values / Examples

httpStatus

Integer

HTTP status code of the adapter call.

500

headers

Array of HeaderField

This attribute is deprecated. It is only present for compatibility reasons.

Please use httpHeaderMap for new implementations. The implementation of httpHeaderMap complies to the HTTP specification and supports multiple headers having the same name.

body

Blob

HTTP body of HTTP response. Among others, the body contains

  • the response Object for successful calls

  • an object of the RESTError class if the call has not been successful.

responseObject

Any

Response Object of the REST adapter call if the endpoint returns one (response output parameter).

The response object is only returned for successful calls.

httpHeaderMap

Map of Entry

Header information as a map. The map contains arrays of header value strings whereas the header name is the key of the map.

  • Header names are lowercase and treated case insensitive.

  • Multiple headers with the same name are treated as arrays.

Refer to HTTP Header Support for more information on the standard xUML HTTP headers.

Request

Attribute

Type

Description

Allowed Values / Examples

queryString

String

Query string, if provided with the call.

status=in%20progress

queryParameters

Array of Parameter

All query parameters as an array of Parameter classes containing name/value pairs.

body

Blob

Body of the HTTP request.

path

String

Path to the REST resource.

/support/supportcases/

pathParameters

Map

All REST parameters as a map.

httpHeaderMap

Map of Entry

Header information as a map. The map contains arrays of header value strings whereas the header name is the key of the map.

  • Header names are lowercase and treated case insensitive.

  • Multiple headers with the same name are treated as arrays.

Refer to HTTP Header Support for more information on the standard xUML HTTP headers.

RequestOptions

Attribute

Type

Description

Allowed Values / Examples

additionalHeaders

Array of HeaderField

All REST request header fields as an array of HeaderField classes containing name/value pairs.

options

Array of Option

Specify native cURL options as listed in Setting cURL Options on the URL Adapter.

Use one of the following syntax rules:

  • values separated by ',' in one line

  • values separated by ' ' in one line

  • list of tagged values

ssl

SSL

Use this parameter to supply SSL information.

proxy

Proxy

Use this parameter to supply necessary proxy information.

additionalQueryParameters

Array of Parameter

Use this parameter to provide additional query parameters to the REST service call.

followRedirects

Integer

Specify here the maximum number of redirects to follow. Default value is 0 (no redirects).

any integer

basicAuth

Authentication

This parameter provides an object of type Authentication containing the user and the password.

basePath

String

Overwrite here the base path of the REST service.

a valid path, e.g. /support

host

String

Overwrite here the host running the REST service that has been defined in the component diagram.

a valid host, e.g. scheer-acme.com

port

Integer

Overwrite here the port through which the REST service is accessible.

a valid port number, e.g. 12345

protocol

String

Overwrite here the protocol through which the REST service is accessible.

http

Use the HTTP protocol to access the service (default).

https

Use the HTTPS protocol to access the service.

ignoreHttpErrors

Boolean

If true,  Default value is true.

true

HTTP error codes >= 400 will not cause an exception in the service (default). This implies, that the response body is accessible even if HTTP errors occur.

false

HTTP error codes >= 400 will cause an exception in the service.

jsonComposerOptions

ComposerOptions

Use this parameter to specify JSON composer options on the REST call. You can use these options to e.g. overwrite jsonKeepNulls from the REST alias.

Valid composer options as described below.

Response

Attribute

Type

Description

Allowed Values / Examples

headers

Array of HeaderField

All HTTP response header fields as an array of HeaderField classes containing name/value pairs.

httpCode

Integer

The resulting HTTP status code. If not set explicitly using this object, the service returns 200 if no exception occurred, or 500 otherwise.

404

responseObject

Any

Response Object of the REST adapter call if the endpoint returns one (response output parameter).

Request and Response Types

REST Type

Attribute

Type

Description

Allowed Values / Examples

Authentication

username

String

Specify a username.

password

String

Specify a password.

Certificate

file

String

Provide name of a certificate file.

type

String

Specify the type of the certificate file.

One of PEM or DER.

ComposerOptions

jsonKeepNulls

Boolean

Specify the handling of NULL values.

true

Keep NULL values during JSON composing.

false

Do not serialize NULL values during JSON composing.

jsonCompact

Boolean

Specify the generated JSON format.

true

Serialize to JSON without pretty-printing.

false

Produce a pretty JSON.

jsonWriteTypeDiscriminator

Boolean

Specify whether to write type information to the generated JSON.

true

Write a type discriminator to the generated JSON.

false

Do not write a type discriminator to the generated JSON.

Entry

key

String

Specify the key of a map entry.

value

Array of Any

Provide a list of values of the map entry. The dynamic type for httpHeaderMap is String.

HeaderField

name

String

Specify the name of the header field.

value

String

Provide a header value.

Key

file

String

Specify the name of the file that contains the private key.

type

String

Specify the type of the private key.

password

String

Specify the password for the private key.

Option

name

String

Specify the name of the cURL option.

value

String

Provide a value.

Parameter

name

String

Specify the name of the parameter.

value

String

Provide a value.

Proxy

url

String

Specify a URL to the proxy server.

A valid URL.

type

String

Specify a proxy type

HTTP

The proxy is a HTTP proxy.

SOCKS5

The proxy is a SOCKS5 proxy.

authentication

Authentication

See above.

SSL

verifyPeer

String

Specify whether to verify the peer information from the SSL connection.

true

Verify the peer information (default).

false

Do not verify the peer information.

verifyHost

String

Specify whether to verify the host information from the SSL connection.

On

Verify the host information (default).

Off

Do not verify the host information.

Existence

Only check for existence of the host.

caInfo

String

Specify the name of the file that contains additional certificates for the connection verification.

certificate

Certificate

Specify the certificate information (see above).

key

Key

Specify the private key information (see above).

Related Content

Related Pages:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.