Schema Registry API
Use the Schema Registry API to retrieve Avro schemas generated by Stream Connect, along with their subject and version history.
This API is a ServiceNow implementation of the Schema Registry API for Confluent Platform. Avro schemas are generated by Stream Connect for tables published to Kafka. This API is read-only; schemas and their evolution history are generated and maintained internally by Stream Connect.
This API requires the ServiceNow IntegrationHub Stream Connect Schema plugin (com.glide.hub.stream_connect.schema). This plugin provides the following tables:
- Table Message Schema [sys_table_message_schema]: Stores each generated Avro schema.
- Table Message Schema Evolution [sys_table_message_schema_evolution]: Tracks the subject and version for each schema. Schema subjects correspond to a table's Stream Connect topic name.
The calling user must have the message_schema_viewer role.
Parent Topic:REST API reference
Schema Registry - GET /schemas
Retrieves all schemas. Optional query parameters can be used for filtering and pagination.
URL format
Default URL: /api/now/schemaregistry/schemas
Supported request parameters
| Name | Description |
|---|---|
| None |
|
Name |
Description |
|---|---|
|
latestOnly |
Flag that indicates whether to return all schema versions for each subject in the response.Valid values:
Default: false Data type: Boolean |
|
limit |
Maximum number of records to return. For requests that exceed this number of records, use the offset parameter to paginate record retrieval.Default: 10,000 Data type: Number |
|
offset |
Starting index at which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks.Default: 0 Data type: Number |
|
subjectPrefix |
Restrict results to subject names starting with this string.Default: No filtering on subject names. Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
|
Header |
Description |
|---|---|
|
Accept |
Data format of the response body. Supported types: application/vnd.schemaregistry.v1+json, application/vnd.schemaregistry+json, and application/json. Default: application/json |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
| Status code | Description |
|---|---|
| 200 | Successful. The request was successfully processed. |
| 403 | Forbidden. The user doesn't have access rights to the specified record. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON)
|
Name |
Description |
|---|---|
|
deleted |
Flag that indicates whether the schema entry is marked as deleted.Valid values:
Data type: Boolean |
|
guid |
Globally unique identifier of the schema in the format <subject>:<version>.Data type: String |
|
id |
The numeric schema ID.Data type: Number |
|
schema |
The Avro schema definition as a JSON-encoded string.Data type: String |
|
schemaType |
The schema format (Avro).Data type: String |
|
subject |
The subject name, corresponding to the table's Stream Connect topic.Data type: String |
|
ts |
The creation timestamp for the schema record in epoch milliseconds.Data type: Number |
|
version |
The version number for the schema under this subject.Data type: Number |
This example retrieves every registered schema entry.
curl -s "https://instance.servicenow.com/api/now/schemaregistry/schemas" \ --request GET \ --header "Accept:application/vnd.schemaregistry.v1+json" \ --user 'username':'password'Response body.
[ { "subject": "sn_incident", "version": 1, "id": 1879111090, "guid": "sn_incident:1", "schemaType": "AVRO", "schema": "{\"type\":\"record\",\"name\":\"stream_producer_table\", ... }", "ts": 1781633080000, "deleted": false }, { "subject": "sn_incident", "version": 2, "id": 344617968, "guid": "sn_incident:2", "schemaType": "AVRO", "schema": "{\"type\":\"record\",\"name\":\"stream_producer_table\", ... }", "ts": 1782071298000, "deleted": false }]Schema Registry - GET /schemas/ids/{id}
Retrieves the full schema entry for the specified schema ID.
URL format
Default URL: /api/now/schemaregistry/schemas/ids/{id}
Supported request parameters
|
Name |
Description |
|---|---|
|
id |
Numeric schema ID.Table: Table Message Schema [sys_table_message_schema] Field: Schema ID Data type: Number |
|
Name |
Description |
|---|---|
|
subject |
Scopes the schema lookup to the specified subject context.Default: No filtering on subject. Returns the latest version registered for the schema across all subjects that use it. Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
|
Header |
Description |
|---|---|
|
Accept |
Data format of the response body. Supported types: application/vnd.schemaregistry.v1+json, application/vnd.schemaregistry+json, and application/json. Default: application/json |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
| Status code | Description |
|---|---|
| 200 | Successful. The request was successfully processed. |
| 403 | Forbidden. The user doesn't have access rights to the specified record. |
| 404 | Not found. The requested item wasn't found. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON)
|
Name |
Description |
|---|---|
|
deleted |
Flag that indicates whether the schema entry is marked as deleted.Valid values:
Data type: Boolean |
|
guid |
Globally unique identifier of the schema in the format <subject>:<version>.Data type: String |
|
schema |
The Avro schema definition as a JSON-encoded string.Data type: String |
|
subject |
The subject name, corresponding to the table's Stream Connect topic.Data type: String |
|
ts |
The creation timestamp for the schema record in epoch milliseconds.Data type: Number |
|
version |
The version number for the schema under this subject.Data type: Number |
This example retrieves the schema entry for schema 1879111090.
curl -s "https://instance.servicenow.com/api/now/schemaregistry/schemas/ids/1879111090" \ --request GET \ --header "Accept:application/vnd.schemaregistry.v1+json" \ --user 'username':'password'Response body.
{ "subject": "sn_incident", "version": 1, "schema": "{\"type\":\"record\",\"name\":\"stream_producer_table\", ... }", "guid": "sn_incident:1", "ts": 1781633080000, "deleted": false}Schema Registry - GET /schemas/ids/{id}/schema
Retrieves the Avro schema definition string for the specified schema ID.
To retrieve the full schema entry, including subject and version information, call GET /schemas/ids/{id}.
URL format
Default URL: /api/now/schemaregistry/schemas/ids/{id}/schema
Supported request parameters
|
Name |
Description |
|---|---|
|
id |
Numeric schema ID.Table: Table Message Schema [sys_table_message_schema] Field: Schema ID Data type: Number |
|
Name |
Description |
|---|---|
|
subject |
Scopes the schema lookup to the specified subject context.Default: No filtering on subject. Returns the latest version registered for the schema across all subjects that use it. Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
|
Header |
Description |
|---|---|
|
Accept |
Data format of the response body. Supported types: application/vnd.schemaregistry.v1+json, application/vnd.schemaregistry+json, and application/json. Default: application/json |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
| Status code | Description |
|---|---|
| 200 | Successful. The request was successfully processed. |
| 403 | Forbidden. The user doesn't have access rights to the specified record. |
| 404 | Not found. The requested item wasn't found. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON)
| Name | Description |
|---|---|
| String | The Avro schema definition as an unescaped JSON-encoded string. |
cURL request
This example retrieves the schema string for schema 1879111090.
curl -s "https://instance.servicenow.com/api/now/schemaregistry/schemas/ids/1879111090/schema" \ --request GET \ --header "Accept:application/vnd.schemaregistry.v1+json" \ --user 'username':'password'Response body.
"{\"type\":\"record\",\"name\":\"stream_producer_table\",\"fields\":[ ... ]}"Schema Registry - GET /schemas/ids/{id}/subjects
Retrieves all subjects associated with the specified schema ID.
URL format
Default URL: /api/now/schemaregistry/schemas/ids/{id}/subjects
Supported request parameters
|
Name |
Description |
|---|---|
|
id |
Numeric schema ID.Table: Table Message Schema [sys_table_message_schema] Field: Schema ID Data type: Number |
|
Name |
Description |
|---|---|
|
limit |
Maximum number of records to return. For requests that exceed this number of records, use the offset parameter to paginate record retrieval.Default: No limit Data type: Number |
|
offset |
Starting index at which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks.Default: 0 Data type: Number |
|
subject |
Scopes the schema lookup to the specified subject context. Returns only the specified subject, if associated with the schema.Default: No filtering on subject. Returns all subjects associated with the specified schema ID. Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
|
Header |
Description |
|---|---|
|
Accept |
Data format of the response body. Supported types: application/vnd.schemaregistry.v1+json, application/vnd.schemaregistry+json, and application/json. Default: application/json |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
| Status code | Description |
|---|---|
| 200 | Successful. The request was successfully processed. |
| 403 | Forbidden. The user doesn't have access rights to the specified record. |
| 404 | Not found. The requested item wasn't found. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON)
| Name | Description |
|---|---|
| Array | Array of subject name strings. |
cURL request
This example retrieves the subjects associated with schema 1879111090.
curl -s "https://instance.servicenow.com/api/now/schemaregistry/schemas/ids/1879111090/subjects" \ --request GET \ --header "Accept:application/vnd.schemaregistry.v1+json" \ --user 'username':'password'Response body.
["sn_incident"]Schema Registry - GET /schemas/ids/{id}/versions
Retrieves all subject-version pairs associated with a specified schema ID.
A schema can have multiple versions and be associated with multiple subjects. This endpoint returns every subject-version pair associated with the schema ID as a JSON array, ordered by subject and then by version.
URL format
Default URL: /api/now/schemaregistry/schemas/ids/{id}/versions
Supported request parameters
|
Name |
Description |
|---|---|
|
id |
Numeric schema ID.Table: Table Message Schema [sys_table_message_schema] Field: Schema ID Data type: Number |
|
Name |
Description |
|---|---|
|
subject |
Scopes the schema lookup to the specified subject context. Returns only versions for the specified subject.Default: No filtering on subject. Returns all subject-version pairs associated with a specified schema ID. Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
|
Header |
Description |
|---|---|
|
Accept |
Data format of the response body. Supported types: application/vnd.schemaregistry.v1+json, application/vnd.schemaregistry+json, and application/json. Default: application/json |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
| Status code | Description |
|---|---|
| 200 | Successful. The request was successfully processed. |
| 403 | Forbidden. The user doesn't have access rights to the specified record. |
| 404 | Not found. The requested item wasn't found. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON)
The response is a JSON array. Each element is an object with these fields, listed alphabetically:
|
Name |
Description |
|---|---|
|
Array |
JSON array of objects, each containing a subject-version pair. |
|
<Array>.subject |
The subject name.Data type: String |
|
<Array>.version |
The version number for the schema registered under this subject.Data type: Number |
This example retrieves all subject-version pairs for schema 1879111090.
curl -s "https://instance.servicenow.com/api/now/schemaregistry/schemas/ids/1879111090/versions" \ --request GET \ --header "Accept:application/vnd.schemaregistry.v1+json" \ --user 'username':'password'Response body.
[ { "subject": "sn_incident", "version": 1 }]Schema Registry - GET /subjects
Retrieves all subjects from the schema registry.
This endpoint returns a list of distinct subject names that have at least one registered schema version. Subjects are registered in the Table Message Schema Evolution [sys_table_message_schema_evolution] table.
URL format
Default URL: /api/now/schemaregistry/subjects
Supported request parameters
| Name | Description |
|---|---|
| None |
|
Name |
Description |
|---|---|
|
limit |
Maximum number of records to return. For requests that exceed this number of records, use the offset parameter to paginate record retrieval.Default: No limit Data type: Number |
|
offset |
Starting index at which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks.Default: 0 Data type: Number |
|
subjectPrefix |
Restrict results to subject names starting with this string.Default: No filtering on subject names. Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
|
Header |
Description |
|---|---|
|
Accept |
Data format of the response body. Supported types: application/vnd.schemaregistry.v1+json, application/vnd.schemaregistry+json, and application/json. Default: application/json |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
| Status code | Description |
|---|---|
| 200 | Successful. The request was successfully processed. |
| 403 | Forbidden. The user doesn't have access rights to the specified record. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON)
| Name | Description |
|---|---|
| Array | Array of subject name strings. |
cURL request
This example retrieves all registered subjects.
curl -s "https://instance.servicenow.com/api/now/schemaregistry/subjects" \ --request GET \ --header "Accept:application/vnd.schemaregistry.v1+json" \ --user 'username':'password'Response body.
["sn_everything_table","sn_incident","sn_problem","sn_sys_user"]Schema Registry - GET /subjects/{subject}/versions
Retrieves every version number registered under the specified subject.
URL format
Default URL: /api/now/schemaregistry/subjects/{subject}/versions
Supported request parameters
|
Name |
Description |
|---|---|
|
subject |
Subject name.Data type: String |
|
Name |
Description |
|---|---|
|
limit |
Maximum number of records to return. For requests that exceed this number of records, use the offset parameter to paginate record retrieval.Default: 10,000 Data type: Number |
|
offset |
Starting index at which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks.Default: 0 Data type: Number |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
|
Header |
Description |
|---|---|
|
Accept |
Data format of the response body. Supported types: application/vnd.schemaregistry.v1+json, application/vnd.schemaregistry+json, and application/json. Default: application/json |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
| Status code | Description |
|---|---|
| 200 | Successful. The request was successfully processed. |
| 403 | Forbidden. The user doesn't have access rights to the specified record. |
| 404 | Not found. The requested item wasn't found. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON)
| Name | Description |
|---|---|
| Array | Array of version numbers in ascending order. |
cURL request
This example retrieves the registered versions for the sn_incident subject.
curl -s "https://instance.servicenow.com/api/now/schemaregistry/subjects/sn_incident/versions" \ --request GET \ --header "Accept:application/vnd.schemaregistry.v1+json" \ --user 'username':'password'Response body.
[1,2,3]Schema Registry - GET /subjects/{subject}/versions/{version}
Retrieves the full schema entry for the specified subject and version.
URL format
Default URL: /api/now/schemaregistry/subjects/{subject}/versions/{version}
Supported request parameters
|
Name |
Description |
|---|---|
|
subject |
Subject name.Data type: String |
|
version |
Version number. To use the latest version, pass |
| Name | Description |
|---|---|
| None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
|
Header |
Description |
|---|---|
|
Accept |
Data format of the response body. Supported types: application/vnd.schemaregistry.v1+json, application/vnd.schemaregistry+json, and application/json. Default: application/json |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
| Status code | Description |
|---|---|
| 200 | Successful. The request was successfully processed. |
| 403 | Forbidden. The user doesn't have access rights to the specified record. |
| 404 | Not found. The requested item wasn't found. |
| 422 | Unprocessable content. The value provided for version isn't valid. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON)
|
Name |
Description |
|---|---|
|
deleted |
Flag that indicates whether the schema entry is marked as deleted.Valid values:
Data type: Boolean |
|
guid |
Globally unique identifier of the schema in the format <subject>:<version>.Data type: String |
|
id |
The numeric schema ID.Data type: Number |
|
schema |
The Avro schema definition as a JSON-encoded string.Data type: String |
|
schemaType |
The schema format (Avro).Data type: String |
|
subject |
The subject name, corresponding to the table's Stream Connect topic.Data type: String |
|
ts |
The creation timestamp for the schema record in epoch milliseconds.Data type: Number |
|
version |
The version number for the schema under this subject.Data type: Number |
This example retrieves the schema entry for v1 of the sn_incident subject.
curl -s "https://instance.servicenow.com/api/now/schemaregistry/subjects/sn_incident/versions/1" \ --request GET \ --header "Accept:application/vnd.schemaregistry.v1+json" \ --user 'username':'password'Response body.
{ "subject": "sn_incident", "id": 1879111090, "version": 1, "schemaType": "AVRO", "schema": "{\"type\":\"record\",\"name\":\"stream_producer_table\", ... }", "guid": "sn_incident:1", "ts": 1781633080000, "deleted": false}Schema Registry - GET /subjects/{subject}/versions/{version}/schema
Retrieves the Avro schema definition string for a specified subject and version.
To retrieve the full schema entry, including subject and version information, call GET /subjects/{subject}/versions/{version}.
URL format
Default URL: /api/now/schemaregistry/subjects/{subject}/versions/{version}/schema
Supported request parameters
|
Name |
Description |
|---|---|
|
subject |
Subject name.Data type: String |
|
version |
Version number. To use the latest version, pass |
| Name | Description |
|---|---|
| None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
|
Header |
Description |
|---|---|
|
Accept |
Data format of the response body. Supported types: application/vnd.schemaregistry.v1+json, application/vnd.schemaregistry+json, and application/json. Default: application/json |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
| Status code | Description |
|---|---|
| 200 | Successful. The request was successfully processed. |
| 403 | Forbidden. The user doesn't have access rights to the specified record. |
| 404 | Not found. The requested item wasn't found. |
| 422 | Unprocessable content. The value provided for version isn't valid. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON)
| Name | Description |
|---|---|
| String | The Avro schema definition as a raw unescaped string. |
cURL request
This example retrieves the schema definition string for v1 of the sn_incident subject.
curl -s "https://instance.servicenow.com/api/now/schemaregistry/subjects/sn_incident/versions/1/schema" \ --request GET \ --header "Accept:application/vnd.schemaregistry.v1+json" \ --user 'username':'password'Response body.
{"type":"record","name":"stream_producer_table","fields":[ ... ]}---
title: Schema Registry API
description: Use the Schema Registry API to retrieve Avro schemas generated by Stream Connect, along with their subject and version history.Retrieves all schemas. Optional query parameters can be used for filtering and pagination.Retrieves the full schema entry for the specified schema ID.Retrieves the Avro schema definition string for the specified schema ID.Retrieves all subjects associated with the specified schema ID.Retrieves all subject-version pairs associated with a specified schema ID.Retrieves all subjects from the schema registry.Retrieves every version number registered under the specified subject.Retrieves the full schema entry for the specified subject and version.Retrieves the Avro schema definition string for a specified subject and version.
locale: en-US
canonical_url: https://www.servicenow.com/docs/r/api-reference/rest-apis/schema\_registry-api.html
release: brazil
product: REST APIs
classification: rest-apis
topic_type: concept
last_updated: "2026-09-10"
reading_time_minutes: 19
keywords: [Stream Connect, schema registry, Kafka, Avro schema, schema evolution]
breadcrumb: [REST API reference, API reference, API implementation and reference]
---
# Schema Registry API
Use the Schema Registry API to retrieve Avro schemas generated by Stream Connect, along with their subject and version history.
This API is a ServiceNow implementation of the [Schema Registry API for Confluent Platform](https://docs.confluent.io/platform/current/schema-registry/develop/api.html). [Avro schemas](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/integrate-applications/schema-management.md) are generated by [Stream Connect](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/integrate-applications/stream-connect-apache-kafka.md) for tables published to Kafka. This API is read-only; schemas and their evolution history are generated and maintained internally by Stream Connect.
This API requires the ServiceNow IntegrationHub Stream Connect Schema plugin \(`com.glide.hub.stream_connect.schema`\). This plugin provides the following tables:
- Table Message Schema \[sys\_table\_message\_schema\]: Stores each generated Avro schema.
- Table Message Schema Evolution \[sys\_table\_message\_schema\_evolution\]: Tracks the subject and version for each schema. Schema subjects correspond to a table's Stream Connect topic name.
The calling user must have the message\_schema\_viewer role.
**Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-apis/api-rest.md)
## Schema Registry - GET /schemas
Retrieves all schemas. Optional query parameters can be used for filtering and pagination.
### URL format
Default URL: `/api/now/schemaregistry/schemas`
### Supported request parameters
|Name|Description|
|----|-----------|
|None| |
<table class="rest_api_query_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
latestOnly
</td><td>
Flag that indicates whether to return all schema versions for each subject in the response.Valid values:
- true: Returns only the latest schema versions for each subject in the response.
- false: Returns all schema versions for each subject in the response.
Default: false
Data type: Boolean
</td></tr><tr><td>
limit
</td><td>
Maximum number of records to return. For requests that exceed this number of records, use the **offset** parameter to paginate record retrieval.Default: 10,000
Data type: Number
</td></tr><tr><td>
offset
</td><td>
Starting index at which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks.Default: 0
Data type: Number
</td></tr><tr><td>
subjectPrefix
</td><td>
Restrict results to subject names starting with this string.Default: No filtering on subject names.
Data type: String
</td></tr></tbody>
</table>|Name|Description|
|----|-----------|
|None| |
### Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
<table class="rest_api_request_headers"><thead><tr><th>
Header
</th><th>
Description
</th></tr></thead><tbody><tr><td>
Accept
</td><td>
Data format of the response body. Supported types: **application/vnd.schemaregistry.v1+json**, **application/vnd.schemaregistry+json**, and **application/json**. Default: **application/json**
</td></tr></tbody>
</table>|Header|Description|
|------|-----------|
|None| |
### Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|Status code|Description|
|-----------|-----------|
|200|Successful. The request was successfully processed.|
|403|Forbidden. The user doesn't have access rights to the specified record.|
|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|
### Response body parameters \(JSON\)
<table><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
deleted
</td><td>
Flag that indicates whether the schema entry is marked as deleted.Valid values:
- true: The schema entry is marked as deleted.
- false: The schema entry isn't marked as deleted.
Data type: Boolean
</td></tr><tr><td>
guid
</td><td>
Globally unique identifier of the schema in the format **<subject>:<version>**.Data type: String
</td></tr><tr><td>
id
</td><td>
The numeric schema ID.Data type: Number
</td></tr><tr><td>
schema
</td><td>
The Avro schema definition as a JSON-encoded string.Data type: String
</td></tr><tr><td>
schemaType
</td><td>
The schema format \(Avro\).Data type: String
</td></tr><tr><td>
subject
</td><td>
The subject name, corresponding to the table's Stream Connect topic.Data type: String
</td></tr><tr><td>
ts
</td><td>
The creation timestamp for the schema record in epoch milliseconds.Data type: Number
</td></tr><tr><td>
version
</td><td>
The version number for the schema under this subject.Data type: Number
</td></tr></tbody>
</table>### cURL request
This example retrieves every registered schema entry.
```
curl -s "https://instance.servicenow.com/api/now/schemaregistry/schemas" \
--request GET \
--header "Accept:application/vnd.schemaregistry.v1+json" \
--user 'username':'password'
```
Response body.
```
[
{
"subject": "sn_incident",
"version": 1,
"id": 1879111090,
"guid": "sn_incident:1",
"schemaType": "AVRO",
"schema": "{\"type\":\"record\",\"name\":\"stream_producer_table\", ... }",
"ts": 1781633080000,
"deleted": false
},
{
"subject": "sn_incident",
"version": 2,
"id": 344617968,
"guid": "sn_incident:2",
"schemaType": "AVRO",
"schema": "{\"type\":\"record\",\"name\":\"stream_producer_table\", ... }",
"ts": 1782071298000,
"deleted": false
}
]
```
## Schema Registry - GET /schemas/ids/\{id\}
Retrieves the full schema entry for the specified schema ID.
### URL format
Default URL: `/api/now/schemaregistry/schemas/ids/{id}`
### Supported request parameters
<table class="rest_api_path_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
id
</td><td>
Numeric schema ID.Table: Table Message Schema \[sys\_table\_message\_schema\]
Field: Schema ID
Data type: Number
</td></tr></tbody>
</table><table class="rest_api_query_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
subject
</td><td>
Scopes the schema lookup to the specified subject context.Default: No filtering on subject. Returns the latest version registered for the schema across all subjects that use it.
Data type: String
</td></tr></tbody>
</table>|Name|Description|
|----|-----------|
|None| |
### Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
<table id="table_p53_sys_jkc" class="rest_api_request_headers"><thead><tr><th>
Header
</th><th>
Description
</th></tr></thead><tbody><tr><td>
Accept
</td><td>
Data format of the response body. Supported types: **application/vnd.schemaregistry.v1+json**, **application/vnd.schemaregistry+json**, and **application/json**. Default: **application/json**
</td></tr></tbody>
</table>|Header|Description|
|------|-----------|
|None| |
### Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|Status code|Description|
|-----------|-----------|
|200|Successful. The request was successfully processed.|
|403|Forbidden. The user doesn't have access rights to the specified record.|
|404|Not found. The requested item wasn't found.|
|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|
### Response body parameters \(JSON\)
<table><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
deleted
</td><td>
Flag that indicates whether the schema entry is marked as deleted.Valid values:
- true: The schema entry is marked as deleted.
- false: The schema entry isn't marked as deleted.
Data type: Boolean
</td></tr><tr><td>
guid
</td><td>
Globally unique identifier of the schema in the format **<subject>:<version>**.Data type: String
</td></tr><tr><td>
schema
</td><td>
The Avro schema definition as a JSON-encoded string.Data type: String
</td></tr><tr><td>
subject
</td><td>
The subject name, corresponding to the table's Stream Connect topic.Data type: String
</td></tr><tr><td>
ts
</td><td>
The creation timestamp for the schema record in epoch milliseconds.Data type: Number
</td></tr><tr><td>
version
</td><td>
The version number for the schema under this subject.Data type: Number
</td></tr></tbody>
</table>### cURL request
This example retrieves the schema entry for schema 1879111090.
```
curl -s "https://instance.servicenow.com/api/now/schemaregistry/schemas/ids/1879111090" \
--request GET \
--header "Accept:application/vnd.schemaregistry.v1+json" \
--user 'username':'password'
```
Response body.
```
{
"subject": "sn_incident",
"version": 1,
"schema": "{\"type\":\"record\",\"name\":\"stream_producer_table\", ... }",
"guid": "sn_incident:1",
"ts": 1781633080000,
"deleted": false
}
```
## Schema Registry - GET /schemas/ids/\{id\}/schema
Retrieves the Avro schema definition string for the specified schema ID.
To retrieve the full schema entry, including subject and version information, call [GET /schemas/ids/\{id\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-apis/schema_registry-api.md).
### URL format
Default URL: `/api/now/schemaregistry/schemas/ids/{id}/schema`
### Supported request parameters
<table class="rest_api_path_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
id
</td><td>
Numeric schema ID.Table: Table Message Schema \[sys\_table\_message\_schema\]
Field: Schema ID
Data type: Number
</td></tr></tbody>
</table><table class="rest_api_query_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
subject
</td><td>
Scopes the schema lookup to the specified subject context.Default: No filtering on subject. Returns the latest version registered for the schema across all subjects that use it.
Data type: String
</td></tr></tbody>
</table>|Name|Description|
|----|-----------|
|None| |
### Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
<table id="table_p53_sys_jkc" class="rest_api_request_headers"><thead><tr><th>
Header
</th><th>
Description
</th></tr></thead><tbody><tr><td>
Accept
</td><td>
Data format of the response body. Supported types: **application/vnd.schemaregistry.v1+json**, **application/vnd.schemaregistry+json**, and **application/json**. Default: **application/json**
</td></tr></tbody>
</table>|Header|Description|
|------|-----------|
|None| |
### Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|Status code|Description|
|-----------|-----------|
|200|Successful. The request was successfully processed.|
|403|Forbidden. The user doesn't have access rights to the specified record.|
|404|Not found. The requested item wasn't found.|
|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|
### Response body parameters \(JSON\)
|Name|Description|
|----|-----------|
|String|The Avro schema definition as an unescaped JSON-encoded string.|
### cURL request
This example retrieves the schema string for schema 1879111090.
```
curl -s "https://instance.servicenow.com/api/now/schemaregistry/schemas/ids/1879111090/schema" \
--request GET \
--header "Accept:application/vnd.schemaregistry.v1+json" \
--user 'username':'password'
```
Response body.
```
"{\"type\":\"record\",\"name\":\"stream_producer_table\",\"fields\":[ ... ]}"
```
## Schema Registry - GET /schemas/ids/\{id\}/subjects
Retrieves all subjects associated with the specified schema ID.
### URL format
Default URL: `/api/now/schemaregistry/schemas/ids/{id}/subjects`
### Supported request parameters
<table class="rest_api_path_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
id
</td><td>
Numeric schema ID.Table: Table Message Schema \[sys\_table\_message\_schema\]
Field: Schema ID
Data type: Number
</td></tr></tbody>
</table><table class="rest_api_query_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
limit
</td><td>
Maximum number of records to return. For requests that exceed this number of records, use the **offset** parameter to paginate record retrieval.Default: No limit
Data type: Number
</td></tr><tr><td>
offset
</td><td>
Starting index at which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks.Default: 0
Data type: Number
</td></tr><tr><td>
subject
</td><td>
Scopes the schema lookup to the specified subject context. Returns only the specified subject, if associated with the schema.Default: No filtering on subject. Returns all subjects associated with the specified schema ID.
Data type: String
</td></tr></tbody>
</table>|Name|Description|
|----|-----------|
|None| |
### Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
<table id="table_p53_sys_jkc" class="rest_api_request_headers"><thead><tr><th>
Header
</th><th>
Description
</th></tr></thead><tbody><tr><td>
Accept
</td><td>
Data format of the response body. Supported types: **application/vnd.schemaregistry.v1+json**, **application/vnd.schemaregistry+json**, and **application/json**. Default: **application/json**
</td></tr></tbody>
</table>|Header|Description|
|------|-----------|
|None| |
### Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|Status code|Description|
|-----------|-----------|
|200|Successful. The request was successfully processed.|
|403|Forbidden. The user doesn't have access rights to the specified record.|
|404|Not found. The requested item wasn't found.|
|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|
### Response body parameters \(JSON\)
|Name|Description|
|----|-----------|
|Array|Array of subject name strings.|
### cURL request
This example retrieves the subjects associated with schema 1879111090.
```
curl -s "https://instance.servicenow.com/api/now/schemaregistry/schemas/ids/1879111090/subjects" \
--request GET \
--header "Accept:application/vnd.schemaregistry.v1+json" \
--user 'username':'password'
```
Response body.
```
["sn_incident"]
```
## Schema Registry - GET /schemas/ids/\{id\}/versions
Retrieves all subject-version pairs associated with a specified schema ID.
A schema can have multiple versions and be associated with multiple subjects. This endpoint returns every subject-version pair associated with the schema ID as a JSON array, ordered by subject and then by version.
### URL format
Default URL: `/api/now/schemaregistry/schemas/ids/{id}/versions`
### Supported request parameters
<table class="rest_api_path_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
id
</td><td>
Numeric schema ID.Table: Table Message Schema \[sys\_table\_message\_schema\]
Field: Schema ID
Data type: Number
</td></tr></tbody>
</table><table class="rest_api_query_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
subject
</td><td>
Scopes the schema lookup to the specified subject context. Returns only versions for the specified subject.Default: No filtering on subject. Returns all subject-version pairs associated with a specified schema ID.
Data type: String
</td></tr></tbody>
</table>|Name|Description|
|----|-----------|
|None| |
### Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
<table id="table_p53_sys_jkc" class="rest_api_request_headers"><thead><tr><th>
Header
</th><th>
Description
</th></tr></thead><tbody><tr><td>
Accept
</td><td>
Data format of the response body. Supported types: **application/vnd.schemaregistry.v1+json**, **application/vnd.schemaregistry+json**, and **application/json**. Default: **application/json**
</td></tr></tbody>
</table>|Header|Description|
|------|-----------|
|None| |
### Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|Status code|Description|
|-----------|-----------|
|200|Successful. The request was successfully processed.|
|403|Forbidden. The user doesn't have access rights to the specified record.|
|404|Not found. The requested item wasn't found.|
|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|
### Response body parameters \(JSON\)
The response is a JSON array. Each element is an object with these fields, listed alphabetically:
<table><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
Array
</td><td>
JSON array of objects, each containing a subject-version pair.
</td></tr><tr><td>
<Array>.subject
</td><td>
The subject name.Data type: String
</td></tr><tr><td>
<Array>.version
</td><td>
The version number for the schema registered under this subject.Data type: Number
</td></tr></tbody>
</table>### cURL request
This example retrieves all subject-version pairs for schema 1879111090.
```
curl -s "https://instance.servicenow.com/api/now/schemaregistry/schemas/ids/1879111090/versions" \
--request GET \
--header "Accept:application/vnd.schemaregistry.v1+json" \
--user 'username':'password'
```
Response body.
```
[
{
"subject": "sn_incident",
"version": 1
}
]
```
## Schema Registry - GET /subjects
Retrieves all subjects from the schema registry.
This endpoint returns a list of distinct subject names that have at least one registered schema version. Subjects are registered in the Table Message Schema Evolution \[sys\_table\_message\_schema\_evolution\] table.
### URL format
Default URL: `/api/now/schemaregistry/subjects`
### Supported request parameters
|Name|Description|
|----|-----------|
|None| |
<table class="rest_api_query_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
limit
</td><td>
Maximum number of records to return. For requests that exceed this number of records, use the **offset** parameter to paginate record retrieval.Default: No limit
Data type: Number
</td></tr><tr><td>
offset
</td><td>
Starting index at which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks.Default: 0
Data type: Number
</td></tr><tr><td>
subjectPrefix
</td><td>
Restrict results to subject names starting with this string.Default: No filtering on subject names.
Data type: String
</td></tr></tbody>
</table>|Name|Description|
|----|-----------|
|None| |
### Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
<table id="table_p53_sys_jkc" class="rest_api_request_headers"><thead><tr><th>
Header
</th><th>
Description
</th></tr></thead><tbody><tr><td>
Accept
</td><td>
Data format of the response body. Supported types: **application/vnd.schemaregistry.v1+json**, **application/vnd.schemaregistry+json**, and **application/json**. Default: **application/json**
</td></tr></tbody>
</table>|Header|Description|
|------|-----------|
|None| |
### Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|Status code|Description|
|-----------|-----------|
|200|Successful. The request was successfully processed.|
|403|Forbidden. The user doesn't have access rights to the specified record.|
|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|
### Response body parameters \(JSON\)
|Name|Description|
|----|-----------|
|Array|Array of subject name strings.|
### cURL request
This example retrieves all registered subjects.
```
curl -s "https://instance.servicenow.com/api/now/schemaregistry/subjects" \
--request GET \
--header "Accept:application/vnd.schemaregistry.v1+json" \
--user 'username':'password'
```
Response body.
```
["sn_everything_table","sn_incident","sn_problem","sn_sys_user"]
```
## Schema Registry - GET /subjects/\{subject\}/versions
Retrieves every version number registered under the specified subject.
### URL format
Default URL: `/api/now/schemaregistry/subjects/{subject}/versions`
### Supported request parameters
<table class="rest_api_path_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
subject
</td><td>
Subject name.Data type: String
</td></tr></tbody>
</table><table class="rest_api_query_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
limit
</td><td>
Maximum number of records to return. For requests that exceed this number of records, use the **offset** parameter to paginate record retrieval.Default: 10,000
Data type: Number
</td></tr><tr><td>
offset
</td><td>
Starting index at which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks.Default: 0
Data type: Number
</td></tr></tbody>
</table>|Name|Description|
|----|-----------|
|None| |
### Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
<table id="table_p53_sys_jkc" class="rest_api_request_headers"><thead><tr><th>
Header
</th><th>
Description
</th></tr></thead><tbody><tr><td>
Accept
</td><td>
Data format of the response body. Supported types: **application/vnd.schemaregistry.v1+json**, **application/vnd.schemaregistry+json**, and **application/json**. Default: **application/json**
</td></tr></tbody>
</table>|Header|Description|
|------|-----------|
|None| |
### Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|Status code|Description|
|-----------|-----------|
|200|Successful. The request was successfully processed.|
|403|Forbidden. The user doesn't have access rights to the specified record.|
|404|Not found. The requested item wasn't found.|
|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|
### Response body parameters \(JSON\)
|Name|Description|
|----|-----------|
|Array|Array of version numbers in ascending order.|
### cURL request
This example retrieves the registered versions for the sn\_incident subject.
```
curl -s "https://instance.servicenow.com/api/now/schemaregistry/subjects/sn_incident/versions" \
--request GET \
--header "Accept:application/vnd.schemaregistry.v1+json" \
--user 'username':'password'
```
Response body.
```
[1,2,3]
```
## Schema Registry - GET /subjects/\{subject\}/versions/\{version\}
Retrieves the full schema entry for the specified subject and version.
### URL format
Default URL: `/api/now/schemaregistry/subjects/{subject}/versions/{version}`
### Supported request parameters
<table class="rest_api_path_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
subject
</td><td>
Subject name.Data type: String
</td></tr><tr><td>
version
</td><td>
Version number. To use the latest version, pass `latest` or `-1`. To use a specific version number, pass a positive integer.Data type: String
</td></tr></tbody>
</table>|Name|Description|
|----|-----------|
|None| |
|Name|Description|
|----|-----------|
|None| |
### Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
<table id="table_p53_sys_jkc" class="rest_api_request_headers"><thead><tr><th>
Header
</th><th>
Description
</th></tr></thead><tbody><tr><td>
Accept
</td><td>
Data format of the response body. Supported types: **application/vnd.schemaregistry.v1+json**, **application/vnd.schemaregistry+json**, and **application/json**. Default: **application/json**
</td></tr></tbody>
</table>|Header|Description|
|------|-----------|
|None| |
### Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|Status code|Description|
|-----------|-----------|
|200|Successful. The request was successfully processed.|
|403|Forbidden. The user doesn't have access rights to the specified record.|
|404|Not found. The requested item wasn't found.|
|422|Unprocessable content. The value provided for **version** isn't valid.|
|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|
### Response body parameters \(JSON\)
<table id="table_czn_wvn_kkc"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
deleted
</td><td>
Flag that indicates whether the schema entry is marked as deleted.Valid values:
- true: The schema entry is marked as deleted.
- false: The schema entry isn't marked as deleted.
Data type: Boolean
</td></tr><tr><td>
guid
</td><td>
Globally unique identifier of the schema in the format **<subject>:<version>**.Data type: String
</td></tr><tr><td>
id
</td><td>
The numeric schema ID.Data type: Number
</td></tr><tr><td>
schema
</td><td>
The Avro schema definition as a JSON-encoded string.Data type: String
</td></tr><tr><td>
schemaType
</td><td>
The schema format \(Avro\).Data type: String
</td></tr><tr><td>
subject
</td><td>
The subject name, corresponding to the table's Stream Connect topic.Data type: String
</td></tr><tr><td>
ts
</td><td>
The creation timestamp for the schema record in epoch milliseconds.Data type: Number
</td></tr><tr><td>
version
</td><td>
The version number for the schema under this subject.Data type: Number
</td></tr></tbody>
</table>### cURL request
This example retrieves the schema entry for v1 of the sn\_incident subject.
```
curl -s "https://instance.servicenow.com/api/now/schemaregistry/subjects/sn_incident/versions/1" \
--request GET \
--header "Accept:application/vnd.schemaregistry.v1+json" \
--user 'username':'password'
```
Response body.
```
{
"subject": "sn_incident",
"id": 1879111090,
"version": 1,
"schemaType": "AVRO",
"schema": "{\"type\":\"record\",\"name\":\"stream_producer_table\", ... }",
"guid": "sn_incident:1",
"ts": 1781633080000,
"deleted": false
}
```
## Schema Registry - GET /subjects/\{subject\}/versions/\{version\}/schema
Retrieves the Avro schema definition string for a specified subject and version.
To retrieve the full schema entry, including subject and version information, call [GET /subjects/\{subject\}/versions/\{version\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-apis/schema_registry-api.md).
### URL format
Default URL: `/api/now/schemaregistry/subjects/{subject}/versions/{version}/schema`
### Supported request parameters
<table class="rest_api_path_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
subject
</td><td>
Subject name.Data type: String
</td></tr><tr><td>
version
</td><td>
Version number. To use the latest version, pass `latest` or `-1`. To use a specific version number, pass a positive integer.Data type: String
</td></tr></tbody>
</table>|Name|Description|
|----|-----------|
|None| |
|Name|Description|
|----|-----------|
|None| |
### Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
<table id="table_p53_sys_jkc" class="rest_api_request_headers"><thead><tr><th>
Header
</th><th>
Description
</th></tr></thead><tbody><tr><td>
Accept
</td><td>
Data format of the response body. Supported types: **application/vnd.schemaregistry.v1+json**, **application/vnd.schemaregistry+json**, and **application/json**. Default: **application/json**
</td></tr></tbody>
</table>|Header|Description|
|------|-----------|
|None| |
### Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|Status code|Description|
|-----------|-----------|
|200|Successful. The request was successfully processed.|
|403|Forbidden. The user doesn't have access rights to the specified record.|
|404|Not found. The requested item wasn't found.|
|422|Unprocessable content. The value provided for **version** isn't valid.|
|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|
### Response body parameters \(JSON\)
|Name|Description|
|----|-----------|
|String|The Avro schema definition as a raw unescaped string.|
### cURL request
This example retrieves the schema definition string for v1 of the sn\_incident subject.
```
curl -s "https://instance.servicenow.com/api/now/schemaregistry/subjects/sn_incident/versions/1/schema" \
--request GET \
--header "Accept:application/vnd.schemaregistry.v1+json" \
--user 'username':'password'
```
Response body.
```
{"type":"record","name":"stream_producer_table","fields":[ ... ]}
```
| title | Schema Registry API |
| description | Use the Schema Registry API to retrieve Avro schemas generated by Stream Connect, along with their subject and version history.Retrieves all schemas. Optional query parameters can be used for filtering and pagination.Retrieves the full schema entry for the specified schema ID.Retrieves the Avro schema definition string for the specified schema ID.Retrieves all subjects associated with the specified schema ID.Retrieves all subject-version pairs associated with a specified schema ID.Retrieves all subjects from the schema registry.Retrieves every version number registered under the specified subject.Retrieves the full schema entry for the specified subject and version.Retrieves the Avro schema definition string for a specified subject and version. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/api-reference/rest-apis/schema\_registry-api.html |
| release | brazil |
| product | REST APIs |
| classification | rest-apis |
| topic_type | concept |
| last_updated | 2026-09-10 |
| reading_time_minutes | 19 |
| keywords | Stream Connectschema registryKafkaAvro schemaschema evolution |
| breadcrumb | REST API referenceAPI referenceAPI implementation and reference |