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:
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.
Click here to view the source code