> ## Documentation Index
> Fetch the complete documentation index at: https://developers.phrase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# File processing metadata

> Allows the fetching of metadata from the processing file. The completed file can be 
downloaded using the [File download](/en/api/language-ai/file-translations/action-result) endpoint.




## OpenAPI

````yaml /openapi/phrase-language-ai.json get /v1/fileTranslations/{uid}
openapi: 3.0.2
info:
  title: Phrase Language AI via API
  description: >
    ### Machine translation powered by [Phrase](https://phrase.com) allows the
    translation of content utilizing  a unique AI powered feature to pick the
    best available translation engine for that content.
  version: 1.0.0
  termsOfService: https://phrase.com/terms/
  contact:
    url: https://phrase.com
servers:
  - url: https://eu.phrase.com/smt/api/
    description: The API server for EU data center.
  - url: https://us.phrase.com/smt/api/
    description: The API server for US data center.
security:
  - BearerAuth: []
tags:
  - name: File translations
    description: >-
      Allows the processing files asynchronously with the file being uploaded
      and stored in Phrase.  Files can be either stored or translated by the
      best available MT engine. File TTL is limited to 24 hours  after which the
      file is deleted from storage.
  - name: Authentication
    description: >
      Allows the authentication of a user and to get the token to be used in the
      Authorization header.
  - name: Text translations
    description: >
      Allows the translation of text content utilizing Phrase Language AI
      capabilities. APIs are synchronous, 

      designed for quick turnaround and are limited in size of the request.
paths:
  /v1/fileTranslations/{uid}:
    get:
      tags:
        - File translations
      summary: File processing metadata
      description: >
        Allows the fetching of metadata from the processing file. The completed
        file can be 

        downloaded using the [File
        download](/en/api/language-ai/file-translations/action-result) endpoint.
      operationId: getMetadataV1
      parameters:
        - in: path
          name: uid
          description: >-
            UID of the operation. See [File
            translations](/en/api/language-ai/file-translations/file-translations)
            endpoint.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            Returns metadata of previously created translation request by
            requests unique identifier.
          headers:
            Memsource-Action-Id:
              $ref: '#/components/headers/MemsourceActionId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileTranslationsResponseV1'
        '400':
          $ref: '#/components/responses/Tms400'
        '401':
          $ref: '#/components/responses/Tms401'
        '403':
          $ref: '#/components/responses/Tms403'
        '404':
          $ref: '#/components/responses/Tms404'
        '405':
          $ref: '#/components/responses/Tms405'
        '408':
          $ref: '#/components/responses/Tms408'
        '410':
          $ref: '#/components/responses/Tms410'
        '415':
          $ref: '#/components/responses/Tms415'
        '429':
          $ref: '#/components/responses/Tms429'
        '500':
          $ref: '#/components/responses/Tms500'
        '501':
          $ref: '#/components/responses/Tms501'
