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
      • General Inquiries
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

How to send the Location in Headers on a User-Define API

249 views26th March 2025user defined API
2
João Azevedo237 25th March 2025 0 Comments

Hello everyone, hope you all are well! I need help with in how to send the Location property of the headers in my User Defined API response. I didn’t find any information in the documentation abut it, but our client requires that information in the headers of the response.

I’ll leave the output of my api here:

return new ApiTriggerOutput
{
ResponseBody = responseMessage,
ResponseCode = 201,
};

Thank you in advance!

Wouter Van Robays [SLC] [DevOps Enabler] Answered question 26th March 2025

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Wouter Van Robays [SLC] [DevOps Enabler]1.14K Posted 26th March 2025 6 Comments

Hi João,

Unfortunately, setting headers on a User-Defined API response is not something we currently support. The only way to add data to a response currently, is using the ResponseBody.

I can maybe help you looking for a workaround. Just to make sure I understand you correctly, do you want to get the Location header from the User-Defined API request? Or do you want to add the Location header to the headers of your API response?

João Azevedo Posted new comment 27th March 2025
João Azevedo commented 26th March 2025

Hi Wouter, thank you for your response! I want to add the Location header to the headers of my API response.

Wouter Van Robays [SLC] [DevOps Enabler] commented 26th March 2025

Ok, I'm assuming, since you use the 201 Created status code in your response, that your Location header will include the location of a resource that your API creates? Would it be an option to include this location in the ResponseBody? I'm afraid that is the only way to currently work around this limitation. I will link this Dojo question to a task on our backlog to implement HTTP headers, that way I can inform you if we would at some point in the future would implement this.

João Azevedo commented 26th March 2025

I will talk to our client and see if he accepts sending via ResponseBody, as soon as I have a position I will get back to you. Thank you for your help Wouter!

João Azevedo commented 26th March 2025

Hi Wouter! I spoke to our client and they need it to be sent via Location in the response Header, because according to them, the system was developed following this logic. If you have a deadline for that implementation we like to know. Thank you in advance and my regards!

Wouter Van Robays [SLC] [DevOps Enabler] commented 27th March 2025

Hi João, will this location header always contain the same location? Because in that case, we could as a workaround make a rewrite rule in IIS that sets this header hardcoded on every response.

Show 1 more comments
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