Class ExecutionApi
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.
-
Field Summary
Fields inherited from class com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi
apiClient, defaultHeaders -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates this API class to invoke operations on the AI CoreExecutionApi(AiCoreService aiCoreService) Instantiates this API class to invoke operations on the AI Core -
Method Summary
Modifier and TypeMethodDescriptionbatchModify(String aiResourceGroup, AiExecutionBulkModificationRequest aiExecutionBulkModificationRequest) Patch multiple executionsGet number of executionscount(String aiResourceGroup, List<String> executableIds, String configurationId, String scenarioId, String executionScheduleId, String status) Get number of executionscreate(String aiResourceGroup, AiEnactmentCreationRequest aiEnactmentCreationRequest) Create executionMark execution as deletedGet information about a specific executionGet information about a specific executionGet logs of specific executiongetLogs(String executionId, String authorization, Integer $top, OffsetDateTime start, OffsetDateTime end, String $order) Get logs of specific executionmodify(String aiResourceGroup, String executionId, AiExecutionModificationRequest aiExecutionModificationRequest) Update target status of an executionGet list of executionsquery(String aiResourceGroup, List<String> executableIds, String configurationId, String scenarioId, String executionScheduleId, String status, Integer $top, Integer $skip, String $select) Get list of executionswithDefaultHeaders(Map<String, String> defaultHeaders) Creates a new API instance with additional default headers.
-
Constructor Details
-
ExecutionApi
public ExecutionApi()Instantiates this API class to invoke operations on the AI Core -
ExecutionApi
Instantiates this API class to invoke operations on the AI Core- Parameters:
aiCoreService- The configured connectivity instance to AI Core
-
-
Method Details
-
withDefaultHeaders
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 executionsPatch 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 idaiExecutionBulkModificationRequest- 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 executionsRetrieve 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 idexecutableIds- (optional) Limit query to only these executable IDsconfigurationId- (optional) Configuration identifierscenarioId- (optional) Scenario identifierexecutionScheduleId- (optional) Execution Schedule identifierstatus- (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 executionsRetrieve 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 executionCreate 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 idaiEnactmentCreationRequest- 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 deletedMark 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 idexecutionId- 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 executionRetrieve 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 idexecutionId- (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 executionRetrieve 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 idexecutionId- 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 executionRetrieve 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 identifierauthorization- (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 executionRetrieve 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 executionUpdate 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 idexecutionId- Execution identifieraiExecutionModificationRequest- 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 executionsRetrieve 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 idexecutableIds- (optional) Limit query to only these executable IDsconfigurationId- (optional) Configuration identifierscenarioId- (optional) Scenario identifierexecutionScheduleId- (optional) Execution Schedule identifierstatus- (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 executionsRetrieve 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
-