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
  • Updates & Insights
  • 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
    • 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
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Help automation script

Solved541 views27th September 2024
-1
Marco Virdis416 23rd September 2024 1 Comment

Dear Dojo,

I’m trying to implement my first automation script with terrible results. I am writing code for an automation script that simply executes an HTTP POST through an api url, can anyone help me please? Thanks.

Marco Virdis Selected answer as best 27th September 2024
Michiel Saelen [SLC] [DevOps Enabler] commented 27th September 2024

Would it be an option to use engineering services to support you, so you can get on call and to get personal training or to let the person develop the script/LCA?

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
2
Tom Waterbley [SLC] [DevOps Catalyst]8.89K Posted 23rd September 2024 1 Comment

Hi Marco,

Could you please clarify what you mean with “terrible results”? What exactly have you tried, and which specific problems are you encountering?

One way to execute the HTTP POST request is by using the HttpClient class.
First of all, a reference to the “System.Net.Http” assembly needs to be added to your C# project. This is explained here: https://learn.microsoft.com/en-us/shows/csharp-fundamentals-for-absolute-beginners/creating-and-adding-references-to-assemblies.

Next, add the following using directive at the top of your C# file:

using System.Net.Http;

Here’s a basic example of how to use HttpClient to send a POST request:

using (var httpClient = new HttpClient())
{
   var jsonContent = “…”;
   var content = new StringContent(jsonContent, Encoding.UTF8, “application/json”);
   httpClient.PostAsync(@”http:\\www.example.com”, content);
}

Hopefully this helps you further. Let me know if you have further questions or need additional guidance.

Marco Virdis Selected answer as best 27th September 2024
Marco Virdis commented 24th September 2024

Hi Tom. The truth is that I don’t understand how the automation script works. I have seen many tutorials but I still don’t understand. I need a script that will make an HTTP POST request to an URL with parameters. This script will be used in a low code application after a button is clicked. Thanks in advance

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