Microsoft Azure Schema Registry

Microsoft Azure Schema Registry is a centralized repository that allows users to store and manage the schemas for their data in one place. It provides a platform for organizations to standardize their data structures and ensure consistency across all applications and services. By centralizing schemas, Azure Schema Registry helps to simplify data integration and governance processes, making it easier for teams to collaborate and share data.

OpenAPI Specification

azure-schema-registry-openapi-original.yml Raw ↑
swagger: '2.0'
info:
  title: Microsoft Azure Azure Schema Registry
  version: '2023-07-01'
  description: >-
    SchemaRegistryClient is a client for registering and retrieving schemas from
    the Azure Schema Registry service.
  x-typespec-generated:
    - emitter: '@azure-tools/typespec-autorest'
schemes:
  - https
x-ms-parameterized-host:
  hostTemplate: https://{fullyQualifiedNamespace}
  useSchemePrefix: false
  parameters:
    - name: fullyQualifiedNamespace
      in: path
      description: >-
        The Schema Registry service endpoint, for example
        'my-namespace.servicebus.windows.net'.
      required: true
      type: string
      format: uri
      x-ms-skip-url-encoding: true
produces:
  - application/json
consumes:
  - application/json
security:
  - OAuth2Auth:
      - https://eventhubs.azure.net/.default
securityDefinitions:
  OAuth2Auth:
    type: oauth2
    flow: implicit
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    scopes:
      https://eventhubs.azure.net/.default: ''
tags:
  - name: $schemaGroups
