How to update the STAGE of a project via the Trados API

Hello, i need to update the stage of a Trados project via the API. However, I do not find anything on the official documentation. With stages I mean how can I pass from the "Preprocessing" stage to the "Translation" stage. Can you help me? Slight smile

Parents Reply Children
  • hi  , The Trados API’s public documentation and most code samples are focused on .NET languages (such as C#). However, the API itself is REST-based, meaning you can interact with it from any language, including Python, by making standard HTTP requests.

    For updating the phase/stage of a project or file:

    • The API endpoint you found via Swagger UI is correct, that’s the one you’ll use to transition a project/file to a new phase (e.g., from “Preprocessing” to “Translation”).
    • While our documentation does not currently provide explicit Python code samples, the general approach is as follows:

    import requests
    
    url = "https://your-groupshare-server/api/project-server/projects/{projectId}/files/{fileId}/phase"
    headers = {
        "Authorization": "Bearer <your-access-token>",
        "Content-Type": "application/json"
    }
    payload = {
        "phaseId": "<desired-phase-id>"
    }
    
    response = requests.put(url, headers=headers, json=payload)
    print(response.status_code, response.text)

    You’ll need to fill in your project/file IDs, target phase ID, and authorization token.

    Tip: If you’re struggling to translate C# code to Python for API calls, you can use AI models (such as ChatGPT or Copilot) to quickly generate Python equivalents. Paste the .NET sample and ask for a Python version to accelerate your development.

    thx  x awesome support

    Patrick Andrew Hartnett | Developer Experience | Team Lead | RWS Group