# Method: caseClassifications.search

Retrieve valid classifications to use when creating a support case.

Classifications are hierarchical. Each classification is a string containing all levels of the hierarchy separated by `" > "`. For example, `"Technical Issue > Compute > Compute Engine"`.

Classification IDs returned by this endpoint are valid for at least six months. When a classification is deactivated, this endpoint immediately stops returning it. After six months, `case.create` requests using the classification will fail.

EXAMPLES:

cURL:

    curl \
      --header "Authorization: Bearer $(gcloud auth print-access-token)" \
      'https://cloudsupport.googleapis.com/v2beta/caseClassifications:search?query=displayName:"*Compute%20Engine*"'

Python:

    import googleapiclient.discovery

    supportApiService = googleapiclient.discovery.build(
        serviceName="cloudsupport",
        version="v2beta",
        discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2",
    )
    request = supportApiService.caseClassifications().search(
        query='displayName:"*Compute Engine*"'
    )
    print(request.execute())

### HTTP request

`GET https://cloudsupport.googleapis.com/v2beta/caseClassifications:search`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Query parameters

| Parameters ||
|---|---|
| `query` | `string` An expression used to filter case classifications. If it's an empty string, then no filtering happens. Otherwise, case classifications will be returned that match the filter. |
| `pageSize` | `integer` The maximum number of classifications fetched with each request. |
| `pageToken` | `string` A token identifying the page of results to return. If unspecified, the first page is retrieved. |
| `product` | ``object (`https://docs.cloud.google.com/support/docs/reference/rest/v2beta/caseClassifications#CaseClassification.Product`)`` Optional. The product to return case classifications for. |

### Request body

The request body must be empty.

### Response body

The response message for caseClassifications.search endpoint.

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

| JSON representation |
|---|
| ``` { "caseClassifications": [ { object (`https://docs.cloud.google.com/support/docs/reference/rest/v2beta/caseClassifications#CaseClassification`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `caseClassifications[]` | ``object (`https://docs.cloud.google.com/support/docs/reference/rest/v2beta/caseClassifications#CaseClassification`)`` The classifications retrieved. |
| `nextPageToken` | `string` A token to retrieve the next page of results. Set this in the `pageToken` field of subsequent `caseClassifications.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](https://docs.cloud.google.com/docs/authentication#authorization-gcp).