Pricing 
API Pricing

Try For Free Now

Dark

Light

USER DICTIONARY
Delete all user dictionary entries
Delete all user dictionary entries.
User dictionary is only applied to T-4OO engine, Real-time. T-3MT engine.
Endpoint
Request details
DELETE
https://translate.rozetta-api.io/api/v1/dictionary/dictionary-all
Header
Header
Description
Content-Type
application/json
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" -H "Content-Type: application/json" -X DELETE https://translate.rozetta-api.io/api/v1/dictionary/dictionary-all
Response
Key
Description
status
For successfully adding of an entry, this field will be "success". For unsuccessful requests, this field will be "failure".
Limitation
Limitation
Only 3 or less words of User Dictionary can be applied in one sentence when using real-time translation engine. For example: "猫"→"Kitty" "犬"→"Marutaro" "ウサギ"→"Peter" "クマ"→"Teddy" When send request below ["これはです。それはです。ウサギクマも動物です。", "ウサギクマも可愛いです。"] The result will be like: ["This is Kitty. It is Marutaro. Both Peter and bears are animals.", "Both Peter and Teddy are cute."] ※For there are 3 user dictionaries:「猫」、「犬」、「ウサギ」are applied in first sentence, 「クマ」 will not be applied.

api/v1/dictionary/dictionary-all
Delete all user dictionary entries.
JavaScript
const superagent = require('superagent');
const crypto = require('crypto');

const serverConfig = {
    protocol: 'https:',
    hostname: 'translate.rozetta-api.io',
    port: 443
};

const authConfig = {
    accessKey: 'ACCESS_KEY',
    secretKey: 'SECRET_KEY',
    nonce: Date.now().toString()
};

const sendRequest = (serverConfig, authConfig) => {
    const url = '/api/v1/dictionary/dictionary-all';
    const signature = authUtils.generateSignature(
     url,
     authConfig.secretKey,
     authConfig.nonce
   );

    const headers = {
        accessKey: authConfig.accessKey,
        signature,
        nonce: authConfig.nonce,
    };
    return superagent.delete(`${serverConfig.protocol}//${serverConfig.hostname}${url}`)
        .set(headers)
        .then((res) => {
            return res.body;
        }).catch((err) => {
            return err.message;
        });
};

const main = async () => {
    try {
        const response = await sendRequest(serverConfig, authConfig);
        console.log('Server response:');
        console.log(response);
    } 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.

^