paths:
  /$schemaGroups:
    get:
      operationId: microsoftAzureListschemagroups
      summary: 'Microsoft Azure Get List Of Schema Groups'
      description: Gets the list of schema groups user is authorized to access.
      parameters:
        - $ref: '#/parameters/Azure.Core.Foundations.ApiVersionParameter'
      responses:
        '200':
          description: The request has succeeded.
          schema:
            $ref: '#/definitions/SchemaGroups'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Azure.Core.Foundations.ErrorResponse'
          headers:
            x-ms-error-code:
              type: string
              description: String error code indicating what went wrong.
      x-ms-examples:
        List Schema Groups:
          $ref: ./examples/ListSchemaGroups.json
      x-ms-pageable:
        nextLinkName: NextLink
      tags:
        - $schemaGroups
  /$schemaGroups/{groupName}/schemas/{schemaName}:get-id:
    post:
      operationId: microsoftAzureGetschemapropertiesbycontent
      summary: 'Microsoft Azure Get Properties For Existing Schema'
      description: >-
        Gets the properties referencing an existing schema within the specified
        schema group, as matched by schema content comparison.
      consumes:
        - application/json; serialization=Avro
        - application/json; serialization=Json
        - text/plain; charset=utf-8
        - text/vnd.ms.protobuf
      parameters:
        - $ref: '#/parameters/Azure.Core.Foundations.ApiVersionParameter'
        - name: groupName
          in: path
          description: Name of schema group.
          required: true
          type: string
        - name: schemaName
          in: path
          description: Name of schema.
          required: true
          type: string
          maxLength: 50
          pattern: ^[A-Za-z0-9][^\\/$:]*$
        - name: schemaContent
          in: body
          description: String representation (UTF-8) of the schema.
          required: true
          schema:
            type: string
            format: binary
      responses:
        '204':
          description: >-
            There is no content to send for this request, but the headers may be
            useful. 
          headers:
            Location:
              type: string
              description: >-
                URL location of schema, identified by schema group, schema name,
                and version.
            Schema-Group-Name:
              type: string
              description: References schema group.
            Schema-Id:
              type: string
              description: References specific schema in registry namespace.
            Schema-Id-Location:
              type: string
              description: URL location of schema, identified by schema ID.
            Schema-Name:
              type: string
              description: References schema name.
            Schema-Version:
              type: integer
              format: int32
              description: Version of the returned schema.
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Azure.Core.Foundations.ErrorResponse'
          headers:
            x-ms-error-code:
              type: string
              description: String error code indicating what went wrong.
      x-ms-examples:
        Get Schema Properties By Content:
          $ref: ./examples/GetSchemaPropertiesByContent.json
      tags:
        - $schemaGroups
  /$schemaGroups/{groupName}/schemas/{schemaName}:
    put:
      operationId: microsoftAzureRegisterschema
      summary: Microsoft Azure Register New Schema
      description: >-
        Register new schema. If schema of specified name does not exist in
        specified group, schema is created at version 1. If schema of specified
        name exists already in specified group, schema is created at latest
        version + 1.
      consumes:
        - application/json; serialization=Avro
        - application/json; serialization=Json
        - text/plain; charset=utf-8
        - text/vnd.ms.protobuf
      parameters:
        - $ref: '#/parameters/Azure.Core.Foundations.ApiVersionParameter'
        - name: groupName
          in: path
          description: Name of schema group.
          required: true
          type: string
        - name: schemaName
          in: path
          description: Name of schema.
          required: true
          type: string
          maxLength: 50
          pattern: ^[A-Za-z0-9][^\\/$:]*$
        - name: schemaContent
          in: body
          description: String representation (UTF-8) of the schema.
          required: true
          schema:
            type: string
            format: binary
      responses:
        '204':
          description: >-
            There is no content to send for this request, but the headers may be
            useful. 
          headers:
            Location:
              type: string
              description: >-
                URL location of schema, identified by schema group, schema name,
                and version.
            Schema-Group-Name:
              type: string
              description: References schema group.
            Schema-Id:
              type: string
              description: References specific schema in registry namespace.
            Schema-Id-Location:
              type: string
              description: URL location of schema, identified by schema ID.
            Schema-Name:
              type: string
              description: References schema name.
            Schema-Version:
              type: integer
              format: int32
              description: Version of the returned schema.
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Azure.Core.Foundations.ErrorResponse'
          headers:
            x-ms-error-code:
              type: string
              description: String error code indicating what went wrong.
      x-ms-examples:
        Register Schema:
          $ref: ./examples/RegisterSchema.json
      tags:
        - $schemaGroups
  /$schemaGroups/{groupName}/schemas/{schemaName}/versions:
    get:
      operationId: microsoftAzureListschemaversions
      summary: 'Microsoft Azure List Schema Versions'
      description: Gets the list of all versions of one schema.
      parameters:
        - $ref: '#/parameters/Azure.Core.Foundations.ApiVersionParameter'
        - name: groupName
          in: path
          description: Name of schema group.
          required: true
          type: string
        - name: schemaName
          in: path
          description: Name of schema.
          required: true
          type: string
          maxLength: 50
          pattern: ^[A-Za-z0-9][^\\/$:]*$
      responses:
        '200':
          description: The request has succeeded.
          schema:
            $ref: '#/definitions/SchemaVersions'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Azure.Core.Foundations.ErrorResponse'
          headers:
            x-ms-error-code:
              type: string
              description: String error code indicating what went wrong.
      x-ms-examples:
        List Schema Versions:
          $ref: ./examples/ListSchemaVersions.json
      x-ms-pageable:
        nextLinkName: NextLink
      tags:
        - $schemaGroups
  /$schemaGroups/{groupName}/schemas/{schemaName}/versions/{schemaVersion}:
    get:
      operationId: microsoftAzureGetschemabyversion
      summary: 'Microsoft Azure Get Specific Schema Versions'
      description: Gets one specific version of one schema.
      produces:
        - application/json; serialization=Avro
        - application/json; serialization=Json
        - text/plain; charset=utf-8
        - text/vnd.ms.protobuf
        - application/json
      parameters:
        - $ref: '#/parameters/Azure.Core.Foundations.ApiVersionParameter'
        - name: groupName
          in: path
          description: Name of schema group.
          required: true
          type: string
        - name: schemaName
          in: path
          description: Name of schema.
          required: true
          type: string
          maxLength: 50
          pattern: ^[A-Za-z0-9][^\\/$:]*$
        - name: schemaVersion
          in: path
          description: Version number of specific schema.
          required: true
          type: integer
          format: int32
      responses:
        '200':
          description: The request has succeeded.
          schema:
            type: file
          headers:
            Content-Type:
              type: string
              description: The content type for given schema.
              enum:
                - application/json; serialization=Avro
                - application/json; serialization=Json
                - text/plain; charset=utf-8
                - text/vnd.ms.protobuf
              x-ms-enum:
                name: SchemaContentTypeValues
                modelAsString: false
                values:
                  - name: avro
                    value: application/json; serialization=Avro
                  - name: json
                    value: application/json; serialization=Json
                  - name: custom
                    value: text/plain; charset=utf-8
                  - name: protobuf
                    value: text/vnd.ms.protobuf
            Location:
              type: string
              description: >-
                URL location of schema, identified by schema group, schema name,
                and version.
            Schema-Group-Name:
              type: string
              description: References schema group.
            Schema-Id:
              type: string
              description: References specific schema in registry namespace.
            Schema-Id-Location:
              type: string
              description: URL location of schema, identified by schema ID.
            Schema-Name:
              type: string
              description: References schema name.
            Schema-Version:
              type: integer
              format: int32
              description: Version of the returned schema.
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Azure.Core.Foundations.ErrorResponse'
          headers:
            x-ms-error-code:
              type: string
              description: String error code indicating what went wrong.
      x-ms-examples:
        Get Schema by Version:
          $ref: ./examples/GetSchemaByVersion.json
      tags:
        - $schemaGroups
  /$schemaGroups/$schemas/{id}:
    get:
      operationId: microsoftAzureGetschemabyid
      summary: 'Microsoft Azure Get A Registered Schema By Its Unique Id Reference'
      description: >-
        Gets a registered schema by its unique ID.  Azure Schema Registry
        guarantees that ID is unique within a namespace. Operation response type
        is based on serialization of schema requested.
      produces:
        - application/json; serialization=Avro
        - application/json; serialization=Json
        - text/plain; charset=utf-8
        - text/vnd.ms.protobuf
        - application/json
      parameters:
        - $ref: '#/parameters/Azure.Core.Foundations.ApiVersionParameter'
        - name: id
          in: path
          description: >-
            Schema ID that uniquely identifies a schema in the registry
            namespace.
          required: true
          type: string
      responses:
        '200':
          description: The request has succeeded.
          schema:
            type: file
          headers:
            Content-Type:
              type: string
              description: The content type for given schema.
              enum:
                - application/json; serialization=Avro
                - application/json; serialization=Json
                - text/plain; charset=utf-8
                - text/vnd.ms.protobuf
              x-ms-enum:
                name: SchemaContentTypeValues
                modelAsString: false
                values:
                  - name: avro
                    value: application/json; serialization=Avro
                  - name: json
                    value: application/json; serialization=Json
                  - name: custom
                    value: text/plain; charset=utf-8
                  - name: protobuf
                    value: text/vnd.ms.protobuf
            Location:
              type: string
              description: >-
                URL location of schema, identified by schema group, schema name,
                and version.
            Schema-Group-Name:
              type: string
              description: References schema group.
            Schema-Id:
              type: string
              description: References specific schema in registry namespace.
            Schema-Id-Location:
              type: string
              description: URL location of schema, identified by schema ID.
            Schema-Name:
              type: string
              description: References schema name.
            Schema-Version:
              type: integer
              format: int32
              description: Version of the returned schema.
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/Azure.Core.Foundations.ErrorResponse'
          headers:
            x-ms-error-code:
              type: string
              description: String error code indicating what went wrong.
      x-ms-examples:
        Get Schema by ID:
          $ref: ./examples/GetSchemaById.json
      tags:
        - $schemaGroups
