# We would like to shorten Dynatrace REST API

**URL:** <https://community.dynatrace.com/t/we-would-like-to-shorten-dynatrace-rest-api/18874>\
**Category:** Dynatrace API\
**Tags:** dynatrace-api, servicenow\
**Created:** [March 26, 2020, 1:36am UTC](https://community.dynatrace.com/t/we-would-like-to-shorten-dynatrace-rest-api/18874 "2020-03-26T01:36:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ntanaka](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@ntanaka](https://community.dynatrace.com/u/ntanaka)\
**Post date:** [March 26, 2020, 1:36am UTC](https://community.dynatrace.com/t/we-would-like-to-shorten-dynatrace-rest-api/18874/1 "2020-03-26T01:36:54Z")

</div>

Hi,

Our customer use Dynatrace Metric API to send metric to ServiceNow.  
However, on ServiceNow, REST endpoint record is limited less than 200 characters long.  
We are sometimes in trouble because REST endpoint is truncated like this.

e.g.) The following API is 204 characters long, so 4 characters are truncated.

[https://xx.xx.x.xx/e/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/api/v2/metrics/query?metricSelector=builtin:service.response.time&resolution=h&from=now-24h&entitySelector=type(SERVICE),entityName(servicenameA2)](https://xx.xx.x.xx/e/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/api/v2/metrics/query?metricSelector=builtin:service.response.time&resolution=h&from=now-24h&entitySelector=type(SERVICE),entityName(servicenameA2))

 ![24325-1585186321315.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/e/8e97f4eed225b2c9c0f3fa4f63efddf403f21a75.png)

Do you have any idea to shorten REST endpoint?  
We wish we could shorten environment id…

Best Regards  
Natsumi Tanaka

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [March 26, 2020, 7:00am UTC](https://community.dynatrace.com/t/we-would-like-to-shorten-dynatrace-rest-api/18874/2 "2020-03-26T07:00:59Z")

</div>

It’s not possible to shorten it. Only Idea I have is to create nginx/apache between SN and DT and there you can try use it as kind of proxy that may translate larger uris into shorter ones?

[How to build a URL shortener with Apache | Opensource.com](https://opensource.com/article/18/7/apache-url-shortener) → example

Sebastian

---

<div class="post-metadata">

**Author:** ![ntanaka](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@ntanaka](https://community.dynatrace.com/u/ntanaka)\
**Post date:** [March 26, 2020, 10:47am UTC](https://community.dynatrace.com/t/we-would-like-to-shorten-dynatrace-rest-api/18874/3 "2020-03-26T10:47:20Z")

</div>

Hi, Sebastian, Thank you for your comment. Nice idea! I will ask our customer to use it!
