This page is intended for customers who are 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, 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`

> [!IMPORTANT]
> **Important:** These are the only breaking changes between V2 Beta and V2. Any fields and endpoints that are not mentioned in this section are exactly the same. If you don't use the `SearchCases` endpoint, `Case.severity` field, or the `Comment.plainTextBody` field, you can safely migrate to V2 without any changes to your business logic or request-response format.

### `SearchCases` Endpoint Changes

The `SearchCases` endpoint has changed in the following ways:

- The path has changed from:

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

  to:

  `GET https://cloudsupport.googleapis.com/v2/{parent=*/*}/cases:search`
- The `filter` parameter no longer accepts a `project` or `organization` filter. Instead, the project or 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](https://docs.cloud.google.com/support/docs/reference/rest/v2beta/cases.md.txt) has been removed in favor of the `priority` field.

- The `plainTextBody` field on [case comments](https://docs.cloud.google.com/support/docs/reference/rest/v2beta/cases.comments.md.txt) has been removed in favor of the `body` 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 API design practices.
  - The new way makes `SearchCases` more consistent with other endpoints in the API, such as `ListCases`.
- Removing the `Case.severity` field

  - Severity serves the same purpose as priority, so removing it simplifies the API.
- Removing the `Comment.plainTextBody` field

  - `Comment.body` only ever contains plain text, so it's a duplicate of this field, so we are removing `plainTextBody` to simplify the API.

## How to adapt to the changes

- Remove the `project` and `organization` filters from `SearchCase` requests and declare them in the request URL instead.

- Use the `priority` field in the places where you used to use the `severity` field. They're very similar in semantic meaning, so you can usually swap out these references.

- Use the `body` field instead of the `plainTextBody` field. They contained the same information. So, odds are, it should be fine to replace all references to `plainTextBody` with `body`.