java.lang.Object
com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi
com.sap.ai.sdk.foundationmodels.rpt.generated.client.DefaultApi

public class DefaultApi extends com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi
SAP RPT in version 1.6.0.

A REST API for in-context learning with SAP RPT models.

  • Constructor Details

    • DefaultApi

      public DefaultApi(@Nonnull com.sap.cloud.sdk.cloudplatform.connectivity.Destination httpDestination)
      Instantiates this API class to invoke operations on the SAP RPT.
      Parameters:
      httpDestination - The destination that API should be used with
    • DefaultApi

      public DefaultApi(@Nonnull com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient apiClient)
      Instantiates this API class to invoke operations on the SAP RPT based on a given ApiClient.
      Parameters:
      apiClient - ApiClient to invoke the API on
  • Method Details

    • withDefaultHeaders

      public DefaultApi withDefaultHeaders(@Nonnull Map<String,String> defaultHeaders)
      Creates a new API instance with additional default headers.
      Parameters:
      defaultHeaders - Additional headers to include in all requests
      Returns:
      A new API instance with the combined headers
    • health

      @Nonnull public Object health() throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Health

      200 - Successful Response

      Returns:
      Object
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • predict

      @Nonnull public PredictResponsePayload predict(@Nonnull PredictRequestPayload predictRequestPayload, @Nullable String contentEncoding) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Make in-context predictions for specified target columns based on provided table data JSON (optionally gzip-compressed).

      200 - Successful Prediction

      400 - Bad Request - Invalid input data

      413 - Payload Too Large

      422 - Validation Error

      500 - Internal Server Error

      503 - Service Unavailable

      Parameters:
      predictRequestPayload - (required) The value for the parameter predictRequestPayload
      contentEncoding - (optional) Content encoding of the request body. Use 'gzip' for gzip-compressed payloads (recommended compression level 1).
      Returns:
      PredictResponsePayload
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • predict

      @Nonnull public PredictResponsePayload predict(@Nonnull PredictRequestPayload predictRequestPayload) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Make in-context predictions for specified target columns based on provided table data JSON (optionally gzip-compressed).

      200 - Successful Prediction

      400 - Bad Request - Invalid input data

      413 - Payload Too Large

      422 - Validation Error

      500 - Internal Server Error

      503 - Service Unavailable

      Parameters:
      predictRequestPayload - The value for the parameter predictRequestPayload
      Returns:
      PredictResponsePayload
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • predictParquet

      @Nonnull public PredictResponsePayload predictParquet(@Nonnull File _file, @Nonnull String predictionConfig, @Nullable String indexColumn, @Nullable Boolean parseDataTypes) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Make predictions from Parquet file

      200 - Successful Prediction

      400 - Bad Request - Invalid input data

      413 - Payload Too Large

      422 - Validation Error

      500 - Internal Server Error

      503 - Service Unavailable

      Parameters:
      _file - (required) The value for the parameter _file
      predictionConfig - (required) JSON string containing the prediction configuration (see PredictionConfig schema).
      indexColumn - (optional) The value for the parameter indexColumn
      parseDataTypes - (optional, default to false) The value for the parameter parseDataTypes
      Returns:
      PredictResponsePayload
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • predictParquet

      @Nonnull public PredictResponsePayload predictParquet(@Nonnull File _file, @Nonnull String predictionConfig) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Make predictions from Parquet file

      200 - Successful Prediction

      400 - Bad Request - Invalid input data

      413 - Payload Too Large

      422 - Validation Error

      500 - Internal Server Error

      503 - Service Unavailable

      Parameters:
      _file - The value for the parameter _file
      predictionConfig - JSON string containing the prediction configuration (see PredictionConfig schema).
      Returns:
      PredictResponsePayload
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API