definitions:
  Azure.Core.Foundations.Error:
    type: object
    description: The error object.
    properties:
      code:
        type: string
        description: One of a server-defined set of error codes.
      message:
        type: string
        description: A human-readable representation of the error.
      target:
        type: string
        description: The target of the error.
      details:
        type: array
        description: >-
          An array of details about specific errors that led to this reported
          error.
        items:
          $ref: '#/definitions/Azure.Core.Foundations.Error'
        x-ms-identifiers: []
      innererror:
        $ref: '#/definitions/Azure.Core.Foundations.InnerError'
        description: >-
          An object containing more specific information than the current object
          about the error.
    required:
      - code
      - message
  Azure.Core.Foundations.ErrorResponse:
    type: object
    description: A response containing error details.
    properties:
      error:
        $ref: '#/definitions/Azure.Core.Foundations.Error'
        description: The error object.
    required:
      - error
  Azure.Core.Foundations.InnerError:
    type: object
    description: >-
      An object containing more specific information about the error. As per
      Microsoft One API guidelines -
      https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
    properties:
      code:
        type: string
        description: One of a server-defined set of error codes.
      innererror:
        $ref: '#/definitions/Azure.Core.Foundations.InnerError'
        description: Inner error.
  Schema:
    type: object
    description: The schema, including its metadata and content.
    properties:
      schemaContent:
        type: string
        format: byte
        description: String representation (UTF-8) of the schema.
    required:
      - schemaContent
  SchemaContentTypeValues:
    type: string
    enum:
      - application/json; serialization=Avro
      - application/json; serialization=Json
      - text/plain; charset=utf-8
      - text/vnd.ms.protobuf
    x-ms-enum:
      name: SchemaContentTypeValues
      modelAsString: false
      values:
        - name: avro
          value: application/json; serialization=Avro
        - name: json
          value: application/json; serialization=Json
        - name: custom
          value: text/plain; charset=utf-8
        - name: protobuf
          value: text/vnd.ms.protobuf
  SchemaGroup:
    type: object
    description: Schema Group resource.
    properties:
      groupName:
        type: string
        description: Name of schema group.
        readOnly: true
    required:
      - groupName
  SchemaGroups:
    type: object
    description: The list of schema group names with server paging support.
    properties:
      Value:
        type: array
        description: The collection of pageable schema group name items.
        items:
          type: string
      NextLink:
        type: string
        description: The link to the next page of items
    required:
      - Value
  SchemaProperties:
    type: object
    description: Metadata of a schema.
  SchemaVersions:
    type: object
    description: The list of schema versions with server paging support.
    properties:
      Value:
        type: array
        description: The collection of schema version pageable items.
        items:
          type: integer
          format: int32
      NextLink:
        type: string
        description: The link to the next page of items
    required:
      - Value
  SchemasName:
    type: object
    description: Schemas resource.
    properties:
      schemaName:
        type: string
        description: Name of schema.
        maxLength: 50
        pattern: ^[A-Za-z0-9][^\\/$:]*$
        readOnly: true
    required:
      - schemaName
  ServiceVersion:
    type: string
    description: Represents the Schema Registry API version to use for requests.
    enum:
      - 2021-10
      - 2022-10
      - '2023-07-01'
    x-ms-enum:
      name: ServiceVersion
      modelAsString: true
      values:
        - name: V2021_10
          value: 2021-10
          description: Azure Schema Registry 2021-10 Version
        - name: V2022_10
          value: 2022-10
          description: Azure Schema Registry 2022-10 Version
        - name: V2023_07_01
          value: '2023-07-01'
          description: >-
            Azure Schema Registry 2023-07-01 Version. This is the default
            version.
parameters:
  Azure.Core.Foundations.ApiVersionParameter:
    name: api-version
    in: query
    description: The API version to use for this operation.
    required: true
    type: string
    minLength: 1
    x-ms-parameter-location: method
    x-ms-client-name: apiVersion