# create clean URL rule

**URL:** <https://community.dynatrace.com/t/create-clean-url-rule/21307>\
**Category:** Open Q&A\
**Tags:** services-classic\
**Created:** [January 25, 2021, 4:52pm UTC](https://community.dynatrace.com/t/create-clean-url-rule/21307 "2021-01-25T16:52:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![istvan\_safranek](https://avatars.discourse-cdn.com/v4/letter/i/ed655f/32.png) [@istvan\_safranek](https://community.dynatrace.com/u/istvan_safranek)\
**Post date:** [January 25, 2021, 4:52pm UTC](https://community.dynatrace.com/t/create-clean-url-rule/21307/1 "2021-01-25T16:52:31Z")

</div>

Hello!

Can anyone help me with creating clean URL rules?

I want to do these URLs conversions

/v1/OrderRESTService/api/my/orders/payments/receiver/2323232323232323232323232 → /v1/OrderRESTService/api/my/orders/payments/receiver/[ACCOUNTNO]

/v1/CardRESTService/api/my/cards/3333333344445566 → /v1/CardRESTService/api/my/cards/[CARDID]

/v1/OrderRESTService/api/my/orders/payments/12345/sign/P-12345-9af8cfad → /v1/OrderRESTService/api/my/orders/payments/[TRANSACTIONID]/sign/[SIGNID]

/v1/BackendProxyServlet/proxy/geapi/my/accounts/q5d8dq43-92ec-384e-96bb-67n60uu9ik56-123421239064233 → /v1/BackendProxyServlet/proxy/geapi/my/accounts/[ACCOUNTID]

For the first I’ve created with this regular expression: \/v1\/OrderRESTService\/api\/my\/orders\/payments\/receiver\/([0-9]+)

I can’t see how can I replace the account numbers to [ACCOUNTNO]

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [January 25, 2021, 5:17pm UTC](https://community.dynatrace.com/t/create-clean-url-rule/21307/2 "2021-01-25T17:17:37Z")

</div>

Have you tried this? You can also look into masking data as well. Id recommend reaching out to chat support on setting these up as they might be a bit complex.

 ![28051-1611595050489.png](https://global.discourse-cdn.com/dynatrace/original/3X/2/9/29298afb676b8852be2853795346ceb048eb362a.png)

---

<div class="post-metadata">

**Author:** ![istvan\_safranek](https://avatars.discourse-cdn.com/v4/letter/i/ed655f/32.png) [@istvan\_safranek](https://community.dynatrace.com/u/istvan_safranek)\
**Post date:** [January 25, 2021, 6:00pm UTC](https://community.dynatrace.com/t/create-clean-url-rule/21307/3 "2021-01-25T18:00:44Z")

</div>

Thank you. I will use this resource url cleanup rules.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [January 26, 2021, 7:45am UTC](https://community.dynatrace.com/t/create-clean-url-rule/21307/4 "2021-01-26T07:45:20Z")

</div>

[@Chad T.](https://answers.dynatrace.com/users/36422/view.html) I believe [@Istvan S.](https://answers.dynatrace.com/users/4135/view.html) needs that on the service level, not on the web/mobile monitoring. These should apply only real user monitoring. Unfortunately for the service requests, it’s only possible clean parts of URLs, not replace that. Only request naming rules are usable for the purpose.

If this is needed across services, it’s good to use global request naming rules for that.

---

<div class="post-metadata">

**Author:** ![istvan\_safranek](https://avatars.discourse-cdn.com/v4/letter/i/ed655f/32.png) [@istvan\_safranek](https://community.dynatrace.com/u/istvan_safranek)\
**Post date:** [January 26, 2021, 12:32pm UTC](https://community.dynatrace.com/t/create-clean-url-rule/21307/5 "2021-01-26T12:32:48Z")

</div>

Yes I need this masking on the service level, just like the masking of the UUIDs, IP addresses and IBANS.

Where can I found the global request naming rules?

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [January 26, 2021, 1:00pm UTC](https://community.dynatrace.com/t/create-clean-url-rule/21307/6 "2021-01-26T13:00:05Z")

</div>

[@Istvan S.](https://answers.dynatrace.com/users/4135/view.html) those URLs you have are familiar to me (geapi for example), so I know what you want to achieve. 🙂

You need to define global request naming rules and that’s at the moment available only via Configuration API. Documentation is here:

> **[Request naming API](https://docs.dynatrace.com/docs/dynatrace-api/configuration-api/service-api/request-naming-api)**
>
> Learn what the Dynatrace request naming config API offers.

It looks difficult at the first look, but in fact, it is not. It just requires some Dynatrace skills.  
Be sure to leverage tags to narrow the scope of your rule only to services where this is required.

---

<div class="post-metadata">

**Author:** ![istvan\_safranek](https://avatars.discourse-cdn.com/v4/letter/i/ed655f/32.png) [@istvan\_safranek](https://community.dynatrace.com/u/istvan_safranek)\
**Post date:** [January 26, 2021, 4:37pm UTC](https://community.dynatrace.com/t/create-clean-url-rule/21307/7 "2021-01-26T16:37:38Z")

</div>

Thank you. Well, I’m new to dynatrace and it would be nice, if you can show me an example for masking certain section of a request.
