Get configurations

Retrieve the values of various project configurations.

For security reasons, you need to perform a Login action before making any other public calls to the WorldServer API. The sessionId in the response is your session token. Use this token in all the other calls that you make.

Also, make sure that you have the appropriate user type permissions to perform this API call. To view or update your permissions, in WorldServer, go to Management > User Setup > User Types, and then select your user type.

API call

<protocol>://<ws-host>:<ws-port>/ws-api/v1/config?token=<sessionId>

Details

  • GET method
  • Content-Type in the header: application/json
  • Mandatory parameter: the session token (as a query string parameter or as a key-value pair in the header)

Available filters

You can add the filters as query string parameters or as key-value pairs in the header:
FilterDescription
fields=<fieldName1,fieldName2,…,fieldNameN>The names of the fields to be included in the JSON response, separated by commas.
keys=<keys>The approved configurations to get the values of configuration properties. Configuration keys are exposed by editing the api_exposed_configs property in the general.properties file.

The pre-approved keys are: api_exposed_configs, max_upload_size_mb, project.name.illegalcharacters, response_items_limit, enable_live_translation_memory, WsxzFormat, XlzFormat, TradosTtxFormat, BilingualDocxFormat, XliffFormat, RegulatorBundleFormat, ws.api.version, min.version, max.version, ws.version, database, and task_priority_bands.

Examples:
  • <protocol>://<ws-host>:<ws-port>/ws-api/v1/config?token=<sessionId>&fields=liveTranslationMemory,illegalUploadExtensions
  • <protocol>://<ws-host>:<ws-port>/ws-api/v1/config?token=<sessionId>&fields=maxUploadSize&keys=api_exposed_configs,max_upload_size_mb

Response

A screen shot that shows a typical response to this call.

Error messages

No session token provided or invalid token (401 Unauthorized)