github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/paths/locales/download.yaml (about)

     1  ---
     2  summary: Download a locale
     3  description: Download a locale in a specific file format.
     4  operationId: locale/download
     5  tags:
     6    - Locales
     7  parameters:
     8    - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9    - "$ref": "../../parameters.yaml#/If-Modified-Since"
    10    - "$ref": "../../parameters.yaml#/If-None-Match"
    11    - "$ref": "../../parameters.yaml#/project_id"
    12    - "$ref": "../../parameters.yaml#/locale_id_as_id"
    13    - description: specify the branch to use
    14      example: my-feature-branch
    15      name: branch
    16      in: query
    17      schema:
    18        type: string
    19    - description: File format name. See the <a href="https://support.phrase.com/hc/en-us/sections/6111343326364">format guide</a> for all supported file formats.
    20      example: yml
    21      name: file_format
    22      in: query
    23      schema:
    24        type: string
    25    - description: Limit results to keys tagged with a list of comma separated tag names.
    26      example: feature1,feature2
    27      name: tags
    28      in: query
    29      schema:
    30        type: string
    31    - description: Limit download to tagged keys. This parameter is deprecated. Please use the "tags" parameter instead
    32      example: feature
    33      deprecated: true
    34      name: tag
    35      in: query
    36      schema:
    37        type: string
    38    - description: Indicates whether keys without translations should be included in the output as well.
    39      example:
    40      name: include_empty_translations
    41      in: query
    42      schema:
    43        type: boolean
    44    - description: Indicates whether zero forms should be included when empty in pluralized keys.
    45      example:
    46      name: exclude_empty_zero_forms
    47      in: query
    48      schema:
    49        type: boolean
    50    - description: Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
    51      example:
    52      name: include_translated_keys
    53      in: query
    54      schema:
    55        type: boolean
    56    - description: Indicates whether [NOTRANSLATE] tags should be kept.
    57      example:
    58      name: keep_notranslate_tags
    59      in: query
    60      schema:
    61        type: boolean
    62    - description: This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively.
    63      example:
    64      deprecated: true
    65      name: convert_emoji
    66      in: query
    67      schema:
    68        type: boolean
    69    - description: 'Additional formatting and render options. See the <a href="https://support.phrase.com/hc/en-us/sections/6111343326364">format guide</a> for a list of options available for each format. Specify format options like this: <code>...&format_options[foo]=bar</code>'
    70      example:
    71      name: format_options
    72      in: query
    73      schema:
    74        type: object
    75        properties: {}
    76      style: deepObject
    77      explode: true
    78    - description: Enforces a specific encoding on the file contents. Valid options are "UTF-8", "UTF-16" and "ISO-8859-1".
    79      example:
    80      name: encoding
    81      in: query
    82      schema:
    83        type: string
    84    - description: Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with <code>include_unverified_translations</code>.
    85      example:
    86      deprecated: true
    87      name: skip_unverified_translations
    88      in: query
    89      schema:
    90        type: boolean
    91    - description: if set to false unverified translations are excluded
    92      example:
    93      name: include_unverified_translations
    94      in: query
    95      schema:
    96        type: boolean
    97    - description: If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project.
    98      example:
    99      name: use_last_reviewed_version
   100      in: query
   101      schema:
   102        type: boolean
   103    - description: If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>.
   104      example:
   105      name: fallback_locale_id
   106      in: query
   107      schema:
   108        type: string
   109    - description: Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a <code>tag</code> parameter indicating a specific job.
   110      example:
   111      name: source_locale_id
   112      in: query
   113      schema:
   114        type: string
   115    - name: custom_metadata_filters
   116      in: query
   117      description: |
   118        Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
   119      schema:
   120        type: object
   121        properties: {}
   122      style: deepObject
   123      explode: true
   124  responses:
   125    "200":
   126      description: OK
   127      content:
   128        "*":
   129          schema:
   130            type: string
   131            format: binary
   132      headers:
   133        X-Rate-Limit-Limit:
   134          "$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
   135        X-Rate-Limit-Remaining:
   136          "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
   137        X-Rate-Limit-Reset:
   138          "$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
   139    "400":
   140      "$ref": "../../responses.yaml#/400"
   141    "404":
   142      "$ref": "../../responses.yaml#/404"
   143    "429":
   144      "$ref": "../../responses.yaml#/429"
   145  x-code-samples:
   146    - lang: Curl
   147      source: |-
   148        curl "https://api.phrase.com/v2/projects/:project_id/locales/:id/download?branch=my-feature-branch&file_format=yml&tags=feature1,feature2&tag=feature&custom_metadata_filters[tone]=friendly" \
   149          -u USERNAME_OR_ACCESS_TOKEN
   150    - lang: CLI v2
   151      source: |-
   152        phrase locales download \
   153        --project_id <project_id> \
   154        --id <id> \
   155        --branch my-feature-branch \
   156        --file_format yml \
   157        --tags feature1,feature2 \
   158        --tag feature \
   159        --access_token <token>
   160  x-cli-version: "2.6.4"