Getting information about job changes

I've been browsing REST API documentation (https://docs.rws.com/860026/488114/worldserver-11-7-developer-documentation) and I can't understand the workflow for the following use case:
1) We create job in Worldserver and upload files to be translated

2) When they are translated we need to get the translated files

I have a number of questions:

1) When we create project group we receive projectGroupId back. But I don't see how can I get projects with this projectGroupId without quering all active projects and checking their projectGroupId

2) Is there a way to see that project was updated? Maybe some kind of notification/webhooks. Or do we need to load all projects information on timer? Especially important for redeliveries, when project was completed, but translated files get updated at a later date.

Thank you for your help.

  • Anton,

    In response to your first question, you should be able to get all projects for a project group using the GET /projectGroups/{id} endpoint (https://docs.rws.com/860026/717771/worldserver-11-7-developer-documentation/get-information-about-a-specific-project-group). The returned JSON will include a list of projects that are in the project group.

    -Joseph

  • Thank you. Unfortunately the documentation doesn't show that response will contain list of projects and what data will be provided for projects. Do you know if there is a more complete version of documentation?

  • The second question is very critical for our development, and I wasn't able to find anything in documentation. Would appreciate any help to understand how do the redeliveries of a project work, how can we know if a project has new content?

  • Hi,

    If you are trying to get projects in the created project group, you do not have to go through all the active projects since you already have the ID of the project group.

    You can call /ws-api/v2/projectGroups/{projectGroupId} and can get a list of projects in the project group. 

    Here is a CURL sample. 

    curl -L -X GET 'http://somewhere/ws-api/v2/projectGroups/12377?token=2042069157' \
    -H 'Content-Type: application/json' \
    --data-raw ''
    And the response contains the list of the projects like below.
    ...
        "projects": [
            {
                "id": 7705,
                "projectGroupId": 12377,
                "name": "My TEST",
                "description": "",
                "targetLocale": {
                    "id": 1026,
                    "name": "Japanese",
                    "displayName": "Japanese",
                    "languageName": "Japanese",
                    "encoding": "UTF8"
                },
                "sourceLocale": {
                    "id": 2109,
                    "name": "English (United States)",
                    "displayName": "English (United States)",
                    "languageName": "English (United States)",
                    "encoding": "UTF8"
                },
                "tasks": [
                    {
                        "id": 101402,
    ...
    If you do not filter anything, the response can be too large. You can add a filter query parameter like, &fields=projects(id)So you will get the list of project IDs for the project group only. 
     
    Once you can get an ID of a project, you can call /ws-api/v2/projects/{projectId} for more details about the project.
    By the way, you can find another REST API document in your WorldServer as well. 
    ~/ws-api/docs/ws-api-doc-v2.html
    Best,
    Taiki
  • For the second question, the typical approach to detect a project's progress is to call the WorldServer's REST API on a regular frequency like once an hour. Therefore, it is one-way communication from external to WorldServer. 

    If you do not want to keep sending queries, maybe you can develop an automatic action and place it in a workflow to call any endpoint in an external system to tell the workflow progress. Therefore, it is also one-way communication from WorldServer to external. 

    However, the situation you mentioned, "when project was completed, but translated files get updated at a later date", I think it cannot occur. Once a project is completed and all the tasks in the project are finished, users cannot interact with the tasks and cannot change the translations via UI.