Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This page broadly describes the methods you would use to:

  • Find project or create new project

  • Send files for translation into a project

  • Poll for the completion of workflows / jobs

  • Optional creation of translated files (if not down by the translation team or automation)

  • Download translated files

Authenticate

Start with authentication. You need the API 1 end point, see here.

For the authentication method see Connect using GET

curl --location '{{API1URL}}/api/connect?account={{PLATFORMID}}&pwd={{API1PWD}}&json=true'
  • {{API1URL}} : For example: https://api.eu.wordbee-translator.com:32570

  • {{PLATFORMID}} : Typically your company name. It also shows in the URL when you login to your Wordbee Translator platform.

  • {{API1PWD}} : Your API 1 password.

The method returns the token that you need to include in all subsequent API calls.

Find project by reference

Typically, you would create a new project in your Wordbee platform and then send content to this project for translation.

Each project is assigned a unique number and you need to find this number by our project’s reference. Below we search for the project named “My Project 1”:

curl --location '{{API1URL}}/projects?token={{token}}&from=0&count=10&reference=My Project 1'

For more details see List or find projects . You can filter by most of the project properties.

The method returns a JSON array with your project. The project ID is named ProjectId.

To find projects created after a specific date you can use:

curl --location '{{API1URL}}/projects?token=e85e7ab94cdb4c95b8329ba5e7ceab00&filter=CreationDate%3EDateTime(2023%2C%2004%2C%2025)'

Create a new project

You can also create a new project using Create project . It is recommended to create a project as a “clone” of a template project.

Let’s say you created a reference project named “My template” with all the workflows and memories you need. First find the project ID using the method explained above.

Then create a new project using:

curl --location --request POST '{{API1URL}}/projects?token=e85e7ab94cdb4c95b8329ba5e7ceab00&projecttype=1&templateprojectid=5938&reference=My new project'

Upload a file to translate

Now we have a project with its project ID. We also note down the project’s source and target languages. Now we are ready to send a file into this project.

We use this method: Upload new document or new document version . It does basically everything: It uploads our file, it marks the file for translation, it does the word count, it creates jobs and can even assign workers.

Below we upload a web page named “content103.html”. We set the source language to “en” and expect translations into “fr” and “es”. The workflow shall be the project default workflow.

curl --location --request PUT '{{API1URL}}/projects/5938/documents/codytdocument2?token=e85e7ab94cdb4c95b8329ba5e7ceab00&name=content103.html&sourcelocale=en&targetlocales=fr%2C%20de&parserdomain=HTML&workflow=ProjectDefault' \
--header 'Content-Type: application/octet-stream' \
--data '@/C:/My files/content103.html'

Note: URL parameters should always be URL encoded, replace blanks by %20 etc.

In Postman the parameters are shown as:

The headers are:

And the actual file is attached as follows:

Review in Wordbee Translator

Your file will show up in the documents in the project:

Our test project defines a very simple workflow comprising a single Translation step. Hence we will see 2 jobs: One for French and one for Spanish:

You specify in the project’s workflow profile whether jobs shall be automatically assigned to groups of suppliers. You also specify if multiple workflow steps shall be created (such as Translation + Revision).

Note that in our screenshot above, the French translator already finished the work. So, we should be able to fetch the French translation but not yet the Spanish one.

FInd completed workflows

  • No labels