---
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/4493/api/doc/cloud-enterprise/v4/operation/operation-list-comment
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-enterprise/v4/operation/operation-list-comment
products:
  - Elastic Cloud Enterprise
---

# List Comments

## Paths

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

#### Path parameters

- `resource_type` (string) — required
  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) — required
  Id of the Resource that a Comment belongs to.

## Description

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

## Authentication

- Basic: `Authorization: Basic <credentials>`
- Api key: `Authorization: <value>`

## Response

The Comments

`application/json`

- `values` (object[])
  The list of comments
  - `comment` (object)
    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` (object)
    Metadata of an entity
    - `created_time` (string · format: date-time)
      Creation time
    - `modified_time` (string · format: date-time)
      Modification time
    - `version` (string)
      Version
## Code examples

#### curl

```curl
curl -X GET "${API_URL}/comments/${RESOURCE_TYPE}/${RESOURCE_ID}" \
  -u "${USERNAME}:${PASSWORD}"
```

