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

     1  ---
     2  summary: List keys
     3  description: List all keys for the given project. Alternatively you can POST requests to /search.
     4  operationId: keys/list
     5  tags:
     6  - Keys
     7  parameters:
     8  - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9  - "$ref": "../../parameters.yaml#/project_id"
    10  - "$ref": "../../parameters.yaml#/page"
    11  - "$ref": "../../parameters.yaml#/per_page"
    12  - description: specify the branch to use
    13    example: my-feature-branch
    14    name: branch
    15    in: query
    16    schema:
    17      type: string
    18  - description: 'Sort by field. Can be one of: name, created_at, updated_at.'
    19    example: updated_at
    20    name: sort
    21    in: query
    22    schema:
    23      type: string
    24  - description: 'Order direction. Can be one of: asc, desc.'
    25    example: desc
    26    name: order
    27    in: query
    28    schema:
    29      type: string
    30  - description: |
    31      Specify a query to do broad search for keys by name (including wildcards).<br><br>
    32      The following qualifiers are also supported in the search term:<br>
    33      <ul>
    34        <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li>
    35        <li><code>name:key_name,...</code> for text queries on a comma-seperated list of exact key names - spaces, commas, and colons need to be escaped with double backslashes</li>
    36        <li><code>tags:tag_name,...</code> to filter for keys with certain comma-seperated list of tags</li>
    37        <li><code>uploads:upload_id,...</code> to filter for keys with certain comma-seperated list of uploads</li>
    38        <li><code>job:{true|false}</code> to filter for keys mentioned in an active job</li>
    39        <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li>
    40        <li><code>updated_at:{&gt;=|&lt;=}2013-02-21T00:00:00Z</code> for date range queries</li>
    41        <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li>
    42      </ul>
    43      Find more examples <a href="#overview--usage-examples">here</a>.
    44    example: mykey* translated:true
    45    name: q
    46    in: query
    47    schema:
    48      type: string
    49  - description: Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
    50    example: abcd1234abcd1234abcd1234abcd1234
    51    name: locale_id
    52    in: query
    53    schema:
    54      type: string
    55  responses:
    56    '200':
    57      description: OK
    58      content:
    59        application/json:
    60          schema:
    61            type: array
    62            items:
    63              "$ref": "../../schemas/translation_key.yaml#/translation_key"
    64      headers:
    65        X-Rate-Limit-Limit:
    66          "$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
    67        X-Rate-Limit-Remaining:
    68          "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
    69        X-Rate-Limit-Reset:
    70          "$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
    71        Link:
    72          "$ref": "../../headers.yaml#/Link"
    73        Pagination:
    74          "$ref": "../../headers.yaml#/Pagination"
    75    '400':
    76      "$ref": "../../responses.yaml#/400"
    77    '404':
    78      "$ref": "../../responses.yaml#/404"
    79    '429':
    80      "$ref": "../../responses.yaml#/429"
    81  x-code-samples:
    82  - lang: Curl
    83    source: |-
    84      curl "https://api.phrase.com/v2/projects/:project_id/keys?branch=my-feature-branch&sort=updated_at&order=desc&q=mykey*%20translated:true&locale_id=abcd1234abcd1234abcd1234abcd1234" \
    85        -u USERNAME_OR_ACCESS_TOKEN
    86  - lang: CLI v2
    87    source: |-
    88      phrase keys list \
    89      --project_id <project_id> \
    90      --branch my-feature-branch \
    91      --sort updated_at \
    92      --order desc \
    93      --query 'mykey* translated:true' \
    94      --locale_id abcd1234abcd1234abcd1234abcd1234 \
    95      --access_token <token>
    96  x-cli-version: '2.5'