Method: cases.comments.list

List all the comments associated with a case.

EXAMPLES:

cURL:

case="projects/some-project/cases/43595344"
curl \
  --header "Authorization: Bearer $(gcloud auth print-access-token)" \
  "https://cloudsupport.googleapis.com/v2/$case/comments"

Python:

import googleapiclient.discovery


apiVersion = "v2"
supportApiService = googleapiclient.discovery.build(
    serviceName="cloudsupport",
    version=apiVersion,
    discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={apiVersion}",
)
request = (
    supportApiService.cases()
    .comments()
    .list(parent="projects/some-project/cases/43595344")
)
print(request.execute())

HTTP request

GET https://cloudsupport.googleapis.com/v2/{parent=*/*/cases/*}/comments

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The name of the case for which to list comments.

Query parameters

Parameters
pageSize

integer

The maximum number of comments to fetch. Defaults to 10.

pageToken

string

A token identifying the page of results to return. If unspecified, the first page is returned.

Request body

The request body must be empty.

Response body

The response message for the comments.list endpoint.

If successful, the response body contains data with the following structure:

JSON representation
{
  "comments": [
    {
      object (Comment)
    }
  ],
  "nextPageToken": string
}
Fields
comments[]

object (Comment)

List of the comments associated with the case.

nextPageToken

string

A token to retrieve the next page of results. Set this in the pageToken field of subsequent cases.comments.list requests. If unspecified, there are no more results to retrieve.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudsupport
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.