In this article, I would like to present a method for completing an active Task Step in SDL WorldServer using the REST API.
The method takes three parameters:
wsBaseUrl
token
completeTaskStepRequestBody
The wsBaseUrl must be the <serverURL>:<portnumber> where your WorldServer instance is running.
The second parameter is a security token, which can be retrieved by using the SDL WorldServer REST API as explained here.
The third parameter is a CompleteTaskStepRequestBody object containing the data to support the task step completion. This includes the id (task id), the transitionId and an optional comment to set as metadata. The task id and transition id can be retrieved by invoking the REST call described here for retrieving the tasks from a specified Project. The returned TaskDetails object provides the data.
The method returns a boolean value specifying whether the task step completion was successful.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this article, I would like to present a method for downloading a
file (asset) associated with a Task in SDL WorldServer using the REST
API.
The method takes six parameters:
wsBaseUrl
token
taskId
assetName
downloadLocation
assetLocationType
The wsBaseUrl must be the <serverURL>:<portnumber> where your WorldServer instance is running.
The second parameter is a security token, which can be retrieved by using the SDL WorldServer REST API as explained here.
The third parameter is the id of the Task in SDL WorldServer to download the asset from.
The fourth parameter is the name of the asset to download. This can be retrieved by invoking the REST call described here for retrieving the tasks from a specified Project. The returned TaskDetails object provides the targetAsset attribute containing the path to the target asset. Use this path to work out the file (asset) name.
The firth parameter is the path to the download location where to place the downloaded file.
Finally the sixth parameter is used to determine the location type: SOURCE, TARGET or SOURCE_TARGET.
The method returns a String containing the path to the downloaded file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this article, I would like to present a method for retrieving a
list of Tasks from a Project in SDL WorldServer using the REST API.
The method takes three parameters:
wsBaseUrl
token
projectId
The wsBaseUrl must be the <serverURL>:<portnumber> where your WorldServer instance is running.
The second parameter is a security token, which can be retrieved by using the SDL WorldServer REST API as explained here.
The third parameter is the id of the Project in SDL WorldServer to retrieve the tasks from.
The method returns a List of TaskDetails objects, one for each task returned, containing a subset of the JSON response data.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this article, I would like to present a method for creating a Project Group in SDL WorldServer using the REST API.
The method takes three parameters:
wsBaseUrl
token
projectGroups
The wsBaseUrl must be the <serverURL>:<portnumber> where your WorldServer instance is running.
The second parameter is a security token, which can be retrieved by using the SDL WorldServer REST API as explained here.
The third parameter is a List of ProjectGroup objects, each one containing the data required for creating each Project Group in WorldServer. This includes the name, description, projectTypeId, clientId, the list of files for translation (systemFiles) and the list of Locales (target locales). The systemFiles attribute (List of String) must be populated with each asset's internalName returned by the file upload process described here.
The method returns a List of CreateProjectGroupResponse objects,
one for each project group created, containing the JSON response data.
With this data, it is possible to verify if the call was successful and
also retrieve the newly created project group id.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this article, I would like to present a method for uploading a collection of files to SDL WorldServer using the REST API.
The method takes three parameters:
wsBaseUrl
token
files
The wsBaseUrl must be the <serverURL>:<portnumber> where your WorldServer instance is running.
The second parameter is a security token, which can be retrieved by using the SDL WorldServer REST API as explained here.
The third parameter is a Collection of File objects for upload.
The method returns a List of FileUploadResponse objects, one
for each uploaded file, containing data from the uploaded asset. With
this information, it is possible to create Projects in WorldServer using
the REST API and place these assets through translation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this article, I would like to present a method for retrieving the
list of active Projects in SDL WorldServer using the REST API.
The method takes two parameters:
wsBaseUrl
token
The wsBaseUrl must be the <serverURL>:<portnumber> where your WorldServer instance is running.
The second parameter is a security token, which can be retrieved by using the SDL WorldServer REST API as explained here.
The method returns a List of Project objects, one for each active project, containing a subset of the JSON response data.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It is now possible to connect to SDL WorldServer and perform a number of actions by using the WorldServer REST API. The REST API documentation is available from your WorldServer instance by accessing <serverURL>:<portnumber>/ws-api/docs/ws-api-doc-v1.html.
In this article I present a method for connecting to SDL WorldServer
and fetching a security token to be used in all subsequent API calls.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The wsBaseUrl must be the <serverURL>:<portnumber> where
your WorldServer instance is running. The login method will append
the "/ws-api/v1/login" path required for invoking the REST based login
call.
As mentioned earlier, the call returns a security token to be used in all subsequent API calls.