Class ExecutionApi

java.lang.Object
com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi
com.sap.ai.sdk.core.client.ExecutionApi

public class ExecutionApi extends com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi
AI Core in version 2.42.0.

Provides tools to manage your scenarios and workflows in SAP AI Core. Execute pipelines as a batch job, for example to pre-process or train your models, or perform batch inference. Serve inference requests of trained models. Deploy а trained machine learning model as a web service to serve inference requests with high performance. Register your own Docker registry, synchronize your AI content from your own git repository, and register your own object store for training data and trained models.

  • Constructor Details

    • ExecutionApi

      public ExecutionApi()
      Instantiates this API class to invoke operations on the AI Core
    • ExecutionApi

      public ExecutionApi(@Nonnull AiCoreService aiCoreService)
      Instantiates this API class to invoke operations on the AI Core
      Parameters:
      aiCoreService - The configured connectivity instance to AI Core
  • Method Details

    • withDefaultHeaders

      public ExecutionApi 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
    • batchModify

      @Nonnull public AiExecutionBulkModificationResponse batchModify(@Nonnull String aiResourceGroup, @Nonnull AiExecutionBulkModificationRequest aiExecutionBulkModificationRequest) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Patch multiple executions

      Patch multiple executions' status to stopped or deleted.

      202 - The modification of the executions have been scheduled successfully

      400 - The specification of the resource was incorrect

      Parameters:
      aiResourceGroup - Specify a resource group id
      aiExecutionBulkModificationRequest - The value for the parameter aiExecutionBulkModificationRequest
      Returns:
      AiExecutionBulkModificationResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • count

      @Nonnull public Integer count(@Nonnull String aiResourceGroup, @Nullable List<String> executableIds, @Nullable String configurationId, @Nullable String scenarioId, @Nullable String executionScheduleId, @Nullable String status) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get number of executions

      Retrieve the number of available executions. The number can be filtered by scenarioId, configurationId, executableIdsList or by execution status.

      200 - Number of executions

      400 - The specification of the resource was incorrect

      Parameters:
      aiResourceGroup - (required) Specify a resource group id
      executableIds - (optional) Limit query to only these executable IDs
      configurationId - (optional) Configuration identifier
      scenarioId - (optional) Scenario identifier
      executionScheduleId - (optional) Execution Schedule identifier
      status - (optional) Filter by status
      Returns:
      Integer
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • count

      @Nonnull public Integer count(@Nonnull String aiResourceGroup) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get number of executions

      Retrieve the number of available executions. The number can be filtered by scenarioId, configurationId, executableIdsList or by execution status.

      200 - Number of executions

      400 - The specification of the resource was incorrect

      Parameters:
      aiResourceGroup - Specify a resource group id
      Returns:
      Integer
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • create

      @Nonnull public AiExecutionCreationResponse create(@Nonnull String aiResourceGroup, @Nonnull AiEnactmentCreationRequest aiEnactmentCreationRequest) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Create execution

      Create an execution using the configuration specified by configurationId.

      202 - The execution has been scheduled successfully

      400 - The specification of the resource was incorrect

      Parameters:
      aiResourceGroup - Specify a resource group id
      aiEnactmentCreationRequest - The value for the parameter aiEnactmentCreationRequest
      Returns:
      AiExecutionCreationResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • delete

      @Nonnull public AiExecutionDeletionResponse delete(@Nonnull String aiResourceGroup, @Nonnull String executionId) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Mark execution as deleted

      Mark the execution with executionId as deleted.

      202 - The deletion of the execution has been scheduled successfully

      400 - The specification of the resource was incorrect

      404 - The specified resource was not found

      412 - The service didn't meet the precondition needed to execute this operation

      Parameters:
      aiResourceGroup - Specify a resource group id
      executionId - Execution identifier
      Returns:
      AiExecutionDeletionResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • get

      @Nonnull public AiExecutionResponseWithDetails get(@Nonnull String aiResourceGroup, @Nonnull String executionId, @Nullable String $select) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get information about a specific execution

      Retrieve details for execution with executionId.

      200 - Information about the execution

      400 - The specification of the resource was incorrect

      404 - The specified resource was not found

      Parameters:
      aiResourceGroup - (required) Specify a resource group id
      executionId - (required) Execution identifier
      $select - (optional) Allows to request a specified set of properties for each entity
      Returns:
      AiExecutionResponseWithDetails
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • get

      @Nonnull public AiExecutionResponseWithDetails get(@Nonnull String aiResourceGroup, @Nonnull String executionId) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get information about a specific execution

      Retrieve details for execution with executionId.

      200 - Information about the execution

      400 - The specification of the resource was incorrect

      404 - The specified resource was not found

      Parameters:
      aiResourceGroup - Specify a resource group id
      executionId - Execution identifier
      Returns:
      AiExecutionResponseWithDetails
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • getLogs

      @Nonnull public RTALogCommonResponse getLogs(@Nonnull String executionId, @Nullable String authorization, @Nullable Integer $top, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable String $order) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get logs of specific execution

      Retrieve logs of an execution for getting insight into the execution results or failures.

      200 - The query was processed successfully and logs of the requested execution will be returned.

      400 - The request was malformed and could thus not be processed.

      401 - Lacks valid authentication credentials for the target resource.

      404 - The specified resource was not found

      0 - HTTP status codes 401, 403 or 500. Response body contains further details.

      Parameters:
      executionId - (required) Execution identifier
      authorization - (optional) Authorization bearer token containing a JWT token.
      $top - (optional, default to 1000) The max number of entries to return. Defaults to 1000. Limited to 5000 max.
      start - (optional) The start time for the query as a RFC 3339 datetime format. Defaults to one hour ago. + in timezone need to be encoded to %2B.
      end - (optional) The end time for the query as a RFC 3339 datetime format. Defaults to now. + in timezone need to be encoded to %2B.
      $order - (optional) Determines the sort order. Supported values are asc or desc. Defaults to asc. Sort order: * `asc` - Ascending, earliest in the order will appear at the top of the list * `desc` - Descending, last in the order will appear at the top of the list
      Returns:
      RTALogCommonResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • getLogs

      @Nonnull public RTALogCommonResponse getLogs(@Nonnull String executionId) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get logs of specific execution

      Retrieve logs of an execution for getting insight into the execution results or failures.

      200 - The query was processed successfully and logs of the requested execution will be returned.

      400 - The request was malformed and could thus not be processed.

      401 - Lacks valid authentication credentials for the target resource.

      404 - The specified resource was not found

      0 - HTTP status codes 401, 403 or 500. Response body contains further details.

      Parameters:
      executionId - Execution identifier
      Returns:
      RTALogCommonResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • modify

      @Nonnull public AiExecutionModificationResponse modify(@Nonnull String aiResourceGroup, @Nonnull String executionId, @Nonnull AiExecutionModificationRequest aiExecutionModificationRequest) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Update target status of an execution

      Update target status of the execution to stop an execution.

      202 - The modification of the execution has been scheduled successfully

      400 - The specification of the resource was incorrect

      404 - The specified resource was not found

      412 - The service didn't meet the precondition needed to execute this operation

      Parameters:
      aiResourceGroup - Specify a resource group id
      executionId - Execution identifier
      aiExecutionModificationRequest - The value for the parameter aiExecutionModificationRequest
      Returns:
      AiExecutionModificationResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • query

      @Nonnull public AiExecutionList query(@Nonnull String aiResourceGroup, @Nullable List<String> executableIds, @Nullable String configurationId, @Nullable String scenarioId, @Nullable String executionScheduleId, @Nullable String status, @Nullable Integer $top, @Nullable Integer $skip, @Nullable String $select) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get list of executions

      Retrieve a list of executions that match the specified filter criteria. Filter criteria include a list of executableIds, a scenarioId, a configurationId, or a execution status. With top/skip parameters it is possible to paginate the result list. With select parameter it is possible to select only status.

      200 - A list of executions

      400 - The specification of the resource was incorrect

      Parameters:
      aiResourceGroup - (required) Specify a resource group id
      executableIds - (optional) Limit query to only these executable IDs
      configurationId - (optional) Configuration identifier
      scenarioId - (optional) Scenario identifier
      executionScheduleId - (optional) Execution Schedule identifier
      status - (optional) Filter by status
      $top - (optional, default to 10000) Number of results to display
      $skip - (optional) Number of results to be skipped from the ordered list of results
      $select - (optional) Allows to request a specified set of properties for each entity
      Returns:
      AiExecutionList
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • query

      @Nonnull public AiExecutionList query(@Nonnull String aiResourceGroup) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get list of executions

      Retrieve a list of executions that match the specified filter criteria. Filter criteria include a list of executableIds, a scenarioId, a configurationId, or a execution status. With top/skip parameters it is possible to paginate the result list. With select parameter it is possible to select only status.

      200 - A list of executions

      400 - The specification of the resource was incorrect

      Parameters:
      aiResourceGroup - Specify a resource group id
      Returns:
      AiExecutionList
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API