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

     1  ---
     2  summary: Exclude translations by query
     3  description: Exclude translations matching query from locale export.
     4  operationId: translations/exclude-collection
     5  tags:
     6  - Translations
     7  parameters:
     8  - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9  - "$ref": "../../parameters.yaml#/project_id"
    10  responses:
    11    '200':
    12      description: OK
    13      content:
    14        application/json:
    15          schema:
    16            "$ref": "../../schemas/affected_count.yaml#/affected_count"
    17      headers:
    18        X-Rate-Limit-Limit:
    19          "$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
    20        X-Rate-Limit-Remaining:
    21          "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
    22        X-Rate-Limit-Reset:
    23          "$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
    24    '400':
    25      "$ref": "../../responses.yaml#/400"
    26    '404':
    27      "$ref": "../../responses.yaml#/404"
    28    '429':
    29      "$ref": "../../responses.yaml#/429"
    30  x-code-samples:
    31  - lang: Curl
    32    source: |-
    33      curl "https://api.phrase.com/v2/projects/:project_id/translations/exclude" \
    34        -u USERNAME_OR_ACCESS_TOKEN \
    35        -X PATCH \
    36        -d '{"branch":"my-feature-branch","q":"PhraseApp*%20verified:true%20tags:feature,center","sort":"updated_at","order":"desc"}' \
    37        -H 'Content-Type: application/json'
    38  - lang: CLI v2
    39    source: |-
    40      phrase translations exclude-collection \
    41      --project_id <project_id> \
    42      --data '{"branch":"my-feature-branch", "q":"'PhraseApp*%20verified:true%20tags:feature,center'", "sort":"updated_at", "order":"desc"}' \
    43      --access_token <token>
    44  requestBody:
    45    required: true
    46    content:
    47      application/json:
    48        schema:
    49          type: object
    50          title: translations/exclude/parameters
    51          properties:
    52            branch:
    53              description: specify the branch to use
    54              type: string
    55              example: my-feature-branch
    56            q:
    57              description: |
    58                Specify a query to find translations by content (including wildcards).<br><br>
    59                <i>Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).</i><br>
    60                The following qualifiers are supported in the query:<br>
    61                <ul>
    62                  <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li>
    63                  <li><code>tags:XYZ</code> for tags on the translation</li>
    64                  <li><code>unverified:{true|false}</code> for verification status</li>
    65                  <li><code>excluded:{true|false}</code> for exclusion status</li>
    66                  <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li>
    67                </ul>
    68                Find more examples <a href="#overview--usage-examples">here</a>.
    69              type: string
    70              example: PhraseApp*%20verified:true%20tags:feature,center
    71            sort:
    72              description: 'Sort criteria. Can be one of: key_name, created_at, updated_at.'
    73              type: string
    74              example: updated_at
    75            order:
    76              description: 'Order direction. Can be one of: asc, desc.'
    77              type: string
    78              example: desc
    79  x-cli-version: '2.5'