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
    • Agility
      • Kanban workshop
      • Agile Fundamentals
    • 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
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • Support
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Protocol HTTP

Solved128 views4th June 2025
1
Jose Araujo [DevOps Advocate]557 3rd June 2025 0 Comments

Hi,

I create a protocol using http, I have doubt about how can login correctly:

this is my endpoint: api/v1/system/configuration/login

I need send:
header:
Content-Type : aplication/json

Body:
{
"user":"admin",
"password":"admin123"
}
the endpoint reply :
Body:
{
"token": "0fe99819879b419db34bb8b627a958ce", (only need this value and set in param name token)
"user": "Admin"
}

I create this session but didn't work :

<Sessionid="2"name="API Login">

<Connection id="1" name="Credentials">

<Request verb="POST" url="api/v1/system/configuration/login">

<Headers>

<Header key="Content-Type">aplication/json</Header>

<Header key="user" pid="10"></Header> (param with username )

<Header key="password" pid ="11"></Header> ( param with password )

</Headers>

</Request>

<Response status Code="2">

<Contentpid="12"  ></Content>

</Response>

</Connection>

</Session>

pid 12 no have nothing I need set with token value.

what happen if token expire and status code is 401, login automatically?

thanks

Jose Araujo [DevOps Advocate] Selected answer as best 4th June 2025

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
4
Nejra Fehratovic [SLC] [DevOps Advocate]200 Posted 3rd June 2025 1 Comment

Hi Jose,

I think the problem might be in the way the body is handled. You’re putting "user" and "password" in headers. But the API expects them in the JSON body, not headers.

The only header needed is Content-Type: application/json (Also note the typo: aplication/json → should be application/json).

Instead of setting the username and password in the headers, you can include them in the body using the <Parameters> tag, which automatically formats them as JSON for POST requests.

For example:
<Request verb="GET" url="Example.html">
<Parameters>
<Parameter key="a">Example value!</Parameter>
<Parameter key="b">20</Parameter>
</Parameters>
</Request>

This way, you don't need to manually construct the JSON body—DataMiner will do that for you. Just make sure the Content-Type header is correctly set to application/json, and the system will send a properly formatted request like:

{
"user": "admin",
"password": "admin123"
}
You can find more info here: Implementing HTTP communication | DataMiner Docs

You also asked "What happens if token expires and status code is 401?
At the moment, nothing happens automatically. You’ll need to handle that manually by detecting the 401 response and triggering a new login request to get a fresh token.

Jose Araujo [DevOps Advocate] Selected answer as best 4th June 2025
Jose Araujo [DevOps Advocate] commented 3rd June 2025

Hi Nejra,

Thanks for the quick reply. It's now clear how to create the request body.

This is the response I get from the login endpoint:

{
"token": "0fe99819879b419db34bb8b627a958ce",
"user": "Admin"
}
How can I extract and store only the token value into PID 12?

Thanks!

You are viewing 1 out of 2 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
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