ThoughtSpot Manual Translation API

The Manual Translation API from ThoughtSpot — 4 operation(s) for manual translation.

Documentation

Specifications

Other Resources

OpenAPI Specification

thoughtspot-manual-translation-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: ThoughtSpot Public REST 10.1.0.cl Manual Translation API
  version: '2.0'
servers:
- url: '{base-url}'
  variables:
    base-url:
      default: https://localhost:443
security:
- bearerAuth: []
tags:
- name: Manual Translation
paths:
  /api/rest/2.0/localizations/manual-translation/delete:
    post:
      operationId: deleteManualTranslations
      description: '

        Delete manual translations. <br/>  <span class="since-beta-tag">Version: 26.7.0.cl or later</span>


        Deletes all manual translations for the org.


        Requires `ADMINISTRATION` (**Can administer ThoughtSpot**), `ORG_ADMINISTRATION` (**Can administer Org**), or `APPLICATION_ADMINISTRATION` (**Can administer application**) privilege.


        #### Usage guidelines


        - This deletes **all** translation entries for the targeted org. The operation cannot be undone.

        - Defaults to `ORG` scope if not specified.

        - Set `scope` to `CLUSTER` to delete translations uploaded in the All-Org context.





        #### Endpoint URL

        '
      tags:
      - Manual Translation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteManualTranslationsRequest'
        required: true
      parameters: []
      responses:
        '204':
          description: Successfully deleted manual translations.
        '400':
          description: Operation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Operation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/rest/2.0/localizations/manual-translation/export:
    post:
      operationId: exportManualTranslations
      description: '

        Export manual translations as a CSV file. <br/>  <span class="since-beta-tag">Version: 26.7.0.cl or later</span>


        Downloads all manual translations for the org as a CSV file.


        Requires `ADMINISTRATION` (**Can administer ThoughtSpot**), `ORG_ADMINISTRATION` (**Can administer Org**), or `APPLICATION_ADMINISTRATION` (**Can administer application**) privilege.


        #### Usage guidelines


        - The response is a CSV file with columns: `content`, `locale`, `translated-content`.

        - Defaults to `ORG` scope if not specified.

        - Set `scope` to `CLUSTER` to export translations from the All-Org context.

        - Returns a `404` error if no translations exist for the targeted org or cluster scope.





        #### Endpoint URL

        '
      tags:
      - Manual Translation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportManualTranslationsRequest'
        required: true
      parameters: []
      responses:
        '200':
          description: CSV file downloaded successfully.
          content:
            application/octet-stream: {}
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No translations file found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/rest/2.0/localizations/manual-translation/locales/{locale}/export:
    post:
      operationId: getManualTranslationBundle
      description: '

        Get translations bundle for a locale. <br/>  <span class="since-beta-tag">Version: 26.7.0.cl or later</span>


        Retrieves all translations for a specific locale as a JSON map.


        Available to all authenticated users. No additional privileges are required.


        #### Usage guidelines


        - `locale` parameter must be a hyphenated locale code (for example, `fr-fr`, `de-de`, `JA-JP`).

        - Returns a JSON object with a `translations` map where each key is the original string and each value is the translated string.

        - If the org has no translations for the requested locale, the endpoint falls back to cluster-level translations.

        - Returns an empty `translations` map (not an error) if no entries exist at either level.





        #### Endpoint URL

        '
      tags:
      - Manual Translation
      parameters:
      - in: path
        name: locale
        required: true
        schema:
          type: string
        description: Locale code for which to retrieve translations.  For example, `fr-fr`, `de-de`, `JA-JP`.
      responses:
        '200':
          description: Translation bundle retrieved successfully.
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No translations found for the requested locale.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/rest/2.0/localizations/manual-translation/import:
    post:
      operationId: importManualTranslations
      description: '

        Import manual translations from a CSV file. <br/>  <span class="since-beta-tag">Version: 26.7.0.cl or later</span>


        Uploads a CSV file containing manual translations and upserts them into the database.


        Requires `ADMINISTRATION` (**Can administer ThoughtSpot**), `ORG_ADMINISTRATION` (**Can administer Org**), or `APPLICATION_ADMINISTRATION` (**Can administer application**) privilege.


        #### Usage guidelines


        - The CSV file must have exactly three columns in this order: `content`, `locale`, `translated-content`.

        - Maximum file size: **30 MB**. Maximum rows: **10,000**.

        - Only `.csv` files are accepted.

        - The import performs an **upsert**: existing entries matched by `(org_id, locale, content)` are updated; new entries are inserted. Entries not in the upload are left untouched.

        - Set `scope` to `CLUSTER` to upload translations to the All-Org context. Cluster-level translations act as defaults for orgs that have no translations for a locale.





        #### Endpoint URL

        '
      tags:
      - Manual Translation
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                translations_file:
                  description: 'CSV file containing translations. The file must have three columns:

                    `content`, `locale`, `translated-content`. Max file size: 30 MB.

                    Max rows: 10,000.'
                  type: string
                  format: binary
                scope:
                  description: 'Org scope for the import. `ORG` (default) targets the calling

                    user''s current org. `CLUSTER` targets the All-Org context.'
                  default: ORG
                  type: string
                  enum:
                  - ORG
                  - CLUSTER
              required:
              - translations_file
        required: true
      parameters: []
      responses:
        '204':
          description: Successfully imported manual translations.
        '400':
          description: Operation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Operation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ExportManualTranslationsRequest:
      type: object
      properties:
        scope:
          description: 'Org scope for the export. `ORG` (default) targets the calling

            user''s current org. `CLUSTER` targets the All-Org context.'
          default: ORG
          type: string
          enum:
          - ORG
          - CLUSTER
    DeleteManualTranslationsRequest:
      type: object
      properties:
        scope:
          description: 'Org scope for the delete. `ORG` (default) targets the calling

            user''s current org. `CLUSTER` targets the All-Org context.'
          default: ORG
          type: string
          enum:
          - ORG
          - CLUSTER
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
x-roles:
- name: 26.2.0.cl
  id: 26.2.0.cl
  tags:
  - 26.2.0.cl
  description: Roles for version 26.2.0.cl
