This page is intended for customers who are currently using the V2 Beta version of the Cloud Support API and would like to migrate to V2.
Getting started with V2
If you're already using V2 Beta, then you don't need to do any additional setup to start using V2. You can use the same service accounts and credentials. The API will already be enabled for you.
To call the V2 endpoints, simply replace the /v2beta/
portion of the
request URL to /v2/
. For example, here's how you would upgrade a
cases.get
call from V2 Beta to V2:
V2 Beta:
GET https://cloudsupport.googleapis.com/v2beta/projects/123/cases/abc
V2:
GET https://cloudsupport.googleapis.com/v2/projects/123/cases/abc
Breaking changes to SearchCases
, Case.severity
, and Comment.plainTextBody
SearchCases
Endpoint Changes
The SearchCases
endpoint has changed in the following ways:
The path has changed from:
GET https://cloudsupport.googleapis.com/v2/cases:search
to:
GET https://cloudsupport.googleapis.com/v2beta/{parent=*/*}/cases:search
The
filter
parameter no longer accepts aproject
ororganization
filter. Instead, the project/organization from the URL will be used as the scope of the search.
Field Changes
The fields have changed in the following ways:
The
severity
field on cases has been removed in favor of thepriority
field.The
plainTextBody
field on case comments has been removed in favor of thebody
field.
Why did we make these changes?
Changing the
SearchCases
path- The old way of defining the search scope was confusing and not in-line with standard Google Cloud Platform API design practices.
- The new way makes
SearchCases
more consistent with other endpoints in the API, such asListCases
.
Removing the
Case.severity
field- Severity serves the same purpose as priority, so removing it simplifies the API.
Removing the
Comment.plainTextBody
fieldComment.body
only ever contains plain text, so it's a duplicate of this field, so we are removingplainTextBody
to simplify the API.
How to adapt to the changes
Remove the
project
andorganization
filters fromSearchCase
requests and declare them in the request URL instead.Use the
priority
field in the places where you used to use theseverity
field. They're very similar in semantic meaning, so you can usually swap out these references.Use the
body
field instead of theplainTextBody
field. They contained the same information. So, odds are, it should be fine to replace all references toplainTextBody
withbody
.