Breadcrumbs

REST Service Reference


Tagged Values


<<E2ERESTService>>

Stereotype <<E2ERESTService>> is used in the component diagram to mark a service as REST service.

Error rendering macro 'multiexcerpt' : Page loading failed


<<E2ERESTPortType>>

Stereotype <<E2ERESTPortType>> is used on a class to mark it as REST port type, the root element of a REST service structure.

Error rendering macro 'multiexcerpt' : Page loading failed

For more information on REST error classes, see REST Service Reference#<<RESTError>>.


<<RESTResource>>

Stereotype <<RESTResource>> is used on a class to mark it as REST resource, part of a REST service structure.

Error rendering macro 'multiexcerpt' : Page loading failed


<<REST>>

Stereotype <<REST>> is used on a <<RESTResource>> class method to mark it as REST method, part of a REST service structure.

Error rendering macro 'multiexcerpt' : Page loading failed

If the method name is one of GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS (with optional trailing '/'), it will be invoked automatically on its parent resource when an corresponding request is received.


Refer Implementing REST Methods to for more details and some examples.

Error rendering macro 'multiexcerpt' : Page loading failed


<<RESTParameter>>

Stereotype <<RESTParameter>> is used on a <<REST>> method parameter to mark it as REST parameter. Refer to REST Parameters to for more details and some examples.

Error rendering macro 'multiexcerpt' : Page loading failed


<<RESTOperationTag>>

With <<RESTOperationTag>> you can group your REST methods. Refer to Tagging REST Operations for more details.

Error rendering macro 'multiexcerpt' : Page loading failed


<<RESTError>>


Error rendering macro 'multiexcerpt' : Page loading failed


<<RESTResponseDefinition>>


Error rendering macro 'multiexcerpt' : Page loading failed



<<RESTAlias>>


Attribute

Description

Allowed Values

Additional Headers


(additionalHeaders)

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

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

Base Path


(basePath)

Specify here the base path of the REST service.

a valid path, e.g./support

Protocol


(protocol)

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

http, https

Ignore Http Errors


(ignoreHttpErrors)

Specify here whether you want the REST adapter to throw an exception upon receiving an HTTP error code >= 400.
For older models, if this flag is not present, it will be considered false.

ignoreHttpErrors can be overridden via the request options (see Setting REST Request Options).

true (default)

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

false

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

Host


(host)

Specify here the host running the REST service.

a valid host

Port


(port)

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

a valid port

Follow Redirects


(followRedirects)

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

any integer

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 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


Json Keep Nulls


(jsonKeepNulls)

When jsonKeepNulls is true, attributes of the REST parameter having NULL values will be provided with the REST call, 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


(jsonCompact)

When jsonCompact is true, the JSON composer will generate compact JSON, otherwise it will generate pretty JSON. jsonCompact defaults to true - also on re-compile of an older model with Builder as of 7.0.0-beta3.

true

Generate compact JSON (default).

false

Generate pretty JSON.

Request Http Header Roles


(requestHttpHeaderRoles)

Builder 7.12.0 Runtime 2020.12 In the context of HTTP based adapters (URL, REST, SOAP), 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.

requestHttpHeaderRolescan 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).
Refer to HTTP Header Support > Overwriting the Standard HTTP Headers for more details on header roles.

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)


Error rendering macro 'multiexcerpt' : Page loading failed


None

No header generated.

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.

User


(user)

Specify credentials here, if the called REST service needs basic authentication. Other authentication algorithms have to be implemented manually via HTTP headers (see additionalHeaders and Setting REST Request Options).

Valid format is <user>/<password>, e.g. e2e/e2e

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

Proxy Type


(proxyType)

Specify the proxy type.

See CURLOPT_PROXYTYPE.

Proxy URL


(proxyURL)

Specify the URL of the proxy server.

See CURLOPT_PROXY.

Proxy User


(proxyUser)

Specify the proxy credentials.

See CURLOPT_PROXYUSERPWD, valid format is <user>/<password>, e.g. e2e/e2e

SSL Settings (if the called REST service uses SSL)

Ssl CA Info


(sslCAInfo)

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

See CURLOPT_CAINFO.

Ssl Certificate File


(sslCertificateFile)

Specify a fle name containing the client certificate.

See CURLOPT_SSLCERT.

Ssl Certificate Type


(sslCertificateType)

Specify the type of the certificate.

See CURLOPT_SSLCERTTYPE.

Ssl Private Key File


(sslPrivateKeyFile)

Specify a file name containing the private key.

See CURLOPT_SSLKEY.

Ssl Private Key Password


(sslPrivateKeyPassword)

Specify the password for the private key.

See CURLOPT_KEYPASSWD.

Ssl Private Key Type


(sslPrivateKeyType)

Specify the type of the key.

See CURLOPT_SSLKEYTYPE.

Ssl Verify Host


(sslVerifyHost)

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

See CURLOPT_SSL_VERIFYHOST.

Ssl Verify Peer


(sslVerifyPeer)

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

See CURLOPT_SSL_VERIFYPEER.


REST Content Types

The Bridge handles content types as follows:


  • If the Content-Type header is set, the Bridge will assume that the request is of that type. All other request will be rejected (HTTP error code 406).

  • If no Content-Type header is set, but the Accept header is, the Bridge will deduce the request type from it. All other request will be rejected (HTTP error code 406).
    To determine the format, the Bridge will take into account the quality factor and the order of the accept headers list.

  • In absence of both headers, the Bridge will assume JSON. All other request will be rejected (HTTP error code 415).

The full matching is done in a "best effort" manner. Given the type format <type>/<subtype>[+<suffix>][; paramName=paramValue]*, the Bridge first disregards the type and parameters. Then it checks, if the subtype is JSON or XML. If the subtype doesn't match with the supported types, it tries the suffix.


REST 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.

response

Any

out

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


REST Utility Functions


There were errors rendering macro:

  • An unknown error occurred.


REST Parameter Types


There were errors rendering macro:

  • An unknown error occurred.



Related Pages: