Skip to content

apm-server: Remove server information endpoint POST / support #647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 10, 2025
Merged
13 changes: 10 additions & 3 deletions release-notes/breaking-changes/elastic-apm.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,19 @@ To learn how to upgrade, check out <uprade docs>.
% **Action**<br> Steps for mitigating deprecation impact.
% ::::

% ## 9.0.0 [elastic-apm-900-breaking-changes]
% **Release date:** March 25, 2025
## 9.0.0 [elastic-apm-9-0-0-breaking-changes]
**Release date:** March 25, 2025

% ::::{dropdown} Title of breaking change
% Description of the breaking change.
% For more information, check [PR #](PR link).
% **Impact**<br> Impact of the breaking change.
% **Action**<br> Steps for mitigating deprecation impact.
% ::::
% ::::

::::{dropdown} Change server information endpoint "/" to only accept GET and HEAD requests
This will surface any agent misconfiguration causing data to be sent to `/` instead of the correct endpoint (for example, `/v1/traces` for OTLP/HTTP).
For more information, check [PR #15976](https://github.com/elastic/apm-server/pull/15976).
**Impact**<br> Any methods other than `GET` and `HEAD` to `/` will return HTTP 405 Method Not Allowed.
**Action**<br> Update any existing usage, for example, update `POST /` to `GET /`.
::::
10 changes: 5 additions & 5 deletions solutions/observability/apps/apm-server-information-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ This is the server information endpoint:
http(s)://{hostname}:{port}/
```

Sending an `HTTP GET` or `HTTP POST` request to the server information endpoint will return an HTTP 200, indicating that the server is up.
Sending an `HTTP GET` request to the server information endpoint will return an HTTP 200, indicating that the server is up.

To configure authenticated access to the APM server, the instructions at [APM API key](api-keys.md) or [APM Secret Token](secret-token.md), must be followed to configure the correct permissions for APM access.

If an [API keys](api-keys.md) or a [Secret token](secret-token.md) is passed along with the `HTTP GET` or `HTTP POST` request, in addition to an HTTP 200, the response payload will include some information about the APM server.
If an [API keys](api-keys.md) or a [Secret token](secret-token.md) is passed along with the `HTTP GET` request, in addition to an HTTP 200, the response payload will include some information about the APM server.


### Example: GET, without credentials [apm-api-info-example-get-without-credentials]
Expand Down Expand Up @@ -48,12 +48,12 @@ curl --verbose -X GET http://127.0.0.1:8200
```


### Example: POST, with secret token [apm-api-info-example-post-with-secret-token]
### Example: GET, with secret token [apm-api-info-example-get-with-secret-token]

Example APM Server information request with POST, with a [Secret token](secret-token.md):
Example APM Server information request with GET, with a [Secret token](secret-token.md):

```sh
curl -X POST http://127.0.0.1:8200/ \
curl -X GET http://127.0.0.1:8200/ \
-H "Authorization: Bearer secret_token"

{
Expand Down