Can Eventhub management endpoints return json (in stead of xml)

Wit, Nol de 0 Reputation points
Nov 20, 2024, 8:58 AM

When querying fore some status information like described here (https://video2.skills-academy.com/en-us/rest/api/eventhub/list-consumer-groups) i get a XML response.
I've tried with a request accept header requesting json (Accept: application/json), but still i get XML responses.
Will JSON responses ever be supported? I rather not parse XML while the rest of my client is fully on JSON. (And converting the XML to JSON is beyond the point.)

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,197 questions
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
651 questions
{count} votes

1 answer

Sort by: Most helpful
  1. phemanth 11,475 Reputation points Microsoft Vendor
    Nov 20, 2024, 6:43 PM

    @Wit, Nol de

    Thanks for reaching out to Microsoft Q&A.

    Currently, Azure Event Hub management endpoints primarily return responses in XML format, even when you specify an Accept: application/json header. Unfortunately, as of now, JSON responses are not supported for these management endpoints.

    While there hasn’t been an official announcement regarding future support for JSON responses, many users have expressed a preference for JSON due to its compatibility with modern applications. It’s worth keeping an eye on the Azure updates or the official documentation for any changes in this regard.

    In the meantime, if you need to work with XML, you might consider using libraries that can help parse XML into JSON format programmatically, which could streamline your workflow.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.