Interface RawUploadRestClient


@Path("/uploads/raw") @RegisterRestClient(configKey="connector-intake-raw") public interface RawUploadRestClient
Streaming HTTP client to connector-intake's raw upload endpoint (POST /uploads/raw) — the S3-style path that streams a document of any length straight to :intake/S3 without ever buffering it whole.

The body is an InputStream: the REST client forwards it chunk-by-chunk, so single-doc uploads of arbitrary size never go fully in memory (unlike the gRPC UploadBlob, which is an in-memory unary call for small docs). Content-Length is required by the endpoint.

Discovery via quarkus.rest-client.connector-intake-raw.url (Stork in prod, a fixed URL in dev) — same pattern connector-intake uses for the repository upload client.

  • Method Summary

    Modifier and Type
    Method
    Description
    jakarta.ws.rs.core.Response
    uploadRaw(InputStream body, long contentLength, String contentType, String datasourceId, String apiKey, String sourceDocId, String filename, String crawlId)
    Streams a raw document body to connector-intake's POST /uploads/raw endpoint, forwarding it chunk-by-chunk so arbitrarily large docs never buffer in memory.
  • Method Details

    • uploadRaw

      @POST @Consumes("application/octet-stream") jakarta.ws.rs.core.Response uploadRaw(InputStream body, @HeaderParam("content-length") long contentLength, @HeaderParam("content-type") String contentType, @HeaderParam("x-datasource-id") String datasourceId, @HeaderParam("x-api-key") String apiKey, @HeaderParam("x-source-doc-id") String sourceDocId, @HeaderParam("x-filename") String filename, @HeaderParam("x-crawl-id") String crawlId)
      Streams a raw document body to connector-intake's POST /uploads/raw endpoint, forwarding it chunk-by-chunk so arbitrarily large docs never buffer in memory.
      Parameters:
      body - the document bytes, streamed straight through
      contentLength - the document length in bytes (required by the endpoint)
      contentType - the document's MIME type
      datasourceId - the datasource id the upload is attributed to
      apiKey - the datasource API key authorizing the upload
      sourceDocId - the caller's source document id for this upload
      filename - the original file name of the document
      crawlId - the crawl id this upload belongs to
      Returns:
      the upload endpoint's HTTP response