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

     1  ---
     2  summary: List translations by locale
     3  description: List translations for a specific locale. If you want to download all translations for one locale we recommend to use the <code>locales#download</code> endpoint.
     4  operationId: translations/by_locale
     5  tags:
     6  - Translations
     7  parameters:
     8  - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9  - "$ref": "../../parameters.yaml#/project_id"
    10  - "$ref": "../../parameters.yaml#/locale_id"
    11  - "$ref": "../../parameters.yaml#/page"
    12  - "$ref": "../../parameters.yaml#/per_page"
    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: 'Sort criteria. Can be one of: key_name, created_at, updated_at.'
    20    example: updated_at
    21    name: sort
    22    in: query
    23    schema:
    24      type: string
    25  - description: 'Order direction. Can be one of: asc, desc.'
    26    example: desc
    27    name: order
    28    in: query
    29    schema:
    30      type: string
    31  - description: |
    32      Specify a query to find translations by content (including wildcards).<br><br>
    33      <i>Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).</i><br>
    34      The following qualifiers are supported in the query:<br>
    35      <ul>
    36        <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li>
    37        <li><code>unverified:{true|false}</code> for verification status</li>
    38        <li><code>tags:XYZ</code> for tags on the translation</li>
    39        <li><code>excluded:{true|false}</code> for exclusion status</li>
    40        <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li>
    41      </ul>
    42      Find more examples <a href="#overview--usage-examples">here</a>.
    43    example: PhraseApp*%20unverified:true%20excluded:true%20tags:feature,center
    44    name: q
    45    in: query
    46    schema:
    47      type: string
    48  responses:
    49    '200':
    50      description: OK
    51      content:
    52        application/json:
    53          schema:
    54            type: array
    55            items:
    56              "$ref": "../../schemas/translation.yaml#/translation"
    57      headers:
    58        X-Rate-Limit-Limit:
    59          "$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
    60        X-Rate-Limit-Remaining:
    61          "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
    62        X-Rate-Limit-Reset:
    63          "$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
    64        Link:
    65          "$ref": "../../headers.yaml#/Link"
    66        Pagination:
    67          "$ref": "../../headers.yaml#/Pagination"
    68    '400':
    69      "$ref": "../../responses.yaml#/400"
    70    '404':
    71      "$ref": "../../responses.yaml#/404"
    72    '429':
    73      "$ref": "../../responses.yaml#/429"
    74  x-code-samples:
    75  - lang: Curl
    76    source: |-
    77      curl "https://api.phrase.com/v2/projects/:project_id/locales/:locale_id/translations?branch=my-feature-branch&sort=updated_at&order=desc&q=PhraseApp*%2520unverified:true%2520excluded:true%2520tags:feature,center" \
    78        -u USERNAME_OR_ACCESS_TOKEN
    79  - lang: CLI v2
    80    source: |-
    81      phrase translations by_locale \
    82      --project_id <project_id> \
    83      --locale_id <locale_id> \
    84      --branch my-feature-branch \
    85      --sort updated_at \
    86      --order desc \
    87      --query 'PhraseApp*%20unverified:true%20excluded:true%20tags:feature,center' \
    88      --access_token <token>
    89  x-cli-version: '2.5'