Azure Event Hubs Event Hubs API

Operations for managing event hubs within a namespace.

Operations 4

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs Azure Event Hubs List event hubs by namespace #
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName} Azure Event Hubs Create or update an event hub #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName} Azure Event Hubs Get an event hub #
DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName} Azure Event Hubs Delete an event hub #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure-event-hubs-event-hubs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-event-hubs-event-hubs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Azure Management REST Event Hubs API
  description: Azure Resource Manager REST API for managing Event Hubs namespaces, event hubs, consumer groups, authorization rules, disaster recovery configurations, and schema registry groups. This API uses the Microsoft.EventHub resource provider and operates on the Azure management plane at management.azure.com.
  version: '2024-01-01'
  contact:
    name: Microsoft Azure Support
    url: https://azure.microsoft.com/en-us/support/
  license:
    name: Microsoft Azure Terms of Service
    url: https://azure.microsoft.com/en-us/support/legal/
  x-logo:
    url: https://azure.microsoft.com/svghandler/event-hubs/
servers:
- url: https://management.azure.com
  description: Azure Resource Manager
security:
- azure_auth:
  - user_impersonation
tags:
- name: Event Hubs
  description: Operations for managing event hubs within a namespace.
paths:
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs
  : get:
      operationId: EventHubs_ListByNamespace
      summary: Azure Event Hubs List event hubs by namespace
      description: Gets all the Event Hubs in a Namespace.
      tags:
      - Event Hubs
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/NamespaceNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      - name: $skip
        in: query
        description: Skip is only used if a previous operation returned a partial result.
        schema:
          type: integer
          minimum: 0
          maximum: 1000
      - name: $top
        in: query
        description: May be used to limit the number of results to the most recent N event hubs.
        schema:
          type: integer
          minimum: 1
          maximum: 1000
      responses:
        '200':
          description: Successfully retrieved the list of Event Hubs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventHubListResult'
        default:
          description: Event Hubs error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}
  : put:
      operationId: EventHubs_CreateOrUpdate
      summary: Azure Event Hubs Create or update an event hub
      description: Creates or updates a new Event Hub as a nested resource within a Namespace.
      tags:
      - Event Hubs
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/NamespaceNameParameter'
      - $ref: '#/components/parameters/EventHubNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      requestBody:
        required: true
        description: Parameters supplied to create an Event Hub resource.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Eventhub'
      responses:
        '200':
          description: Event Hub successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Eventhub'
        default:
          description: Event Hubs error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      operationId: EventHubs_Get
      summary: Azure Event Hubs Get an event hub
      description: Gets an Event Hubs description for the specified Event Hub.
      tags:
      - Event Hubs
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/NamespaceNameParameter'
      - $ref: '#/components/parameters/EventHubNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully retrieved the Event Hub description.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Eventhub'
        default:
          description: Event Hubs error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      operationId: EventHubs_Delete
      summary: Azure Event Hubs Delete an event hub
      description: Deletes an Event Hub from the specified Namespace and resource group.
      tags:
      - Event Hubs
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/NamespaceNameParameter'
      - $ref: '#/components/parameters/EventHubNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Event Hub successfully deleted.
        '204':
          description: No content.
        default:
          description: Event Hubs error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      description: Error response indicates Event Hub service is not able to process the incoming request. The reason is provided in the error message.
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
    EventHubListResult:
      type: object
      description: The result of the List EventHubs operation.
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/Eventhub'
          description: Result of the List EventHubs operation.
        nextLink:
          type: string
          description: Link to the next set of results. Not empty if Value contains incomplete list of EventHubs.
    SystemData:
      type: object
      description: Metadata pertaining to creation and last modification of the resource.
      properties:
        createdBy:
          type: string
          description: The identity that created the resource.
        createdByType:
          type: string
          description: The type of identity that created the resource.
          enum:
          - User
          - Application
          - ManagedIdentity
          - Key
        createdAt:
          type: string
          format: date-time
          description: The timestamp of resource creation (UTC).
        lastModifiedBy:
          type: string
          description: The identity that last modified the resource.
        lastModifiedByType:
          type: string
          description: The type of identity that last modified the resource.
          enum:
          - User
          - Application
          - ManagedIdentity
          - Key
        lastModifiedAt:
          type: string
          format: date-time
          description: The timestamp of resource last modification (UTC).
    CaptureIdentity:
      type: object
      description: A value that indicates whether capture description is enabled.
      properties:
        type:
          type: string
          description: Type of Azure Active Directory Managed Identity.
          enum:
          - SystemAssigned
          - UserAssigned
        userAssignedIdentity:
          type: string
          description: ARM ID of Managed User Identity. This property is required if the type is UserAssignedIdentity.
    Eventhub:
      type: object
      description: Single item in List or Get Event Hub operation.
      properties:
        id:
          type: string
          readOnly: true
          description: Fully qualified resource ID for the resource.
        name:
          type: string
          readOnly: true
          description: The name of the resource.
        type:
          type: string
          readOnly: true
          description: The type of the resource.
        location:
          type: string
          readOnly: true
          description: The geo-location where the resource lives.
        properties:
          type: object
          properties:
            partitionIds:
              type: array
              items:
                type: string
              readOnly: true
              description: Current number of shards on the Event Hub.
            createdAt:
              type: string
              format: date-time
              readOnly: true
              description: Exact time the Event Hub was created.
            updatedAt:
              type: string
              format: date-time
              readOnly: true
              description: The exact time the message was updated.
            messageRetentionInDays:
              type: integer
              format: int64
              minimum: 1
              description: Number of days to retain the events for this Event Hub, value should be 1 to 7 days.
            partitionCount:
              type: integer
              format: int64
              minimum: 1
              description: Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.
            status:
              type: string
              description: Enumerates the possible values for the status of the Event Hub.
              enum:
              - Active
              - Disabled
              - Restoring
              - SendDisabled
              - ReceiveDisabled
              - Creating
              - Deleting
              - Renaming
              - Unknown
            userMetadata:
              type: string
              description: Gets and Sets Metadata of User.
            captureDescription:
              $ref: '#/components/schemas/CaptureDescription'
            retentionDescription:
              $ref: '#/components/schemas/RetentionDescription'
        systemData:
          $ref: '#/components/schemas/SystemData'
    CaptureDescription:
      type: object
      description: Properties to configure capture description for eventhub.
      properties:
        enabled:
          type: boolean
          description: A value that indicates whether capture description is enabled.
        encoding:
          type: string
          description: Enumerates the possible values for the encoding format of capture description.
          enum:
          - Avro
          - AvroDeflate
        destination:
          $ref: '#/components/schemas/Destination'
        intervalInSeconds:
          type: integer
          format: int32
          description: The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds.
        sizeLimitInBytes:
          type: integer
          format: int32
          description: The size window defines the amount of data built up in your Event Hub before a capture operation, value should be between 10485760 to 524288000 bytes.
        skipEmptyArchives:
          type: boolean
          description: A value that indicates whether to skip empty archives.
    Destination:
      type: object
      description: Capture storage details for capture description.
      properties:
        name:
          type: string
          description: Name for capture destination.
        identity:
          $ref: '#/components/schemas/CaptureIdentity'
        properties:
          type: object
          properties:
            storageAccountResourceId:
              type: string
              description: Resource id of the storage account to be used to create the blobs.
            blobContainer:
              type: string
              description: Blob container Name.
            archiveNameFormat:
              type: string
              description: Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}.
            dataLakeAccountName:
              type: string
              description: The Azure Data Lake Store name for the captured events.
            dataLakeFolderPath:
              type: string
              description: The destination folder path for the captured events.
            dataLakeSubscriptionId:
              type: string
              format: uuid
              description: Subscription Id of Azure Data Lake Store.
    ErrorDetail:
      type: object
      description: The error detail.
      properties:
        code:
          type: string
          readOnly: true
          description: The error code.
        message:
          type: string
          readOnly: true
          description: The error message.
        target:
          type: string
          readOnly: true
          description: The error target.
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
          readOnly: true
          description: The error details.
        additionalInfo:
          type: array
          items:
            $ref: '#/components/schemas/ErrorAdditionalInfo'
          readOnly: true
          description: The error additional info.
    RetentionDescription:
      type: object
      description: Properties to configure retention settings for the eventhub.
      properties:
        cleanupPolicy:
          type: string
          description: Enumerates the possible values for cleanup policy.
          enum:
          - Delete
          - Compact
        retentionTimeInHours:
          type: integer
          format: int64
          description: Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete.
        tombstoneRetentionTimeInHours:
          type: integer
          format: int32
          description: Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact.
    ErrorAdditionalInfo:
      type: object
      description: The resource management error additional info.
      properties:
        type:
          type: string
          readOnly: true
          description: The additional info type.
        info:
          type: object
          readOnly: true
          description: The additional info.
  parameters:
    EventHubNameParameter:
      name: eventHubName
      in: path
      required: true
      description: The Event Hub name.
      schema:
        type: string
        minLength: 1
        maxLength: 256
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      required: true
      description: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
      schema:
        type: string
    ApiVersionParameter:
      name: api-version
      in: query
      required: true
      description: Client API version.
      schema:
        type: string
        default: '2024-01-01'
    NamespaceNameParameter:
      name: namespaceName
      in: path
      required: true
      description: The Namespace name.
      schema:
        type: string
        minLength: 6
        maxLength: 50
        pattern: ^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$
    ResourceGroupNameParameter:
      name: resourceGroupName
      in: path
      required: true
      description: Name of the resource group within the Azure subscription.
      schema:
        type: string
        minLength: 1
        maxLength: 90
  securitySchemes:
    azure_auth:
      type: oauth2
      description: Azure Active Directory OAuth2 Flow.
      flows:
        implicit:
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
          scopes:
            user_impersonation: Impersonate your user account