Class ScenarioApi
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 CoreScenarioApi(AiCoreService aiCoreService) Instantiates this API class to invoke operations on the AI Core -
Method Summary
Modifier and TypeMethodDescriptionGet scenario by idGet list of scenariosqueryModels(String scenarioId, String aiResourceGroup) Get information about all models available in LLM global scenarioqueryVersions(String aiResourceGroup, String scenarioId) Get list of versions for scenarioqueryVersions(String aiResourceGroup, String scenarioId, List<String> labelSelector) Get list of versions for scenariowithDefaultHeaders(Map<String, String> defaultHeaders) Creates a new API instance with additional default headers.
-
Constructor Details
-
ScenarioApi
public ScenarioApi()Instantiates this API class to invoke operations on the AI Core -
ScenarioApi
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
-
get
@Nonnull public AiScenario get(@Nonnull String aiResourceGroup, @Nonnull String scenarioId) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Get scenario by idRetrieve details for a scenario specified by scenarioId.
200 - A scenario
400 - The specification of the resource was incorrect
404 - The specified resource was not found
- Parameters:
aiResourceGroup- Specify a resource group idscenarioId- Scenario identifier- Returns:
- AiScenario
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
query
@Nonnull public AiScenarioList query(@Nonnull String aiResourceGroup) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Get list of scenariosRetrieve a list of all available scenarios.
200 - A list of scenarios
- Parameters:
aiResourceGroup- Specify a resource group id- Returns:
- AiScenarioList
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
queryModels
@Nonnull public AiModelList queryModels(@Nonnull String scenarioId, @Nonnull String aiResourceGroup) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Get information about all models available in LLM global scenarioRetrieve information about all models available in LLM global scenario
200 - The request was successful and information of all LLM models will be returned.
400 - The specification of the resource was incorrect
- Parameters:
scenarioId- Scenario identifieraiResourceGroup- Specify a resource group id- Returns:
- AiModelList
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
queryVersions
@Nonnull public AiVersionList queryVersions(@Nonnull String aiResourceGroup, @Nonnull String scenarioId, @Nullable List<String> labelSelector) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Get list of versions for scenarioRetrieve a list of scenario versions based on the versions of executables available within that scenario.
200 - A list of versions for the scenario
400 - The specification of the resource was incorrect
- Parameters:
aiResourceGroup- (required) Specify a resource group idscenarioId- (required) Scenario identifierlabelSelector- (optional) filter by labels. Pass in expressions in the form of \"key=value\" or \"key!=value\" separated by commas and the result will be filtered to only those resources that have labels that match all provided expressions (i.e. logical AND)- Returns:
- AiVersionList
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
queryVersions
@Nonnull public AiVersionList queryVersions(@Nonnull String aiResourceGroup, @Nonnull String scenarioId) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Get list of versions for scenarioRetrieve a list of scenario versions based on the versions of executables available within that scenario.
200 - A list of versions for the scenario
400 - The specification of the resource was incorrect
- Parameters:
aiResourceGroup- Specify a resource group idscenarioId- Scenario identifier- Returns:
- AiVersionList
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-