Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

API Response with Brotli compression in Connector

635 views29th January 2025API Brotli compression HTTP protocol
1
Nick Chirumbolo [DevOps Advocate]679 24th October 2024 4 Comments

I'm currently using a product with a custom Protocol which has updated some of their API endpoints. Although the new endpoints are decoding properly in Postman requests, they are now showing up as random characters in my connector logs even before running through the JSON parser. I've traced it to the fact that they are using Brotli instead of GZip to compress the response body and I am seeing what looks like raw compressed data. Is there an easy way to get the decompressed content?

Also to note, I can't even take the response body and decode it myself since it is not capturing the entire body. In an example request, the expected response is a large JSON object (10.95 KB according to Postman), but when calling GetParameter I am getting a string of length 24.

Here is the XML for this particular request:

.<HTTP>

.  <Session id="104" name="Get Data" loginMethod="credentials" userName="100" password="101">
.    <Connection id="1">
.      <Request verb="GET" url="/data"/>
.      <Response statusCode="304">
.        <Content pid="404"/>
.      </Response>
.    </Connection>
.  </Session>

.</HTTP>

Parameter 404 contains: [ýEýq@ 2NGQ&iýTýaý 8ý

Thanks!

Nick Chirumbolo [DevOps Advocate] Posted new comment 29th January 2025
Marieke Goethals [SLC] [DevOps Catalyst] commented 28th January 2025

I see that this question has been inactive for some time. Do you still need help with this? If not, could you select the answer (using the ✓ icon) to indicate that the question is resolved?

Nick Chirumbolo [DevOps Advocate] commented 29th January 2025

This was never resolved. We just skipped including information from this endpoint and are requesting that the vendor honors the accept-encoding header in a future release.

Marieke Goethals [SLC] [DevOps Catalyst] commented 29th January 2025

Do you still want us to look into this further, or is this no longer needed?

Nick Chirumbolo [DevOps Advocate] commented 29th January 2025

It's not a high priority, but it would be helpful if this could be looked into.

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
2
João Severino [SLC] [DevOps Catalyst]12.94K Posted 25th October 2024 6 Comments

Hi Nick,

Could you check if instead of using a GetParameter call, calling the GetData method from within your QAction would return a byte array with the expected size?

The reasoning is that compressed data very often contains the byte with the value 0, which, when parsed to a string, indicates its termination.

Although I am not too familiar with the specifics of Brotli, you should be able to pass the binary data to the library and have it decoded.

Nick Chirumbolo [DevOps Advocate] Edited comment 25th October 2024
Nick Chirumbolo [DevOps Advocate] commented 25th October 2024

Unfortunately, that did not work. GetData returns a Byte Array but it is still of length 24. What’s strange is Brotli decompression is normally handled by default in .NET. I’m going to check the versioning on my .NET frameworks and nugets since I know it is a relatively new feature.

Nick Chirumbolo [DevOps Advocate] commented 25th October 2024

Do you happen to know if the backend on Dataminer uses the standard HttpClient class to handle these requests? And if it sets the HttpClientHandler.AutomaticDecompression property to something besides the default (None)?

João Severino [SLC] [DevOps Catalyst] commented 25th October 2024

Do note that QActions in DataMiner are compiled with .NET Framework and not .NET so libraries may not be available by default.

João Severino [SLC] [DevOps Catalyst] commented 25th October 2024

DataMiner’s backend for polling if you use HTTP sessions defined in the XML (see https://docs.dataminer.services/develop/schemadoc/Protocol/Protocol.HTTP.html) is written in C++ so it does use slightly different logic than what is available in .NET

But if you can define any header like “gzip, deflate” similar to the example then DataMiner should also be able to process it.

Nick Chirumbolo [DevOps Advocate] commented 25th October 2024

Got it, I just ran a version check within the Protocol and I see the problem. It is using v4.0.0.0 of System.Net.Http, Brotli decompression was added as a default in 4.3.2 or can be added manually in 4.1.2 (I believe).
If I update the version of .NET Framework on the server should that fix this? Or are these libraries statically linked?

Show 1 more comments
You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Web Applications exception in Cube due to invalid certificate 0 Answers | 0 Votes
Redundancy Groups and Alarming – Duplicate Alarms 0 Answers | 0 Votes
Correlation Engine: “Test rule” doesn’t result in a hit, despite functional rule 1 Answer | 3 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (151) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin