cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create Request Naming Rules for service via API

Bro-VV
Visitor

Hello,

I want to create Endpoints Rules ( Request Naming Rules) for a particular service (not global) via API.

I made it in UI, but we would like to create rules automatically, so that later we can make graphs in dashboards and watch response time are splitted by Endpoints.
I figured out how to create KeyRegister Names via API, but I can't find how to make the Rules themselves.
I also think I found where is Global rules via api/config/v1/service/requestNaming, but we don't have access to it.

I read that you can't create rules for a specific service via API, but it's very strange that you can create a KeyRegister Names for particular service, but not Rules.

If anyone has any thoughts on this, please share.

4 REPLIES 4

michal_lewi
Helper

Hello @Bro-VV,

to achieve what you want you should use extra conditions. For example you can assign naming rule to service by TAG:

{

"enabled": true,
"namingPattern": "PATTERN",
"managementZones": [],
"conditions": [
{
"attribute": "SERVICE_TAG",
"comparisonInfo": {
"type": "TAG",
"comparison": "EQUALS_ANY_OF",
"value": null,
"values": [
{
"context": "CONTEXTLESS",
"key": "KEY",
"value": "YOUR_TAG"
}
],
"negate": false
}
}
],
"placeholders": [
]
}

Full list what attribute is possible to use is here:

michalOM_0-1728906048208.png

 


Request naming API - POST a new request naming rule - Dynatrace Docs

Best Reagrds

Michał

Thank you @michal_lewi 

Unfortunately, I have no access to api/config/v1/, I hope that I can do it via something like api/v2/settings/, like KeyRequestNames...

GosiaMurawska
Community Team
Community Team

Hi, @Bro-VV! Have you managed to find the answer to your question? It would be great if you share it with the Community 🙂

Julius_Loman
DynaMight Legend
DynaMight Legend

Unfortunately, it's not possible to create or modify request naming rules for particular entities. You can use Global request naming rules and apply them to services based on tags or other filtering as @michal_lewi suggests. If you don't have access to the Configuration API, you must reach out to admin of your Dynatrace environment to provide you with a token with the required scope. A reminder - global rules are global and thus may affect the whole environment. 

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts