Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ResolveMode is used to determine if content in API call should be used or the data in the web viewer.

Resolve mode

Meaning

0

Prioritize text from the API response. Fallbacks to text from web viewer  (e.g. if the part exists in the site, take name from there)

1

Prioritize text from the web viewer. Fallbacks to text form API response.

2

Only take text from API response. No fallback.

3

Only take text from web viewer. No fallback.

Priority order is as below.

Priority

Tag

Comment

1

PersistentIdentity

PersistentIdentity of a text. Leave as null if not used.

2

Key

A key text from custom-texts.config or application. Leave as null if not used.

3

Value

A simple text.

4

Id

Database Id of a text. Leave as null if not used.

HtmlMessage

Used as return message in several calls and content will be shown to user.

Code Block
languagejson
"HtmlMessage":{
  "ResolveMode":1, // To override messages in WebViewer, eg for overriding a part name. 
  "Value":null, // Message which will be shown to user in simple text
  "Key":null, // Key for a predefined text in WebViewer
  "Id":null, // Techical id for a predefined text in WebViewer
  "PersistentIdentity":null, // Persistent id for a predefined text in WebViewer
  "Translations":null, // A list of translations of the message
  "HtmlEncode":false // Message as html snippet if formatting needed
}

...

REST providers have a set of general attributes.

Attribute

Usage

Default

Options

trace-folder

Location where trace logs are written on disk

C:\Temp\RESTLog

File path

create-every-day-log-directory

Trace logs are placed in a new folder each day, named with current date.

true

true / false

delete-old-trace-log-after-number-of-folder

Trace logs will be automatically removed. Each date is stored in a separate folder and when X folders exist the oldest gets deleted. Only works if create-every-day-log-directory is true.

30

int

url

Service end point

url

media-type

The accepted media type set in the request header.

application/json

culture

Force sets the culture (e.g. en-GB) parameter for requests. When not set, culture parameter of request is set using the display culture for user.

timeout

Sets the timeout (in seconds) for the request

5 (up to version 5.0)

10 (from version 5.1)

int

user-id

Force sets the user id of the request.

text

user-name

Force sets the user name of the request.

text

authorization-scheme

Sets the authorization scheme for the request.

If any type of authentication credentials is set, the default scheme is Basic

authentication-credentials

Sets the authentication credentials for the request. If this is set, authentication-name and authentication-password is not used.

authentication-name

Sets the authentication credentials name for the request.

authentication-password

Sets the authentication credentials password for the request.

permissions

Set a list of permission candidates. Each permission in the list that the user have, is added to the request.

From version 5.0 and later.

permissions-groups

Set a list of permission groups candidates. Each permission group in the list that the user have, is added to the request.

From version 5.0 and later.

Example

Code Block
languagexml
<PlaceOrderProvider>
  <RESTPlaceOrderProvider delete-old-trace-log-after-number-of-folder="30" trace-folder="D:\Temp\Trace-logs\" url="https://host/API/"
  permissions="internal,partner" permission-groups="exclusive" timeout="15"/>
</PlaceOrderProvider>

...