Prerequisites
Download and install Postman tool from official website, found here.
Download Collection
A Postman collection is available for download, covering the Language Weaver API.
The archive contains the following two files: one corresponding the collection of API requests and one corresponding to the list of environment variables that are used in the API collection.
The API Collection contains the following folders:
- Authentication - requests for obtaining a token that is used in subsequent requests
- Subscriptions Info
- User Self - this needs to be executed when user authentication is used
- API Credentials Self - this needs to be executed when api credentials authentication is used
- Language Pairs - retrieves the list of Language Pairs that are part of the caller's account
- Translations - requests for performing file and text translations
- Language Identification - requests for performing file and text language identification
See API documentation for more details regarding the Language Weaver API.
Import Collection
The downloaded file must be unzipped and within the Postman workspace press the Import button:
From the popup, select File, followed by Upload Files. Next, the previously extracted files must be uploaded and imported:
The imported collection is now displayed in the Collections tab:
Next, the LW Variables needs to be selected as default environment: By selecting the Environment quick look option, the list of variables that are part of LW Variables are displayed. These are used for performing the API requests.
From the Environment quick look, the LW Variables can be edited in order to add the required authentication information:
Depending on the used authentication method, the following information must be added:
For user authentication: userEmail and password.
For client credentials authentication: clientId and clientSecret.
Having all these, from the Collection, a token can now be generated that will be used in the API requests. This can be done by performing one of the listed API requests: Token Request with API Credentials or Token Request with User Credentials, found under Authentication folder:
Note
The token has a validity of 24 hours, and it needs to be generated again before performing other API requests.
Everything should be in place now for performing the needed requests.
We want to hear from you!
We want to hear how we can make the collection better! Please don't hesitate to contact us for any encountered issue or for any suggestions that you may have.