Add a new comment to a case.
The comment must have the following fields set: body
.
EXAMPLES:
cURL:
case="projects/some-project/cases/43591344"
curl \
--request POST \
--header "Authorization: Bearer $(gcloud auth print-access-token)" \
--header 'Content-Type: application/json' \
--data '{
"body": "This is a test comment."
}' \
"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()
.create(
parent="projects/some-project/cases/43595344",
body={"body": "This is a test comment."},
)
)
print(request.execute())
HTTP request
POST https://cloudsupport.googleapis.com/v2beta/{parent=*/*/cases/*}/comments
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Required. The name of the case to which the comment should be added. |
Request body
The request body contains an instance of Comment
.
Response body
If successful, the response body contains a newly created instance of Comment
.
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.