Class RestRequest

java.lang.Object
org.elasticsearch.rest.RestRequest
All Implemented Interfaces:
Traceable, ToXContent.Params

public class RestRequest extends Object implements ToXContent.Params, Traceable
  • Field Details

    • SERVERLESS_REQUEST

      public static final String SERVERLESS_REQUEST
      Internal marker request parameter to indicate that a request was made in serverless mode. Use this parameter, together with OPERATOR_REQUEST if you need to toggle behavior for serverless, for example to enforce partial API restrictions (prevent request fields, omit response fields) for an API. Requests not made in serverless mode, will *not* have this parameter set. Given a request instance, you can use isServerlessRequest() to determine if the parameter is set or not. This is also available from ToXContent.Params. For example: params.paramAsBoolean(RestRequest.SERVERLESS_REQUEST, false)
      See Also:
    • OPERATOR_REQUEST

      public static final String OPERATOR_REQUEST
      Internal marker request parameter to indicate that a request was made by an operator user. Requests made by regular users (users without operator privileges), will *not* have this parameter set. Given a request instance, you can use isOperatorRequest() to determine if the parameter is set or not. This is also available from ToXContent.Params. For example: params.paramAsBoolean(RestRequest.OPERATOR_REQUEST, false)
      See Also:
    • INTERNAL_MARKER_REQUEST_PARAMETERS

      public static final Set<String> INTERNAL_MARKER_REQUEST_PARAMETERS
      Internal request parameters used as markers to indicate various operations modes such as serverless mode, or operator mode. These can never be set directly by end-users. Instead, they are set internally by Elasticsearch and must be supported by all request handlers.
  • Constructor Details

  • Method Details