This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Boot 3.3.4!spring-doc.cn

This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Boot 3.3.4!spring-doc.cn

The httpexchanges endpoint provides information about HTTP request-response exchanges.spring-doc.cn

Retrieving the HTTP Exchanges

To retrieve the HTTP exchanges, make a GET request to /actuator/httpexchanges, as shown in the following curl-based example:spring-doc.cn

$ curl 'http://localhost:8080/actuator/httpexchanges' -i -X GET

The resulting response is similar to the following:spring-doc.cn

HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 511

{
  "exchanges" : [ {
    "timestamp" : "2022-12-22T13:43:41Z",
    "request" : {
      "uri" : "https://api.example.com",
      "method" : "GET",
      "headers" : {
        "Accept" : [ "application/json" ]
      }
    },
    "response" : {
      "status" : 200,
      "headers" : {
        "Content-Type" : [ "application/json" ]
      }
    },
    "principal" : {
      "name" : "alice"
    },
    "session" : {
      "id" : "5a69fd30-bad9-48c3-81fd-04fadd80e773"
    },
    "timeTaken" : "PT0.023S"
  } ]
}

Response Structure

The response contains details of the traced HTTP request-response exchanges. The following table describes the structure of the response:spring-doc.cn

Path Type Description

exchangesspring-doc.cn

Arrayspring-doc.cn

An array of HTTP request-response exchanges.spring-doc.cn

exchanges.[].timestampspring-doc.cn

Stringspring-doc.cn

Timestamp of when the exchange occurred.spring-doc.cn

exchanges.[].principalspring-doc.cn

Objectspring-doc.cn

Principal of the exchange, if any.spring-doc.cn

exchanges.[].principal.namespring-doc.cn

Stringspring-doc.cn

Name of the principal.spring-doc.cn

exchanges.[].request.methodspring-doc.cn

Stringspring-doc.cn

HTTP method of the request.spring-doc.cn

exchanges.[].request.remoteAddressspring-doc.cn

Stringspring-doc.cn

Remote address from which the request was received, if known.spring-doc.cn

exchanges.[].request.urispring-doc.cn

Stringspring-doc.cn

URI of the request.spring-doc.cn

exchanges.[].request.headersspring-doc.cn

Objectspring-doc.cn

Headers of the request, keyed by header name.spring-doc.cn

exchanges.[].request.headers.*.[]spring-doc.cn

Arrayspring-doc.cn

Values of the headerspring-doc.cn

exchanges.[].response.statusspring-doc.cn

Numberspring-doc.cn

Status of the responsespring-doc.cn

exchanges.[].response.headersspring-doc.cn

Objectspring-doc.cn

Headers of the response, keyed by header name.spring-doc.cn

exchanges.[].response.headers.*.[]spring-doc.cn

Arrayspring-doc.cn

Values of the headerspring-doc.cn

exchanges.[].sessionspring-doc.cn

Objectspring-doc.cn

Session associated with the exchange, if any.spring-doc.cn

exchanges.[].session.idspring-doc.cn

Stringspring-doc.cn

ID of the session.spring-doc.cn

exchanges.[].timeTakenspring-doc.cn

Stringspring-doc.cn

Time taken to handle the exchange.spring-doc.cn

Path Type Description

exchangesspring-doc.cn

Arrayspring-doc.cn

An array of HTTP request-response exchanges.spring-doc.cn

exchanges.[].timestampspring-doc.cn

Stringspring-doc.cn

Timestamp of when the exchange occurred.spring-doc.cn

exchanges.[].principalspring-doc.cn

Objectspring-doc.cn

Principal of the exchange, if any.spring-doc.cn

exchanges.[].principal.namespring-doc.cn

Stringspring-doc.cn

Name of the principal.spring-doc.cn

exchanges.[].request.methodspring-doc.cn

Stringspring-doc.cn

HTTP method of the request.spring-doc.cn

exchanges.[].request.remoteAddressspring-doc.cn

Stringspring-doc.cn

Remote address from which the request was received, if known.spring-doc.cn

exchanges.[].request.urispring-doc.cn

Stringspring-doc.cn

URI of the request.spring-doc.cn

exchanges.[].request.headersspring-doc.cn

Objectspring-doc.cn

Headers of the request, keyed by header name.spring-doc.cn

exchanges.[].request.headers.*.[]spring-doc.cn

Arrayspring-doc.cn

Values of the headerspring-doc.cn

exchanges.[].response.statusspring-doc.cn

Numberspring-doc.cn

Status of the responsespring-doc.cn

exchanges.[].response.headersspring-doc.cn

Objectspring-doc.cn

Headers of the response, keyed by header name.spring-doc.cn

exchanges.[].response.headers.*.[]spring-doc.cn

Arrayspring-doc.cn

Values of the headerspring-doc.cn

exchanges.[].sessionspring-doc.cn

Objectspring-doc.cn

Session associated with the exchange, if any.spring-doc.cn

exchanges.[].session.idspring-doc.cn

Stringspring-doc.cn

ID of the session.spring-doc.cn

exchanges.[].timeTakenspring-doc.cn

Stringspring-doc.cn

Time taken to handle the exchange.spring-doc.cn