> [!WARNING]
>
> **Preview**
>
>
> This product or feature is
>
> subject to the "Pre-GA Offerings Terms" in the General Service Terms section
> of the [Service Specific
> Terms](https://docs.cloud.google.com/terms/service-terms#1).
>
> Pre-GA products and features are available "as is" and might have limited support.
>
> For more information, see the
> [launch stage descriptions](https://cloud.google.com/products/#product-launch-stages).

- [HTTP request](https://docs.cloud.google.com/managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.schemaRegistries.subjects/lookupVersion.md.txt#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.schemaRegistries.subjects/lookupVersion.md.txt#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.schemaRegistries.subjects/lookupVersion.md.txt#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.schemaRegistries.subjects/lookupVersion.md.txt#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.schemaRegistries.subjects/lookupVersion.md.txt#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.schemaRegistries.subjects/lookupVersion.md.txt#body.aspect)
- [Try it!](https://docs.cloud.google.com/managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.schemaRegistries.subjects/lookupVersion.md.txt#try-it)

Lookup a schema under the specified subject.

### HTTP request

`POST https://managedkafka.googleapis.com/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*}`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The subject to lookup the schema in. Structured like: `projects/{project}/locations/{location}/schemaRegistries/{schemaRegistry}/subjects/{subject}` or `projects/{project}/locations/{location}/schemaRegistries/{schemaRegistry}/contexts/{context}/subjects/{subject}` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "schema": string, "references": [ { object (`SchemaReference`) } ], "schemaType": enum (`SchemaType`), "normalize": boolean, "deleted": boolean } ``` |

| Fields ||
|---|---|
| `schema` | `string` Required. The schema payload |
| `references[]` | ``object (`SchemaReference`)`` Optional. The schema references used by the schema. |
| `schemaType` | ``enum (`SchemaType`)`` Optional. The schema type of the schema. |
| `normalize` | `boolean` Optional. If true, the schema will be normalized before being looked up. The default is false. |
| `deleted` | `boolean` Optional. If true, soft-deleted versions will be included in lookup, no matter if the subject is active or soft-deleted. If false, soft-deleted versions will be excluded. The default is false. |

### Response body

If successful, the response body contains an instance of `SchemaVersion`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication.md.txt#authorization-gcp).