- name: 10.4.0.cl
  id: 10.4.0.cl
  tags:
  - 10.4.0.cl
  description: Roles for version 10.4.0.cl
- name: 26.7.0.cl
  id: 26.7.0.cl
  tags:
  - 26.7.0.cl
  description: Roles for version 26.7.0.cl
- name: 26.8.0.cl
  id: 26.8.0.cl
  tags:
  - 26.8.0.cl
  description: Roles for version 26.8.0.cl
- name: 26.6.0.cl
  id: 26.6.0.cl
  tags:
  - 26.6.0.cl
  description: Roles for version 26.6.0.cl
- name: 10.15.0.cl
  id: 10.15.0.cl
  tags:
  - 10.15.0.cl
  description: Roles for version 10.15.0.cl
- name: 10.13.0.cl
  id: 10.13.0.cl
  tags:
  - 10.13.0.cl
  description: Roles for version 10.13.0.cl
- name: 26.9.0.cl
  id: 26.9.0.cl
  tags:
  - 26.9.0.cl
  description: Roles for version 26.9.0.cl
- name: 10.7.0.cl
  id: 10.7.0.cl
  tags:
  - 10.7.0.cl
  description: Roles for version 10.7.0.cl
- name: 26.5.0.cl
  id: 26.5.0.cl
  tags:
  - 26.5.0.cl
  description: Roles for version 26.5.0.cl
- name: 9.0.0.cl
  id: 9.0.0.cl
  tags:
  - 9.0.0.cl
  description: Roles for version 9.0.0.cl
- name: 9.4.0.cl
  id: 9.4.0.cl
  tags:
  - 9.4.0.cl
  description: Roles for version 9.4.0.cl
- name: 9.12.0.cl
  id: 9.12.0.cl
  tags:
  - 9.12.0.cl
  description: Roles for version 9.12.0.cl
- name: 26.4.0.cl
  id: 26.4.0.cl
  tags:
  - 26.4.0.cl
  description: Roles for version 26.4.0.cl
- name: 10.12.0.cl
  id: 10.12.0.cl
  tags:
  - 10.12.0.cl
  description: Roles for version 10.12.0.cl
- name: 9.2.0.cl
  id: 9.2.0.cl
  tags:
  - 9.2.0.cl
  description: Roles for version 9.2.0.cl
- name: 9.9.0.cl
  id: 9.9.0.cl
  tags:
  - 9.9.0.cl
  description: Roles for version 9.9.0.cl
- name: 9.6.0.cl
  id: 9.6.0.cl
  tags:
  - 9.6.0.cl
  description: Roles for version 9.6.0.cl
- name: 10.10.0.cl
  id: 10.10.0.cl
  tags:
  - 10.10.0.cl
  description: Roles for version 10.10.0.cl
- name: 10.6.0.cl
  id: 10.6.0.cl
  tags:
  - 10.6.0.cl
  description: Roles for version 10.6.0.cl
- name: 10.3.0.cl
  id: 10.3.0.cl
  tags:
  - 10.3.0.cl
  description: Roles for version 10.3.0.cl
- name: 10.1.0.cl
  id: 10.1.0.cl
  tags:
  - 10.1.0.cl
  description: Roles for version 10.1.0.cl
- name: 10.9.0.cl
  id: 10.9.0.cl
  tags:
  - 10.9.0.cl
  description: Roles for version 10.9.0.cl
- name: 10.8.0.cl
  id: 10.8.0.cl
  tags:
  - 10.8.0.cl
  description: Roles for version 10.8.0.cl
- name: 9.5.0.cl
  id: 9.5.0.cl
  tags:
  - 9.5.0.cl
  description: Roles for version 9.5.0.cl
- name: 26.3.0.cl
  id: 26.3.0.cl
  tags:
  - 26.3.0.cl
  description: Roles for version 26.3.0.cl
- name: 10.14.0.cl
  id: 10.14.0.cl
  tags:
  - 10.14.0.cl
  description: Roles for version 10.14.0.cl
- name: 9.7.0.cl
  id: 9.7.0.cl
  tags:
  - 9.7.0.cl
  description: Roles for version 9.7.0.cl