Create Project Groups in SDL WorldServer using the REST API

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:

  1. wsBaseUrl
  2. token
  3. 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.

Click here to view the source code

Parents
  • Hi Philip,

    I am Ina Song, I am a user of SDL WorldServer with version 11.3. Now we are working on the integration with WS REST APIs, It's great to see your sharing here. So could you please demo how to use aisFiles when creating a project group by REST API? I tried but I am not quite understanding about how to use the field "aisFiles" in this API.

    Looking forward to your reply.

  • Hi Ina,

    The file upload process (using the /files REST call) precedes the Project Group creation step as explained in the articles. In my experience, it is not required to use the "aisFiles" parameter, but only the "systemFiles". This results in the uploaded files being placed inside the Project's language source folder in AIS as usual.

    I hope this helps.

Comment
  • Hi Ina,

    The file upload process (using the /files REST call) precedes the Project Group creation step as explained in the articles. In my experience, it is not required to use the "aisFiles" parameter, but only the "systemFiles". This results in the uploaded files being placed inside the Project's language source folder in AIS as usual.

    I hope this helps.

Children
  • Thanks Philip for the detailed answer, but we have some big volume products, it would be not very efficient to upload dozens/hundreds of files one time. We used the AIS mode before, so we see the "aisFiles" field in REST API but no more examples, so that's why we investigate this "aisFiles" field. Could you share your comments here for how to handle big volume products