Class UiApiRequest

java.lang.Object
com.kingsrook.qqq.middleware.javalin.specs.invoke.UiApiRequest

public class UiApiRequest extends Object
One in-process call to a UI API operation (see UiApiInvoker). The path is the operation's template exactly as in the OpenAPI document, relative to the version base path, e.g. `/table/{tableName}/query`.
  • Constructor Details

    • UiApiRequest

      public UiApiRequest()
  • Method Details

    • withMethod

      public UiApiRequest withMethod(HttpMethod method)
      Fluent setter for method
    • withPath

      public UiApiRequest withPath(String path)
      Fluent setter for path (the operation's path template)
    • withPathParam

      public UiApiRequest withPathParam(String name, Object value)
      Add a value for a `{name}` in the path template.
    • withQueryParam

      public UiApiRequest withQueryParam(String name, Object value)
      Add a query-string parameter.
    • withFormParam

      public UiApiRequest withFormParam(String name, Object value)
      Send a form-encoded body (for operations whose request body is form data).
    • withHeader

      public UiApiRequest withHeader(String name, String value)
      Add a custom header; a null value removes it. Reserved headers are ignored by the invoker: credentials and the client channel are always set server side, and custom headers must not override identity or request metadata.
    • getHeaders

      public Map<String,String> getHeaders()
      Getter for headers
    • withMultipartFile

      public UiApiRequest withMultipartFile(String fieldName, String fileName, String contentType, Supplier<InputStream> content)
      Append a streamed file part. Form parameters become multipart text parts.
    • getMultipartFiles

      public List<UiApiRequest.MultipartFile> getMultipartFiles()
      The file parts in insertion order.
    • withJsonBody

      public UiApiRequest withJsonBody(Object jsonBody)
      Send a JSON body (serialized with QQQ's JsonUtils).
    • withSessionUUID

      public UiApiRequest withSessionUUID(String sessionUUID)
      The signed-in user's session UUID, sent as the sessionUUID cookie. Required.
    • withCredentials

      public UiApiRequest withCredentials(UiApiCredentials credentials)
      The calling user's credentials, as their request carried them (see UiApiCredentials.fromContext) - forwarded as they were, so the call authenticates exactly as the caller did, with any authentication module.
    • withUserTimezone

      public UiApiRequest withUserTimezone(String userTimezone)
      The user's time zone (X-QQQ-UserTimezone), for relative dates.
    • withInvokedBy

      public UiApiRequest withInvokedBy(String invokedBy)
      Who is calling (X-QQQ-Invoked-By, written to the access log), e.g. assistant.
    • withTimeout

      public UiApiRequest withTimeout(Duration timeout)
      Per-call timeout (default 60 seconds).
    • getMethod

      public HttpMethod getMethod()
      Getter for method
    • getPath

      public String getPath()
      Getter for path
    • getPathParams

      public Map<String,String> getPathParams()
      Getter for pathParams
    • getQueryParams

      public Map<String,String> getQueryParams()
      Getter for queryParams
    • getFormParams

      public Map<String,String> getFormParams()
      Getter for formParams
    • getJsonBody

      public Object getJsonBody()
      Getter for jsonBody
    • withClientDetail

      public UiApiRequest withClientDetail(String clientDetail)
      Detail appended to the invoker's client channel (channel/detail), e.g. the assistant turn id. Letters, digits and . _ : - only.
    • getClientDetail

      public String getClientDetail()
      Getter for clientDetail
    • getCredentials

      public UiApiCredentials getCredentials()
      Getter for credentials
    • getUserTimezone

      public String getUserTimezone()
      Getter for userTimezone
    • getInvokedBy

      public String getInvokedBy()
      Getter for invokedBy
    • getTimeout

      public Duration getTimeout()
      Getter for timeout