Retrieve a schema for the subject and version.

GET /subjects/{subject}/versions/{version}

Path parameters

  • subject string Required

    The subject name. Use [:.:] for context-qualified subjects, or just for the default context.

  • version string Required

    The schema version to retrieve. Use an integer for a specific version or 'latest' for the most recent version.

Query parameters

  • deleted boolean
  • format string

    Redpanda version 25.2 or later. For Avro and Protobuf schemas only. Supported values: an empty string '' returns the schema in its current format (default), and serialized (Protobuf only) returns the schema in its Base64-encoded wire binary format. Unsupported values return a 501 error.

Responses

  • OK

    Hide response attributes Show response attributes object
    • subject string
    • version integer
    • id integer
    • schemaType string
    • references array[object]
      Hide references attributes Show references attributes object
      • name string

        The name used to reference this schema in the dependent schema definition.

      • subject string

        The subject name of the referenced schema. Use [:.:] for context-qualified subjects, or just for the default context.

      • version integer

        The version of the referenced schema.

    • metadata object
      Hide metadata attribute Show metadata attribute object
      • properties object
        Hide properties attribute Show properties attribute object
        • * string Additional properties
    • schema string
    • deleted boolean
    Hide response attributes Show response attributes object
    • subject string
    • version integer
    • id integer
    • schemaType string
    • references array[object]
      Hide references attributes Show references attributes object
      • name string

        The name used to reference this schema in the dependent schema definition.

      • subject string

        The subject name of the referenced schema. Use [:.:] for context-qualified subjects, or just for the default context.

      • version integer

        The version of the referenced schema.

    • metadata object
      Hide metadata attribute Show metadata attribute object
      • properties object
        Hide properties attribute Show properties attribute object
        • * string Additional properties
    • schema string
    • deleted boolean
    Hide response attributes Show response attributes object
    • subject string
    • version integer
    • id integer
    • schemaType string
    • references array[object]
      Hide references attributes Show references attributes object
      • name string

        The name used to reference this schema in the dependent schema definition.

      • subject string

        The subject name of the referenced schema. Use [:.:] for context-qualified subjects, or just for the default context.

      • version integer

        The version of the referenced schema.

    • metadata object
      Hide metadata attribute Show metadata attribute object
      • properties object
        Hide properties attribute Show properties attribute object
        • * string Additional properties
    • schema string
    • deleted boolean
  • Not Found: Schema not found

    Hide response attributes Show response attributes object
    • error_code integer
    • message string
    Hide response attributes Show response attributes object
    • error_code integer
    • message string
    Hide response attributes Show response attributes object
    • error_code integer
    • message string
  • Invalid version

    Hide response attributes Show response attributes object
    • error_code integer
    • message string
    Hide response attributes Show response attributes object
    • error_code integer
    • message string
    Hide response attributes Show response attributes object
    • error_code integer
    • message string
  • Internal Server Error

    Hide response attributes Show response attributes object
    • error_code integer
    • message string
    Hide response attributes Show response attributes object
    • error_code integer
    • message string
    Hide response attributes Show response attributes object
    • error_code integer
    • message string
  • Not Implemented: The specified format parameter value is not supported

    Hide response attributes Show response attributes object
    • error_code integer
    • message string
    Hide response attributes Show response attributes object
    • error_code integer
    • message string
    Hide response attributes Show response attributes object
    • error_code integer
    • message string
GET /subjects/{subject}/versions/{version}
curl \
 --request GET 'http://localhost:8081/subjects/{subject}/versions/{version}'
Response examples (200)
{
  "subject": "string",
  "version": 42,
  "id": 42,
  "schemaType": "string",
  "references": [
    {
      "name": "string",
      "subject": "string",
      "version": 42
    }
  ],
  "metadata": {
    "properties": {
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    }
  },
  "schema": "string",
  "deleted": true
}
Response examples (200)
{
  "subject": "string",
  "version": 42,
  "id": 42,
  "schemaType": "string",
  "references": [
    {
      "name": "string",
      "subject": "string",
      "version": 42
    }
  ],
  "metadata": {
    "properties": {
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    }
  },
  "schema": "string",
  "deleted": true
}
Response examples (200)
{
  "subject": "string",
  "version": 42,
  "id": 42,
  "schemaType": "string",
  "references": [
    {
      "name": "string",
      "subject": "string",
      "version": 42
    }
  ],
  "metadata": {
    "properties": {
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    }
  },
  "schema": "string",
  "deleted": true
}
Response examples (404)
{
  "error_code": 42,
  "message": "string"
}
Response examples (404)
{
  "error_code": 42,
  "message": "string"
}
Response examples (404)
{
  "error_code": 42,
  "message": "string"
}
Response examples (422)
{
  "error_code": 42,
  "message": "string"
}
Response examples (422)
{
  "error_code": 42,
  "message": "string"
}
Response examples (422)
{
  "error_code": 42,
  "message": "string"
}
Response examples (500)
{
  "error_code": 42,
  "message": "string"
}
Response examples (500)
{
  "error_code": 42,
  "message": "string"
}
Response examples (500)
{
  "error_code": 42,
  "message": "string"
}
Response examples (501)
{
  "error_code": 42,
  "message": "string"
}
Response examples (501)
{
  "error_code": 42,
  "message": "string"
}
Response examples (501)
{
  "error_code": 42,
  "message": "string"
}