Bad Request - Specifying types in document get requests is deprecated


Since upgrading elastic stack docker containers to 7.10.2 I get the following error whenever trying to open a new transaction with the .net Elastic.Apm 1.7.1 :

StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.
Net.Http.StreamContent, Headers:
      Warning: 299 Elasticsearch-7.10.2-747e1cc71def077253878a59143c1f785afa92b9
 "[types removal] Specifying types in document get requests is deprecated, use t
he /{index}/_doc/{id} endpoint instead."
      Content-Length: 287
      Content-Type: application/json; charset=UTF-8
+-> Response body [length: 287]:
st [/config/v1/agents] contains unrecognized parameter: []"}],"type"
:"illegal_argument_exception","reason":"request [/config/v1/agents] contains unr
ecognized parameter: []"},"status":400}

Same code used to work with an older version of the stack. is there a compatibility issue I was missing?


The path /config/v1/agents suggests this is trying to use the Agent configuration API, but the response indicates it's talking directly to Elasticsearch. You need to direct this call to the APM server instead.

1 Like

David, you are absolutely correct. I had a stupid mistake on my side using the wrong docker-compose file which confused me. It is working now. Thank you very much.


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