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

Full web service API, how to support contextroot with several sections



We have a lot of webservices and require the contextroot to be part of the serviceid. This is possible via the API above. However we have issues because some of the web services have only one section as contextroot. Some have two and others have 3.
If we define: segmentsToCopyFromUrlPath=3

It also includes the last part of the URL which is the service itself for all the services who have only 1 or 2 segments.

It makes sense to have a transformation which allows us to just remove the last part of the URI and call that the contextroot.



  "type": "FULL_WEB_SERVICE",
  "name": "{{.name}}",
  "description": "Include Context Path in WCF Service Naming",
  "enabled": true,
  "detectAsWebRequestService": false,
  "managementZones": [],
  "conditions": [
      "attributeType": "WEBSERVICE_NAMESPACE",
      "compareOperations": [
          "type": "STARTS_WITH",
          "values": [
          "ignoreCase": "true"
  "contextRoot": {
    "segmentsToCopyFromUrlPath": 3



Dynatrace Advisor
Dynatrace Advisor

Hi Bert,

Afaik, i think your proposal is currently not an option (grab everything before the last slash) i think you should be able to address that by using more than one rule. You are maybe able to narrow down by some properties (maybe the first section of the context root; maybe the webserver or namespace names...) to apply "Segments to Copy" to map the real scenario you have.
So, maybe you end up with 3 rules, one per deep level, that point explicitly to the target services, instead of having one to rule them all!
Maybe this way you can make it work for your use case!
Hope it helps!

Featured Posts