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
    • Empower Replay: Limited Edition
    • Tutorials
    • 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
    • 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
      • System Architecture
      • DataMiner Releases & Updates
    • 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

GQI data source error

Solved670 views22nd January 2024GQI
0
Carl Stanley [DevOps Enabler]14 22nd January 2024 0 Comments

Hi,

I have a low code app and I’ve configured an adhoc data source to get data from an API, however the request to the API doesn’t seem to be working properly.

The API endpoint takes a search from date and search to date so I’ve been constructing my request like this:

var searchfrom = DateTime.Now.AddDays(-1).ToString();
var searchTo = DateTime.Now.ToString();

var URL = ($”http://uklovrtbsswba01:8552/api/deletionlist/deletionLog?SearchDateFrom={searchfrom}&SearchDateTo={searchTo}”);
var request = WebRequest.Create(URL);

However the API always returns 400 Bad Request.

If I change my URL to hard typed values like this:

var URL = ($”http://uklovrtbsswba01:8552/api/deletionlist/deletionLog?SearchDateFrom=21/01/2024&SearchDateTo=22/01/2024″);

Everything works perfectly and the API returns a 200 response with data.

I’m struggling to see what’s going wrong here, why is the first format not returning the expected result, does something happen to it during compilation? Is there a suggested way to insert variables into the URL in this case that will work with Dataminer?

Thanks!

Carl Stanley [DevOps Enabler] Selected answer as best 22nd January 2024

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
6
Jochen Dewachter [SLC] [DevOps Advocate]2.16K Posted 22nd January 2024 1 Comment

Hi Carl

I’m not so sure if this is really GQI related. It seems to me that this is related to the format of your DateTime.
If you do a .ToString() on your DateTime object, you’re not sure that the result will be in a format like ’21/01/2024′, it might even include timing. Try specifying the DateTime format that your API expects: .ToString(“dd/MM/yyyy”);

https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tostring?view=net-8.0

Carl Stanley [DevOps Enabler] Selected answer as best 22nd January 2024
Jochen Dewachter [SLC] [DevOps Advocate] commented 22nd January 2024

Maybe you’ll also need URL encoding. https://learn.microsoft.com/en-us/dotnet/api/system.web.httputility.urlencode?view=net-8.0

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
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