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

     1  ---
     2  summary: List comments
     3  description: List all comments for a key.
     4  operationId: comments/list
     5  tags:
     6  - Comments
     7  parameters:
     8  - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9  - "$ref": "../../parameters.yaml#/project_id"
    10  - "$ref": "../../parameters.yaml#/key_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: Search query for comment messages
    20    example: Some comment content
    21    name: query
    22    in: query
    23    schema:
    24      type: string
    25  - description: Search comments by their assigned locales
    26    example: [someId]
    27    name: locale_ids
    28    in: query
    29    schema:
    30      type: array
    31      items:
    32        type: string
    33  - description: Specify the filter for the comments
    34    name: filters
    35    in: query
    36    schema:
    37      type: array
    38      example: [read, unread]
    39      items:
    40        type: string
    41  - description: 'Order direction. Can be one of: asc, desc.'
    42    name: order
    43    in: query
    44    example: desc
    45    schema:
    46      type: string
    47  responses:
    48    '200':
    49      description: OK
    50      content:
    51        application/json:
    52          schema:
    53            type: array
    54            items:
    55              "$ref": "../../schemas/comment.yaml#/comment"
    56      headers:
    57        X-Rate-Limit-Limit:
    58          "$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
    59        X-Rate-Limit-Remaining:
    60          "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
    61        X-Rate-Limit-Reset:
    62          "$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
    63        Link:
    64          "$ref": "../../headers.yaml#/Link"
    65        Pagination:
    66          "$ref": "../../headers.yaml#/Pagination"
    67    '400':
    68      "$ref": "../../responses.yaml#/400"
    69    '404':
    70      "$ref": "../../responses.yaml#/404"
    71    '429':
    72      "$ref": "../../responses.yaml#/429"
    73  x-code-samples:
    74  - lang: Curl
    75    source: |-
    76      curl "https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments?branch=my-feature-branch&filters=unread&query=something&locale_ids=someId&order=desc" \
    77        -u USERNAME_OR_ACCESS_TOKEN \
    78        -X GET \
    79        -H 'Content-Type: application/json'
    80  - lang: CLI v2
    81    source: |-
    82      phrase comments list \
    83      --project_id <project_id> \
    84      --key_id <key_id> \
    85      --branch "my-feature-branch" \
    86      --filters unread \
    87      --order desc \
    88      --query "Some comment content" \
    89      --locale_ids someId \
    90      --access_token <token>
    91  requestBody:
    92    required: true
    93    content:
    94      application/json:
    95        schema:
    96          type: object
    97          title: comments/list/parameters
    98          properties:
    99            branch:
   100              description: Specify the branch to use
   101              type: string
   102              example: my-feature-branch
   103            query:
   104              description: Search query for comment messages
   105              type: string
   106              example: Some comment content
   107            locale_ids:
   108              description: Search comments by their assigned locales
   109              type: array
   110              items:
   111                type: string
   112              example: [someId, otherId]
   113            filters:
   114              description: Specify filters to find comments by
   115              type: array
   116              items:
   117                type: string
   118              example: [read, unread]
   119            order:
   120              description: Specify ordering of comments
   121              type: string
   122              example: desc
   123  x-cli-version: '2.5'