Pricing 
API Pricing

Try For Free Now

Dark

Light

FILE TRANSLATION
File Translation All Result
Get results of all the translated file. File Translation can only be processed by T-4OO or T-3MT engine.
Endpoint
Request details
GET
https://translate.rozetta-api.io/api/v1/translate-result/all
Header
Header
Description
accessKey, nonce, signature
Please refer to the authentication section.
Request Sample
curl -H "nonce: Your Nonce" -H "accessKey: Your Access Key" -H "signature: Your Signature" https://translate.rozetta-api.io/api/v1/translate-result/all
Response
Key
Description
status
When a request succeeds, the status will be "success", otherwise it will be "failure". ※Even only one paragraph is failed to translate, the entire request will be failed.
data
Array of objects with properties as below. Properties are shown below. "translateItemId": use it to download the translated files. "lang": the language detected for the original file. "wordCount": how many words(T-4OO) or characters(T-3MT) you used in the translation. "detectedLang": the language detected for the original file. "done": the file translation is completed or not."true" means completed while "false" means not. "originalName": the original name of the file you uploaded. "downloaded": the downloading is completed or not. "true" means completed while "false" means not. "error": a boolean, whether there is an error occurred or not. "errorCode" : the error code if there is an error. You can check its meaning in the Error Code page. With "errorMessage" you can check the error message. "id" is numeric id. "t4ooAuthFailed" : it will be true if you are using your T-4OO account to translate and encounterd an authentication problem.

api/v1/translate-result/all
Get results of all the translated files.
JavaScript
C#
const superagent = require('superagent');
const config = require('./config');

const authUtils = require('./utils/auth-utils');

const translateId = 'your translateId';
const url = `/api/v1/translate-result/all`;

const sendRequest = (serverConfig, accessKey, secretKey) => {
  const nonce = new Date().getTime().toString();
  const signature = authUtils.generateSignature(
    url,
    secretKey,
    nonce,
  );

  superagent.get(`${serverConfig.protocol}//${serverConfig.hostname}:${serverConfig.port}${url}`)
    .set({
      accessKey,
      signature,
      nonce,
    }).end((req, resp) => {
      console.log(resp.text);
    });
};

const main = async () => {
  try {
    await sendRequest(
      config.serverConfig,
      config.authConfig.accessKey,
      config.authConfig.secretKey,
    );
  } catch (error) {
    console.error(error);
  }
};

main();
About the authentication, please refer to the authentication section.
You can get a full version of sample codes here
©️ 2019 Rozetta API  ・  Powered by Rozetta

Rozetta Corp.

^