# How to get request parameters on JSON request ?

**URL:** <https://community.dynatrace.com/t/how-to-get-request-parameters-on-json-request/15835>\
**Category:** Open Q&A\
**Tags:** services-classic, request-attributes\
**Created:** [September 21, 2018, 4:07pm UTC](https://community.dynatrace.com/t/how-to-get-request-parameters-on-json-request/15835 "2018-09-21T16:07:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![g\_ciret](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@g\_ciret](https://community.dynatrace.com/u/g_ciret)\
**Post date:** [September 21, 2018, 4:07pm UTC](https://community.dynatrace.com/t/how-to-get-request-parameters-on-json-request/15835/1 "2018-09-21T16:07:41Z")

</div>

Hi everybody,

I’m having trouble setting up requests attributes on services requests which content a JSON payload or XML content.

I tried to setup a request attribute that captures HTTP Post parameter, but I don’t know what to put in the parameter name field.

Here is an example of the payload I’m working on:

{“tdddTypeDemaDero”:{“ntypeDemaDero”:3,“ddeval”:1456786800000,“itypeDemaDero”:“Dérogation tarifaire”,“ltypeDemaDero”:“Dérogation tarifaire”,“vlistMatDestFormu”:“XXXXX;YYYYY;ZZZZZ;”},“lnomraPivotDemaDero”:“XXXXX”}

How should I configure Dynatrace to get the values for the lnomraPivotDemaDero field?

Thanks in advance.

Regards,

Gilles

---

<div class="post-metadata">

**Author:** ![JamesKitson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jameskitson/32/22460_2.png) [@JamesKitson](https://community.dynatrace.com/u/JamesKitson)\
**Post date:** [September 21, 2018, 5:07pm UTC](https://community.dynatrace.com/t/how-to-get-request-parameters-on-json-request/15835/2 "2018-09-21T17:07:35Z")

</div>

I don’t know enough about it to explain in great detail but POST Parameters are different from a json or xml payload. They usually have a content type such as _application/x-www-form-urlencoded_ and are simple key-value pairs like you would see in the query of a GET.

_parameter=value&also=another_

So even though they are also technically passed in the body it is much simpler and less costly than trying to look into and parse through a more complicated body like json or xml which would introduce significant overhead and so we do not do and so you cannot create request attributes off of them.

James

---

<div class="post-metadata">

**Author:** ![gilgi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gilgi/32/11747_2.png) [@gilgi](https://community.dynatrace.com/u/gilgi)\
**Post date:** [September 24, 2018, 11:56am UTC](https://community.dynatrace.com/t/how-to-get-request-parameters-on-json-request/15835/3 "2018-09-24T11:56:14Z")

</div>

[@Gilles C.](https://answers.dynatrace.com/users/22995/view.html)

Post parameters are being send as part of the request header, while JSON/XML payload is sent as part of the body itself. This is why request attributes (until changed and I’m not aware of any plan to do so) will not work on post parameters for you. What you should do, is capture these values on the server side processing.

Hope this helps.

Gil

---

<div class="post-metadata">

**Author:** ![g\_ciret](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@g\_ciret](https://community.dynatrace.com/u/g_ciret)\
**Post date:** [September 24, 2018, 12:06pm UTC](https://community.dynatrace.com/t/how-to-get-request-parameters-on-json-request/15835/4 "2018-09-24T12:06:16Z")

</div>

Thanks for your answers.  
That is what I suspected, I will work on the Java method side.

Thanks for your help.

Gilles

---

<div class="post-metadata">

**Author:** ![nick\_ragany](https://avatars.discourse-cdn.com/v4/letter/n/3ec8ea/32.png) [@nick\_ragany](https://community.dynatrace.com/u/nick_ragany)\
**Post date:** [April 3, 2020, 9:17pm UTC](https://community.dynatrace.com/t/how-to-get-request-parameters-on-json-request/15835/5 "2020-04-03T21:17:18Z")

</div>

Hello all.. since this is an older forum post, I"m just wondering if it is still the case that a request attribute cannot be based off of a JSON or SOAP/XML request body?

---

<div class="post-metadata">

**Author:** ![dave\_mauney](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dave_mauney/32/27784_2.png) [@dave\_mauney](https://community.dynatrace.com/u/dave_mauney)\
**Post date:** [April 4, 2020, 2:31am UTC](https://community.dynatrace.com/t/how-to-get-request-parameters-on-json-request/15835/6 "2020-04-04T02:31:51Z")

</div>

Request bodies are still a performance issue, so we still do not support this. The best option is (still) to find a method that accesses the data of interest and capture the argument or return value.

---

<div class="post-metadata">

**Author:** ![Enrico\_F](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/enrico_f/32/23774_2.png) [@Enrico\_F](https://community.dynatrace.com/u/Enrico_F)\
**Post date:** [April 14, 2020, 7:23am UTC](https://community.dynatrace.com/t/how-to-get-request-parameters-on-json-request/15835/7 "2020-04-14T07:23:01Z")

</div>

It still applies to this day - and likely will for the foreseeable future. I guess this is a deliberate design decision as to limit the OneAgent overhead on the monitored process because that would mean it would have to parse the request body (which could be potentially huge).

---

<div class="post-metadata">

**Author:** ![KlausEnzenhofer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/klausenzenhofer/32/10828_2.png) [@KlausEnzenhofer](https://community.dynatrace.com/u/KlausEnzenhofer)\
**Post date:** [April 4, 2023, 6:53am UTC](https://community.dynatrace.com/t/how-to-get-request-parameters-on-json-request/15835/8 "2023-04-04T06:53:33Z")

</div>

Hi,  
You may want to investigate business events to solve your use case

Blog:

> **[The value of business events: How IT can increase business agility](https://www.dynatrace.com/news/blog/the-value-of-business-events-how-it-can-increase-business-agility/)**
>
> Dynamic business conditions demand in-the-moment business insights. Discover how Dynatrace delivers real-time business observability for data-driven business decisions.

Observability clinic

[![](https://global.discourse-cdn.com/dynatrace/original/3X/3/3/33d181f058c4acdfb1389ccd6ebf92108210f525.jpeg "Dynatrace Business Events: Expanding Observability into your business domain") ](https://www.youtube.com/watch?v=a5Kp3WJ8NHU&list=RDCMUCcYJ-5q_AfmjQ4XTjTS0o3g)

FYI:&nbsp; [@DanielMarschnig](https://community.dynatrace.com/user/44817)
