---
type: api
title: List Comments
description: Retrieves all the comments for a given Resource, in reverse modified time order.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-list-comment
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-list-comment
products:
  - Elastic Cloud Enterprise
---

# List Comments

## Paths

- `GET` `/comments/{resource_type}/{resource_id}`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#apikey)

#### Path Parameters

- `resource_type` (string)
  The kind of Resource that a Comment belongs to. Should be one of [elasticsearch, kibana, apm, appsearch, enterprise_search, integrations_server, allocator, constructor, runner, proxy].
- `resource_id` (string)
  Id of the Resource that a Comment belongs to.

## Description

Retrieves all the comments for a given Resource, in reverse modified time order.

## Response

The Comments

`application/json`

- `values` ([] CommentWithMeta)
  The list of comments
  - `comment` ({} Comment)
    A persisted Comment
    - `id` (string)
      The id of this Comment
    - `user_id` (string)
      The user id of the user who wrote this Comment
    - `message` (string)
      The message content of this Comment
  - `metadata` ({} Metadata)
    Metadata of an entity
    - `created_time` (string)
      Creation time
    - `modified_time` (string)
      Modification time
    - `version` (string)
      Version
## Code Examples

#### Console

```console
GET /comments/{resource_type}/{resource_id}
```

#### curl

```curl
curl -X GET "/comments/{resource_type}/{resource_id}"
```

