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?
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?
Hi,
do you mean like this?
Best
Lukas
Actually I would need the python method
hi Intrawelt Flow Handler , 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:
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 Lukas Ley x awesome support
Patrick Andrew Hartnett | Developer Experience | Team Lead | RWS Group