Retrieve all cases under a parent, but not its children.
For example, listing cases under an organization only returns the cases that are directly parented by that organization. To retrieve cases under an organization and its projects, use cases.search
.
EXAMPLES:
cURL:
parent="projects/some-project"
curl \
--header "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://cloudsupport.googleapis.com/v2/$parent/cases"
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().list(parent="projects/some-project")
print(request.execute())
HTTP request
GET https://cloudsupport.googleapis.com/v2beta/{parent=*/*}/cases
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent
|
Required. The name of a parent to list cases under. |
Query parameters
filter
string
An expression used to filter cases.
If it's an empty string, then no filtering happens. Otherwise, the endpoint returns the cases that match the filter.
Expressions use the following fields separated by AND
and specified with =
:
-
state
: Can beOPEN
orCLOSED
. -
priority
: Can beP0
,P1
,P2
,P3
, orP4
. You can specify multiple values for priority using theOR
operator. For example,priority=P1 OR priority=P2
. -
creator.email
: The email address of the case creator.
EXAMPLES:
-
state=CLOSED
-
state=OPEN AND creator.email="tester@example.com"
-
state=OPEN AND (priority=P0 OR priority=P1)
pageSize
integer
The maximum number of cases fetched with each request. Defaults to 10.
pageToken
string
A token identifying the page of results to return. If unspecified, the first page is retrieved.
productLine
enum (
ProductLine
)
The product line to request cases for. If unspecified, only Google Cloud cases will be returned.
Request body
The request body must be empty.
Response body
The response message for the cases.list endpoint.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"cases"
:
[
{
object (
|
Fields | |
---|---|
cases[]
|
The list of cases associated with the parent after any filters have been applied. |
nextPageToken
|
A token to retrieve the next page of results. Set this in the |
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 .