components:
  headers:
    MemsourceActionId:
      description: Memsource action identifier used for tracking request across services.
      schema:
        type: string
  schemas:
    FileTranslationsResponseV1:
      type: object
      properties:
        uid:
          description: UID of the operation. UID can be used to query the result.
          type: string
          example: random-uid
        actions:
          type: array
          items:
            $ref: '#/components/schemas/ActionV1'
          uniqueItems: true
          minItems: 1
        metadata:
          $ref: '#/components/schemas/FileTranslationsMetadataV1'
      required:
        - uid
        - actions
        - metadata
    ActionV1:
      type: object
      description: >-
        Actions performed with the file. Each of the actions gets unique
        identifier to query the result.
      properties:
        actionType:
          $ref: '#/components/schemas/ActionTypeEnumV1'
        results:
          type: array
          items:
            $ref: '#/components/schemas/ActionResultV1'
          uniqueItems: true
          minItems: 1
      required:
        - actionType
        - results
    FileTranslationsMetadataV1:
      type: object
      properties:
        sourceLang:
          $ref: '#/components/schemas/LanguageV1'
        targetLangs:
          type: array
          items:
            $ref: '#/components/schemas/LanguageV1'
          uniqueItems: true
          minItems: 1
        actionTypes:
          type: array
          items:
            $ref: '#/components/schemas/ActionTypeEnumV1'
          uniqueItems: true
          minItems: 1
        callbackUrl:
          type: string
          description: >-
            URI in [RFC 2396](https://datatracker.ietf.org/doc/html/rfc2396)
            format.
          format: uri
        mtSettings:
          $ref: '#/components/schemas/MtSettingsV1'
        transMemoriesConfig:
          type: array
          items:
            $ref: '#/components/schemas/TranslationMemoriesConfigV1'
      required:
        - sourceLang
        - targetLangs
        - actionTypes
    ActionTypeEnumV1:
      type: string
      enum:
        - CONVERTER_IMPORT
        - FILE_IMPORT
        - MT_GENERIC_PRETRANSLATE
        - QUALITY_ESTIMATION
      example: MT_GENERIC_PRETRANSLATE
    ActionResultV1:
      type: object
      properties:
        id:
          type: string
          example: random-uid
        sourceLang:
          type: string
          example: en
        targetLang:
          type: string
          example: cs
        status:
          $ref: '#/components/schemas/ActionStatusEnumV1'
      required:
        - id
        - sourceLang
        - targetLang
        - status
    LanguageV1:
      type: object
      properties:
        code:
          type: string
          description: >-
            Language code, using a two-letter language code from ISO 639-1,
            e.g., `cs`.  Optionally, a region subtag based on a two-letter
            country code from ISO 3166-1 alpha-2,  e.g., `cs_cz`, or a
            three-digit code from UN M.49, e.g., `es_419`, separated by an
            underscore.  Both the two-letter language code and the two-letter
            country code need to be lower case.

            Note that the Phrase Language AI setup dictates whether the region
            subtag is optional or not.  If the only models deployed to a profile
            explicitly specify or are customized with a target locale,  then a
            region subtag is mandatory.
          example: cs
          x-constraints: '@ValidLocale'
      required:
        - code
    MtSettingsV1:
      type: object
      properties:
        usePhraseMTSettings:
          type: boolean
          default: false
          description: Use Language AI to apply Machine Translation
          example: true
        profile:
          $ref: '#/components/schemas/TranslationProfileRequestV1'
    TranslationMemoriesConfigV1:
      type: object
      properties:
        targetLang:
          $ref: '#/components/schemas/LanguageV1'
        transMemories:
          type: array
          items:
            $ref: '#/components/schemas/TranslationMemoryRequestV1'
    ActionStatusEnumV1:
      type: string
      enum:
        - ERROR
        - OK
        - RUNNING
      example: OK
    TranslationProfileRequestV1:
      type: object
      required:
        - uid
      properties:
        uid:
          type: string
          description: UID for the translation profile
          example: CFUki8ptanoz1WAIYoXSH4
    TranslationMemoryRequestV1:
      type: object
      properties:
        transMemory:
          type: object
          properties:
            uid:
              type: string
              description: Unique identifier of the translation memory
        tmSourceLocale:
          $ref: '#/components/schemas/LanguageV1'
        tmTargetLocale:
          $ref: '#/components/schemas/LanguageV1'
  responses:
    Tms400:
      description: Bad request
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms401:
      description: Not authorized
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms403:
      description: Forbidden
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms404:
      description: Resource not found
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms405:
      description: Method not allowed
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms408:
      description: Timeout
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms410:
      description: Gone
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms415:
      description: Unsupported media type
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms429:
      description: Too many requests
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms500:
      description: Internal server error
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms501:
      description: Not implemented
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Provide `Authorization` header with token obtained through
        [Login](/en/api/language-ai/authentication/login) operation.

````