Skip to main content

Retrieve the latest version with the given metadata.

GET 

/subjects/:subject/metadata

Retrieve the latest version with the given metadata.

Request

Responses

The schema.

OpenAPI definition (YAML)
paths:
  /subjects/{subject}/metadata:
    get:
      tags:
      - Subjects (v1)
      description: Retrieve the latest version with the given metadata.
      operationId: getLatestWithMetadata
      parameters:
      - name: subject
        in: path
        description: Subject under which the schema will be registered
        required: true
        schema:
          type: string
      - name: key
        in: query
        description: The metadata key. Add "?key=key" at the end of the request to match a metadata key.
          This query parameter can appear multiple times. Each instance is matched with a corresponding
          value query parameter, in order.
        schema:
          type: string
      - name: value
        in: query
        description: The metadata value. Add "?value=value" at the end of the request to match a metadata
          value. This query parameter can appear multiple times. Each instance is matched with a corresponding
          key query parameter, in order.
        schema:
          type: string
      - name: format
        in: query
        description: 'Desired output format, dependent on schema type. For AVRO schemas, valid values
          are: " " (default) or "resolved". For PROTOBUF schemas, valid values are: " " (default), "ignore_extensions",
          or "serialized" (The parameter does not apply to JSON schemas.)'
        schema:
          type: string
          default: ''
      - name: deleted
        in: query
        description: Whether to lookup deleted schemas
        schema:
          type: boolean
      responses:
        '200':
          description: The schema.
          content:
            application/vnd.schemaregistry.v1+json:
              schema:
                type: object
                properties:
                  subject:
                    type: string
                    description: Name of the subject
                    example: User
                  version:
                    type: integer
                    description: Version number
                    format: int32
                    example: 1
                  id:
                    type: integer
                    description: Globally unique identifier of the schema
                    format: int32
                    example: 100001
                  schemaType:
                    type: string
                    description: Schema type
                    example: AVRO
                  references:
                    type: array
                    description: References to other schemas
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Reference name
                          example: io.confluent.kafka.example.User
                        subject:
                          type: string
                          description: Name of the referenced subject
                          example: User
                        version:
                          type: integer
                          description: Version number of the referenced subject
                          format: int32
                          example: 1
                      description: Schema reference
                      title: SchemaReference
                  schema:
                    type: string
                    description: Schema definition string
                    example: '{"schema": "{"type": "string"}"}'
                  metadata:
                    description: User-defined metadata
                    nullable: true
                    properties:
                      tags:
                        additionalProperties:
                          items:
                            type: string
                          type: array
                          uniqueItems: true
                        type: object
                      properties:
                        additionalProperties:
                          type: string
                        type: object
                      sensitive:
                        items:
                          type: string
                        type: array
                        uniqueItems: true
                    type: object
                    title: Metadata
                  ruleSet:
                    description: Schema rule set
                    nullable: true
                    properties:
                      migrationRules:
                        items:
                          description: Rule
                          properties:
                            name:
                              description: Rule name
                              type: string
                            doc:
                              description: Rule doc
                              type: string
                            kind:
                              description: Rule kind
                              enum:
                              - TRANSFORM
                              - CONDITION
                              type: string
                            mode:
                              description: Rule mode
                              enum:
                              - UPGRADE
                              - DOWNGRADE
                              - UPDOWN
                              - WRITE
                              - READ
                              - WRITEREAD
                              type: string
                            type:
                              description: Rule type
                              type: string
                            tags:
                              description: The tags to which this rule applies
                              items:
                                description: The tags to which this rule applies
                                type: string
                              type: array
                              uniqueItems: true
                            params:
                              additionalProperties:
                                description: Optional params for the rule
                                type: string
                              description: Optional params for the rule
                              type: object
                            expr:
                              description: Rule expression
                              type: string
                            onSuccess:
                              description: Rule action on success
                              type: string
                            onFailure:
                              description: Rule action on failure
                              type: string
                            disabled:
                              description: Whether the rule is disabled
                              type: boolean
                          type: object
                          title: Rule
                        type: array
                      domainRules:
                        items:
                          description: Rule
                          properties:
                            name:
                              description: Rule name
                              type: string
                            doc:
                              description: Rule doc
                              type: string
                            kind:
                              description: Rule kind
                              enum:
                              - TRANSFORM
                              - CONDITION
                              type: string
                            mode:
                              description: Rule mode
                              enum:
                              - UPGRADE
                              - DOWNGRADE
                              - UPDOWN
                              - WRITE
                              - READ
                              - WRITEREAD
                              type: string
                            type:
                              description: Rule type
                              type: string
                            tags:
                              description: The tags to which this rule applies
                              items:
                                description: The tags to which this rule applies
                                type: string
                              type: array
                              uniqueItems: true
                            params:
                              additionalProperties:
                                description: Optional params for the rule
                                type: string
                              description: Optional params for the rule
                              type: object
                            expr:
                              description: Rule expression
                              type: string
                            onSuccess:
                              description: Rule action on success
                              type: string
                            onFailure:
                              description: Rule action on failure
                              type: string
                            disabled:
                              description: Whether the rule is disabled
                              type: boolean
                          type: object
                          title: Rule
                        type: array
                    type: object
                    title: RuleSet
                  schemaTags:
                    type: array
                    description: Schema tags
                    items:
                      type: object
                      properties:
                        schemaEntity:
                          type: object
                          properties:
                            entityPath:
                              type: string
                            entityType:
                              type: string
                              enum:
                              - sr_record
                              - sr_field
                          title: SchemaEntity
                        tags:
                          type: array
                          items:
                            type: string
                      title: SchemaTags
                description: Schema
                title: Schema
            application/vnd.schemaregistry+json; qs=0.9:
              schema:
                type: object
                properties:
                  subject:
                    type: string
                    description: Name of the subject
                    example: User
                  version:
                    type: integer
                    description: Version number
                    format: int32
                    example: 1
                  id:
                    type: integer
                    description: Globally unique identifier of the schema
                    format: int32
                    example: 100001
                  schemaType:
                    type: string
                    description: Schema type
                    example: AVRO
                  references:
                    type: array
                    description: References to other schemas
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Reference name
                          example: io.confluent.kafka.example.User
                        subject:
                          type: string
                          description: Name of the referenced subject
                          example: User
                        version:
                          type: integer
                          description: Version number of the referenced subject
                          format: int32
                          example: 1
                      description: Schema reference
                      title: SchemaReference
                  schema:
                    type: string
                    description: Schema definition string
                    example: '{"schema": "{"type": "string"}"}'
                  metadata:
                    description: User-defined metadata
                    nullable: true
                    properties:
                      tags:
                        additionalProperties:
                          items:
                            type: string
                          type: array
                          uniqueItems: true
                        type: object
                      properties:
                        additionalProperties:
                          type: string
                        type: object
                      sensitive:
                        items:
                          type: string
                        type: array
                        uniqueItems: true
                    type: object
                    title: Metadata
                  ruleSet:
                    description: Schema rule set
                    nullable: true
                    properties:
                      migrationRules:
                        items:
                          description: Rule
                          properties:
                            name:
                              description: Rule name
                              type: string
                            doc:
                              description: Rule doc
                              type: string
                            kind:
                              description: Rule kind
                              enum:
                              - TRANSFORM
                              - CONDITION
                              type: string
                            mode:
                              description: Rule mode
                              enum:
                              - UPGRADE
                              - DOWNGRADE
                              - UPDOWN
                              - WRITE
                              - READ
                              - WRITEREAD
                              type: string
                            type:
                              description: Rule type
                              type: string
                            tags:
                              description: The tags to which this rule applies
                              items:
                                description: The tags to which this rule applies
                                type: string
                              type: array
                              uniqueItems: true
                            params:
                              additionalProperties:
                                description: Optional params for the rule
                                type: string
                              description: Optional params for the rule
                              type: object
                            expr:
                              description: Rule expression
                              type: string
                            onSuccess:
                              description: Rule action on success
                              type: string
                            onFailure:
                              description: Rule action on failure
                              type: string
                            disabled:
                              description: Whether the rule is disabled
                              type: boolean
                          type: object
                          title: Rule
                        type: array
                      domainRules:
                        items:
                          description: Rule
                          properties:
                            name:
                              description: Rule name
                              type: string
                            doc:
                              description: Rule doc
                              type: string
                            kind:
                              description: Rule kind
                              enum:
                              - TRANSFORM
                              - CONDITION
                              type: string
                            mode:
                              description: Rule mode
                              enum:
                              - UPGRADE
                              - DOWNGRADE
                              - UPDOWN
                              - WRITE
                              - READ
                              - WRITEREAD
                              type: string
                            type:
                              description: Rule type
                              type: string
                            tags:
                              description: The tags to which this rule applies
                              items:
                                description: The tags to which this rule applies
                                type: string
                              type: array
                              uniqueItems: true
                            params:
                              additionalProperties:
                                description: Optional params for the rule
                                type: string
                              description: Optional params for the rule
                              type: object
                            expr:
                              description: Rule expression
                              type: string
                            onSuccess:
                              description: Rule action on success
                              type: string
                            onFailure:
                              description: Rule action on failure
                              type: string
                            disabled:
                              description: Whether the rule is disabled
                              type: boolean
                          type: object
                          title: Rule
                        type: array
                    type: object
                    title: RuleSet
                  schemaTags:
                    type: array
                    description: Schema tags
                    items:
                      type: object
                      properties:
                        schemaEntity:
                          type: object
                          properties:
                            entityPath:
                              type: string
                            entityType:
                              type: string
                              enum:
                              - sr_record
                              - sr_field
                          title: SchemaEntity
                        tags:
                          type: array
                          items:
                            type: string
                      title: SchemaTags
                description: Schema
                title: Schema
            application/json; qs=0.5:
              schema:
                type: object
                properties:
                  subject:
                    type: string
                    description: Name of the subject
                    example: User
                  version:
                    type: integer
                    description: Version number
                    format: int32
                    example: 1
                  id:
                    type: integer
                    description: Globally unique identifier of the schema
                    format: int32
                    example: 100001
                  schemaType:
                    type: string
                    description: Schema type
                    example: AVRO
                  references:
                    type: array
                    description: References to other schemas
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Reference name
                          example: io.confluent.kafka.example.User
                        subject:
                          type: string
                          description: Name of the referenced subject
                          example: User
                        version:
                          type: integer
                          description: Version number of the referenced subject
                          format: int32
                          example: 1
                      description: Schema reference
                      title: SchemaReference
                  schema:
                    type: string
                    description: Schema definition string
                    example: '{"schema": "{"type": "string"}"}'
                  metadata:
                    description: User-defined metadata
                    nullable: true
                    properties:
                      tags:
                        additionalProperties:
                          items:
                            type: string
                          type: array
                          uniqueItems: true
                        type: object
                      properties:
                        additionalProperties:
                          type: string
                        type: object
                      sensitive:
                        items:
                          type: string
                        type: array
                        uniqueItems: true
                    type: object
                    title: Metadata
                  ruleSet:
                    description: Schema rule set
                    nullable: true
                    properties:
                      migrationRules:
                        items:
                          description: Rule
                          properties:
                            name:
                              description: Rule name
                              type: string
                            doc:
                              description: Rule doc
                              type: string
                            kind:
                              description: Rule kind
                              enum:
                              - TRANSFORM
                              - CONDITION
                              type: string
                            mode:
                              description: Rule mode
                              enum:
                              - UPGRADE
                              - DOWNGRADE
                              - UPDOWN
                              - WRITE
                              - READ
                              - WRITEREAD
                              type: string
                            type:
                              description: Rule type
                              type: string
                            tags:
                              description: The tags to which this rule applies
                              items:
                                description: The tags to which this rule applies
                                type: string
                              type: array
                              uniqueItems: true
                            params:
                              additionalProperties:
                                description: Optional params for the rule
                                type: string
                              description: Optional params for the rule
                              type: object
                            expr:
                              description: Rule expression
                              type: string
                            onSuccess:
                              description: Rule action on success
                              type: string
                            onFailure:
                              description: Rule action on failure
                              type: string
                            disabled:
                              description: Whether the rule is disabled
                              type: boolean
                          type: object
                          title: Rule
                        type: array
                      domainRules:
                        items:
                          description: Rule
                          properties:
                            name:
                              description: Rule name
                              type: string
                            doc:
                              description: Rule doc
                              type: string
                            kind:
                              description: Rule kind
                              enum:
                              - TRANSFORM
                              - CONDITION
                              type: string
                            mode:
                              description: Rule mode
                              enum:
                              - UPGRADE
                              - DOWNGRADE
                              - UPDOWN
                              - WRITE
                              - READ
                              - WRITEREAD
                              type: string
                            type:
                              description: Rule type
                              type: string
                            tags:
                              description: The tags to which this rule applies
                              items:
                                description: The tags to which this rule applies
                                type: string
                              type: array
                              uniqueItems: true
                            params:
                              additionalProperties:
                                description: Optional params for the rule
                                type: string
                              description: Optional params for the rule
                              type: object
                            expr:
                              description: Rule expression
                              type: string
                            onSuccess:
                              description: Rule action on success
                              type: string
                            onFailure:
                              description: Rule action on failure
                              type: string
                            disabled:
                              description: Whether the rule is disabled
                              type: boolean
                          type: object
                          title: Rule
                        type: array
                    type: object
                    title: RuleSet
                  schemaTags:
                    type: array
                    description: Schema tags
                    items:
                      type: object
                      properties:
                        schemaEntity:
                          type: object
                          properties:
                            entityPath:
                              type: string
                            entityType:
                              type: string
                              enum:
                              - sr_record
                              - sr_field
                          title: SchemaEntity
                        tags:
                          type: array
                          items:
                            type: string
                      title: SchemaTags
                description: Schema
                title: Schema
        '404':
          description: 'Error code 40401 -- Subject not found

            Error code 40403 -- Schema not found'
        '500':
          description: Internal Server Error.
      security:
      - resource-api-key: []
      - external-access-token: []
      servers:
      - url: https://psrc-00000.region.provider.confluent.cloud
        description: Confluent Cloud Schema Registry Endpoint.