Versions Compared

Key

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

Configure the plugin

Here is the list of configuration properties available for the WXM_RESTAPI plug-in:

  • raisePluginStatusToEngine

    Status
    title2022.1
    : if true (default), the plugin status impacts the server status

  • tempdir: directory to store temporary files (volatile files)

  • workdir: directory to store temporary files for long working process (

    Status
    title2021.5
    (warning) see important notice)

  • restApiDirPurgeNode: the name of the node (in clustered mode) where to run the restapi SAN directory purge (if the current node name is different thant the value of this parameter, the purge is not done)

  • linksection: configure hateoas section

    • REMOTE (default)

    • LOCAL

    • OUTBOUND

    • FULLOUTBOUND

    • NONE

    • a component URI (pluginname:classname)

  • connectionListener: connection listener URI (pluginname:classname)

  • configHotUpdate: Enables automatic reloading of an endpoint configuration file if it changes on the disk.

    This option is required in cluster mode, if you change the configuration via the API Designer. When saving a configuration, it is modified in the cache of the current node and the file storing the configurations is modified but the other nodes do not update their cache if this option is not enabled.

    Possible values are:

    • true: activates the reloading of the cache when the file is modified

    • false : does not take into account file changes until the plugin is restarted

    • auto: activates the reloading of the cache only if the server is not in production mode

  • configPluginName: the name of of plugin to store service configurations (by default the name of this plugin is WXM_RESTAPI_CONFIG)
    If the plugin doesn’t exist or is not activated, the configuration plugin is the REST API plugin (WXM_RESTAPI)
    See

    Jira Legacy
    serverSystem JIRA
    serverIdee2ae3e2-175d-3458-b663-57790c4fa118
    keyWXM-6082

  • applicationObject: name of object used to store application tokens (by default restapiapp)

  • deployDamServices: if true, automatically deploy DAM services

  • exposeImageServerPath: in the responses to API calls, for a property that indicates the path of a file in a property of type file or image, we expose the path of the file (relative to the SAN), otherwise we expose only the file name

  • defaultETag: define the default ETag (See ETags within the REST API end points )

  • Status
    title2021.5
    dynETag: disable supports of dynamic ETag

  • damEtag: activate (or deactivate) ETag for DAM Services

  • Status
    title20212022.56
    dynETag: disable supports of dynamic ETag etagContextProperties: This is the list (a JSON array) of surfer properties that are taken into account to calculate the context of a surfer. The default value is an array with the property used The default value is an array that contains the property used by the security module to manage rights (roles): it is essential to keep it to work with the role configuration application.

  • useTriggerForEtagNotifications: On non cluster plateforme use trigger to handle instance change notifications for dynamic ETag (if false, dynamic ETag will be handled by notification - not available yet - si do not change this value until the feature is available)

  • etagVersionValue: the value for version value (see https://crossmedia.atlassian.net/wiki/spaces/WD/pages/1390706689/ETags+within+the+REST+API+end+points#Version-ETag )

  • etagMaxAgeControl: allows the client (ie the browser to manage the MaxAge Cache Control)

  • aggAutoGenerationaggTreeCount: a json to configurate aggregates boolean (true by default) to enable the tree count option in the agregates calculation

  • aggAutoGeneration: a json to configurate aggregates autogeneration in non damobjects in DAM services

  • enableMassImportServices: activate mass upload/import services (true by default)

  • massImportItemObjectName: name of object to store tempory items to upload/import (default is massimportitem) 

  • massImportCreateWithJobOwner: if true (default), use job owner to create assets (or simulate). If false, use default job executor user

  • massImportRemoveItemAfterCreate: if true (default) remove item after asset creation while upload/import process

  • massImportSimuWithFaces: if true (default) compute and export faces in simulation

  • massImportJobConfig: json to configure thread pools for executing jobs (see https://crossmedia.atlassian.net/wiki/spaces/WD/pages/726237185/Mass+imports+uploads#Configuration-(plug-in) )

  • massImportSupportedFiles: intended for future use

  • massImportStoreCache 

    Status
    title2022.1
    : if true (default) save mass import simulation and cache (and related data, as valid, haserror, haswarning, and datachanges (for fulltext search on mass import items)

  • massImportAsyncStoreCache: true enable asynchronous saving of the mass import simulation cache

  • massImportEnableDataChanges 

    Status
    title2022.1
    : if true (default), information allowing fulltext search on mass import items is generated

  • massImportBlockingJobChangesQuery 

    Status
    title2022.1
    : boolean, default is true(since
    Status
    title2022.2
    ). If true activate long polling on job changes service

  • massImportBlockingJobChangesQueryTimeout

    Status
    title2022.1
    : long, timeout for long polling on job changes service

  •  massImportBlockingJobChangesQueryNotifyCondition

    Status
    title2022.1
    : string, the type of the type of event that releases the long polling. Possible values are:

    • always: when the worker has finished, even if the command has failed

    • anydone: (default since

      Status
      title2022.2
      ) when a command has been applied

    • alldone: when all commands have been applied

  • massImportSetChangesCompletionServiceEnabled 

    Status
    title2022.1
    : boolean, default is true(since
    Status
    title2022.2
    ). If it is true, the application of the commands of a job are applied to the items in an asynchronous system (if it is false, they are applied to the items one after the other). The setting of the asynchronous system is done by massImportJobConfig.

  • massImportJobOutstandingVirtual

    Status
    title2022.2
    : boolean, experimental, let this value to false.

  • massImportJobPurgeConfig

    Status
    title2022.2
    : json to configure the mass import job and items cleaning process (see https://crossmedia.atlassian.net/wiki/spaces/WD/pages/726237185/Mass+imports+uploads#massImportPurgeConfig)

  • asyncZipBinaryExpiringTimeout

    Status
    title2022.2
    : an integer (default is 120), the retention time in seconds of the progress of an asynchronous zip upload after it has finished processing.

  • asyncZipBinaryThreadPoolConfig

    Status
    title2022.2
    : json object, configuration of the thread pool for asynchronous zip upload
    This is a JSON object. This is the default configuration:

    Code Block
    languagejson
    {
      "threadCount":3,
      "queueSize": 100,
      "idleTime": 300
      "allowCoreThreadTimeOut": true
    }


    Here is the properties:

    • threadCount: the number of threads. You can use minThreadCount and maxThreadCount if you want to set a different minimum and maximum value.

    • queueSize: the size of the queue

    • idleTime: time (in seconds) before an idle thread is terminated

  • limitedChildren: if true (default), limits the number of children exported in DAM services

  • securedDamServices: if true (default), honors the security of the objectData domain in DAM services

  • securedAppSettingsServices

    Status
    title2022.2
    : if true (default), honors the security of the objectData domain in Application Settings services

  • canRetrieveCaption: if true (default is false), honors objectData/canRetrieveCaption for children in DAM services

  • checkSecurityCanViewEvenSimuCreateOrUpdate

    Status
    title2021.6
    : Starting with version
    Status
    title2021.6
    , objectdata/view security is disabled by default on the exposure of asset modification simulations in the context of mass import, to allow the implementation of facets. If the value of this parameter is set to true, then we return to the previous behavior (we can't see a result of a modification or creation simulation if the security refuses it, or crashes because the ID of an instance in creation simulation is 0).

  • damRelativeURLs: if true (default is false), exported URL are relatives (in DAM services responses)

  • authRelativeURLs: if true (default is false), exported URL are relatives (in auth services responses)

  • allowAccessIfActionDoesntExist: if true (false by default) do not check end point security if the corresponding action doesn’t exist

  • lazyDeployDamServices: if true, and not production mode, the configuration of dam services are automatically updated when the structures change

  • sessionAuth(obsolete): if true, allows authentication of invokation with the session surfer (avoid this because of XRSF attacks)

  • sessionAuth

    Status
    title11.18
    : default is false. If true, allows stateful surfer session surfer (shared with backoffice session)

  • allowSessionAuth

    Status
    title11.18
    : default is true. If true, allows api client to work as sessionAuth mode, on demand, while getting a token.

  • sessionAuthReconnectMode 

    Status
    title11.18
    : default is false. If true, during a sessionAuth authentication, the surfer is reconnected (re-execution of surferservices among others)

  • sessionAuthBODisconnect

    Status
    title11.18
    : default is false. If true, in sessionAuth mode, if we connect a new surfer, we force the disconnection of the surfer currently in session

  • sessionFul

    Status
    title2021.4
    : default is false. If true, we connect in sessionful (see API Authentication & Connection Modes )

  • WWWAuthenticateFallBack : default is false. In case there is no authentication information in the request, we return a 401 Unauthorized. If this parameter is true, the WWW-Authenticate header is included in the response.

  •  allowJWTCookieAuth: default is true. Allows to request a connection in cookie mode (request parameter cookieauth=true)

  • JWTCookieSameSite: default is Strict. Value of the SameSite attribute of the REST API cookies.

  • JWTCookieSameSiteLocal: no default. Value of the SameSite attribute of the REST API cookies in developpement mode. If no value is indicated, we use JWTCookieSameSite

  • JWTCookieShare

    Status
    title2021.4
    : default is false. If false attribute Path of API cookies is /api. If true, its /, thus, the cookie is transmitted for all urls including the BO, thus allowing to connect to the whole solution via the Portal. This is not useful in sessionful mode, because the session is shared between BO and API.

  • DXMDomain

    Status
    title2021.4
    : Value of the cookie attribute Domain (necessary for DXM access in the Portal), if you want to indicate a specific value different from the value automatically assigned if DXM is enabled.

  • JWTCookiePathDependsOnRequest: default is false. If true, the value of the Path attribute of the cookie is determined from the request that is doing the signin, otherwise it is determined from the system variables. This parameter is ignore if JWTCookieShare is true.

  • JWTCookieLongLife: Default is true. If true, the lifetime of the JWT cookie is the lifetime of the refresh token, otherwise it is the lifetime of the access token.

  • Status
    title2022.6
    csrfTokenControl: boolean, default is false, activates CSRF token checks in the API call when cookie is used for authentification

  • Status
    title2022.6
    csrfTokenControlExcludes: a white list (JSON Array) of IP for which the token control is disabled (event csrfTokenControl is true)

  • Status
    title2022.6
    csrfTokenControlExcludes_local: the same as csrfTokenControlExcludes, but for local use only (never included in backup)

  • oauth2Enabled: default is true. If true, allows to use the OAuth2 SSO authentication system provided by the API

  • ssoSAMLEnabled: default is true.If true, allows to use the SAML SSO authentication system provided by the engine 

  • ssoOAuth2Enabled: default is false. If true, allows to use the OAuth2 SSO authentication system provided by the engine 

  • tokenHash: A base for the hashing of JWT tokens signature

  • tokenCleaningPeriod: period of the task of cleaning expired tokens

  • tokenLongLifeTime: lifetime of long life JWT tokens (in seconds)

  • tokenShortLifeTime: lifetime of short life JWT tokens (in seconds)

  • tokenMaxAge: (optional) max age of JWT tokens (in seconds)

  • jwtAlgorithm: JWT tokens hash algorithm (HS256, HS384 or HS512)

  • errorSupport: configuration of error support in error message

    This is a JSon. You can configure default message for the client, or keys and parameters so that the customer can generate his own messages. The default value is:

    Code Block
    {"key":"WEDIA_ERROR_SUPPORT","params":["support@wedia-group.com"]}
    • string form

      if the value is a string, then this is the support message that will be presented

    • object form

      the object has two properties:

      • key: the key for the message

        • WEDIA_ERROR_SUPPORT

          A message presenting one value (the email of support service) and the Wedia name

        • EMAIL_ERROR_SUPPORT

          A altenative of WEDIA_ERROR_SUPPORT message without Wedia mention

      • params:

        Parameters for the message. Default messages has only one parameter:

        1. support email address

      • value: (optional) a default static message. If this property is omitted, one is generated with key and params from the REST API Plug-in bundle.

    • array form

      An array of several messages.

  • allowDebugInProduction: boolean. Allows to temporarily allow debug mode, even in production. Be careful to enable this option exceptionally to limit API vulnerabilities to certain attacks.

  • presetPrefix: prefix for preset (for automatic naming) exposed from Image Processing Configuration

  • defaultCharset: default charset for API request parameters and headers

  • defaultContentCharset: default charset for for API request and response body

  • docPortalWithHelpers

    Status
    title2021.5
    : default is false. If true, messages are displayed to help solve the errors. As this information is related to the internal functioning of the Wedia solution, it does not generally speak to external parties and is therefore not displayed by default.

  • apiDocSecure: default is true. If false, access to the API documentation is not secured (it is not necessary to authenticate to consult it).

Note

It is not recommended to put false on a server accessible on the web.

See API Documentation

  • apiDocRenderer: type of default HTML/CSS renderer for OAS3.0 documentation

  • apiDocLazyRendering

    Status
    title2021.6
    : if true, ReDoc's lazy rendering mode is enabled (supposed to improve its display speed)

  • apiDocCache: enable or not OAS3.0 file cache. When the cached file is generated, the documentation is always read from the file, so no configuration changes can be seen in the documentation.

    • ALWAYS: always cached

    • NEVER! never cached

    • ONLYPROD: cached only if production mode is activated

  • apiDocCacheClearOnRestart: boolean, true to delete the OAS3.0 cached files when the plug-in restarts

  • apiDocCacheGenOnRestart: boolean, default is true. If true, OAS files describing the API documentation are generated when the plugin starts. If false, OAS files describing the API documentation are generated when requested (if caching is enabled, when first requested). This can penalize the request, but will queue up other simultaneous requesters, or even reject them (in error) if the timeout is exceeded. It is therefore recommended to leave this value at true, except on development servers, when this documentation is not used, in order to preserve resources (disk space, memory, cpu).

  • apiDocInternalCache: boolean, default is true. If true, activates the internal cache during generation. Consumes more memory, but saves generation time. 

  • apiDocOasStream:

    Status
    title2022.1
    a json object to configure the download of an OAS3 file
    The default configuration provided should be fine in general. If you have problems with file loading times (especially large files), please contact Joël DRIGO before changing this configuration. See more details here.

  • apiDocInfoExcluded:

    Status
    title2022.1
    a json array to configure the list of information to be excluded from the REST API documentation. See more details here.

  • apiDocPortal:

    Status
    title2022.1
    a json object to configure the REST API documentation display (the rendering portal, not the user documentation portal). See more details here.

    • alwaysGenerateCacheForTagGroups:

      Status
      title2022.1
      a boolean, default is false. If true, the tag group cache is generated even version 1 of the documentation display is selected (these files are not used by the documentation portal version 1 but could be loaded (or displayed) directly via the dedicated URLs if wanted)

  • languageObject: default is restapilang. The object (structure) used to control the languages (by example lang). The structure of the object must be the same as the object lang.  If the value of this parameter is empty or corresponds to a non-existent object, the language control is disabled (a user who logs in with an unmanaged language will have the messages in the default language).

  • disableNotAcceptableLanguageException:default is false. if true, uses the first found locale instead of throwing a 406 Not Acceptable when no valid locale is found in a query (an invalid locale is a locale that is not defined in the language object, see parameter languageObject). If false, throws an error to the requester.

  • notAcceptableLanguageExceptionLocale: Locale by default if request locale is not acceptable (see parameters languageObject and disableNotAcceptableLanguageException). If no value set, use default indexation language.

  • checkResetPassword: default is true. If true, activates the test of the changepass property of the user at the connection. 

  • Anchor
    binaryUpdateAcceptedPaths
    binaryUpdateAcceptedPaths
    binaryUpdateAcceptedPaths: defines the paths accessible in the SAN for the assignment of files by path, to a field of type binary or image, during a creation or a modification. It is a JSON array of paths (relative to the SAN). By default, the file and image folders are allowed as file sources.

...

To create a separate configuration plugin (when the configuration is still in WXM_RESTAPI):

  1. create the plugin as usual (with a minimal config.xml)

  2. move the configuration from WXM_RESTAPI

  • files of WXM_RESTAPI/config to the config folder of this plugin
    configuration files are those that start with underscore and txt type

  • move also the resource configuration directories (those that start with underscore and end with _RSC)

...