# APM Server returns unsuccessful \[400\] from APM Ruby

**URL:** <https://discuss.elastic.co/t/apm-server-returns-unsuccessful-400-from-apm-ruby/139829>\
**Category:** APM\
**Created:** [July 12, 2018, 8:00pm UTC](https://discuss.elastic.co/t/apm-server-returns-unsuccessful-400-from-apm-ruby/139829 "2018-07-12T20:00:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![i5okie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/i5okie/32/33300_2.png) [@i5okie](https://discuss.elastic.co/u/i5okie)\
**Post date:** [July 12, 2018, 8:00pm UTC](https://discuss.elastic.co/t/apm-server-returns-unsuccessful-400-from-apm-ruby/139829/1 "2018-07-12T20:00:36Z")

</div>

[ElasticAPM] POST returned an unsuccessful status code (400)  
[ElasticAPM] apm-server's response: {"error":"data validation error: Problem validating JSON document against schema: I[#] S[#] doesn't validate with "transaction#"\n I[#/service/name] S[#/properties/service/properties/name/pattern] does not match pattern "^[a-zA-Z0-9 \_-]+$""}  
[ElasticAPM] [1.0.0] Starting agent, reporting to [http://localhost:8200](http://localhost:8200)

---

<div class="post-metadata">

**Author:** ![gil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gil/32/41911_2.png) [@gil](https://discuss.elastic.co/u/gil)\
**Post date:** [July 12, 2018, 8:13pm UTC](https://discuss.elastic.co/t/apm-server-returns-unsuccessful-400-from-apm-ruby/139829/2 "2018-07-12T20:13:58Z")

</div>

What is the service name set to currently? That response indicates the service name contains characters that are not allowed (a-z A-Z 0-9 \_ -).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 2, 2018, 4:14pm UTC](https://discuss.elastic.co/t/apm-server-returns-unsuccessful-400-from-apm-ruby/139829/3 "2018-08-02T16:14:03Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
