search method
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: shell curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"'
Python: python import googleapiclient.discovery supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version="v2", discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2", ) request = supportApiService.caseClassifications().search( query='display_name:"*Compute Engine*"' ) print(request.execute())
Request parameters:
pageSize
- The maximum number of classifications fetched with each
request.
pageToken
- A token identifying the page of results to return. If
unspecified, the first page is retrieved.
query
- 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.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a SearchCaseClassificationsResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<SearchCaseClassificationsResponse> search({
core.int? pageSize,
core.String? pageToken,
core.String? query,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if (query != null) 'query': [query],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'v2/caseClassifications:search';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return SearchCaseClassificationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}