Class ArtifactApi
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 CoreArtifactApi(AiCoreService aiCoreService) Instantiates this API class to invoke operations on the AI Core -
Method Summary
Modifier and TypeMethodDescriptionGet number of artifactscount(String aiResourceGroup, String scenarioId, String executionId, String name, String kind, String $search, Boolean searchCaseInsensitive, List<String> artifactLabelSelector) Get number of artifactscreate(String aiResourceGroup, AiArtifactPostData aiArtifactPostData) Register artifactGet artifact by IDGet artifact by IDGet list of artifactsquery(String aiResourceGroup, String scenarioId, String executionId, String name, String kind, List<String> artifactLabelSelector, Integer $top, Integer $skip, String $search, Boolean searchCaseInsensitive, String $expand) Get list of artifactswithDefaultHeaders(Map<String, String> defaultHeaders) Creates a new API instance with additional default headers.
-
Constructor Details
-
ArtifactApi
public ArtifactApi()Instantiates this API class to invoke operations on the AI Core -
ArtifactApi
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
-
count
@Nonnull public Integer count(@Nonnull String aiResourceGroup, @Nullable String scenarioId, @Nullable String executionId, @Nullable String name, @Nullable String kind, @Nullable String $search, @Nullable Boolean searchCaseInsensitive, @Nullable List<String> artifactLabelSelector) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Get number of artifactsRetrieve the number of available artifacts that match the specified filter criteria. Filter criteria include a scenarioId, executionId, an artifact name, artifact kind, or artifact labels. Search by substring of artifact name or description is also possible.
200 - Number of artifacts
400 - The specification of the resource was incorrect
- Parameters:
aiResourceGroup- (required) Specify a resource group idscenarioId- (optional) Scenario identifierexecutionId- (optional) Execution identifiername- (optional) Artifact namekind- (optional) Kind of the artifact$search- (optional) Generic search term to be looked for in various attributessearchCaseInsensitive- (optional, default to false) indicates whether the search should be case insensitiveartifactLabelSelector- (optional) Filter artifact 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). The maximum number of labels permitted for filtering is 10. Special handling is required when using comma in the value field. This is because commas are also used as a separator for multiple \"key=value\" entries. Therefore, if the value contains a comma, then replace this with the string \"{comma}\" in the value field.- 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 artifactsRetrieve the number of available artifacts that match the specified filter criteria. Filter criteria include a scenarioId, executionId, an artifact name, artifact kind, or artifact labels. Search by substring of artifact name or description is also possible.
200 - Number of artifacts
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 AiArtifactCreationResponse create(@Nonnull String aiResourceGroup, @Nonnull AiArtifactPostData aiArtifactPostData) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Register artifactRegister an artifact for use in a configuration, for example a model or a dataset.
201 - The artifact has been registered successfully
400 - The specification of the resource was incorrect
- Parameters:
aiResourceGroup- Specify a resource group idaiArtifactPostData- The value for the parameter aiArtifactPostData- Returns:
- AiArtifactCreationResponse
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
get
@Nonnull public AiArtifact get(@Nonnull String aiResourceGroup, @Nonnull String artifactId, @Nullable String $expand) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Get artifact by IDRetrieve details for artifact with artifactId.
200 - An artifact
400 - The specification of the resource was incorrect
404 - The specified resource was not found
- Parameters:
aiResourceGroup- (required) Specify a resource group idartifactId- (required) Artifact identifier$expand- (optional) expand detailed information on scenario- Returns:
- AiArtifact
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
get
@Nonnull public AiArtifact get(@Nonnull String aiResourceGroup, @Nonnull String artifactId) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Get artifact by IDRetrieve details for artifact with artifactId.
200 - An artifact
400 - The specification of the resource was incorrect
404 - The specified resource was not found
- Parameters:
aiResourceGroup- Specify a resource group idartifactId- Artifact identifier- Returns:
- AiArtifact
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
query
@Nonnull public AiArtifactList query(@Nonnull String aiResourceGroup, @Nullable String scenarioId, @Nullable String executionId, @Nullable String name, @Nullable String kind, @Nullable List<String> artifactLabelSelector, @Nullable Integer $top, @Nullable Integer $skip, @Nullable String $search, @Nullable Boolean searchCaseInsensitive, @Nullable String $expand) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Get list of artifactsRetrieve a list of artifacts that matches the specified filter criteria. Filter criteria include scenario ID, execution ID, an artifact name, artifact kind, or artifact labels. Use top/skip parameters to paginate the result list. Search by substring of artifact name or description, if required.
200 - A list of artifacts
400 - The specification of the resource was incorrect
- Parameters:
aiResourceGroup- (required) Specify a resource group idscenarioId- (optional) Scenario identifierexecutionId- (optional) Execution identifiername- (optional) Artifact namekind- (optional) Kind of the artifactartifactLabelSelector- (optional) Filter artifact 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). The maximum number of labels permitted for filtering is 10. Special handling is required when using comma in the value field. This is because commas are also used as a separator for multiple \"key=value\" entries. Therefore, if the value contains a comma, then replace this with the string \"{comma}\" in the value field.$top- (optional, default to 10000) Number of results to display$skip- (optional) Number of results to be skipped from the ordered list of results$search- (optional) Generic search term to be looked for in various attributessearchCaseInsensitive- (optional, default to false) indicates whether the search should be case insensitive$expand- (optional) expand detailed information on scenario- Returns:
- AiArtifactList
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
query
@Nonnull public AiArtifactList query(@Nonnull String aiResourceGroup) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Get list of artifactsRetrieve a list of artifacts that matches the specified filter criteria. Filter criteria include scenario ID, execution ID, an artifact name, artifact kind, or artifact labels. Use top/skip parameters to paginate the result list. Search by substring of artifact name or description, if required.
200 - A list of artifacts
400 - The specification of the resource was incorrect
- Parameters:
aiResourceGroup- Specify a resource group id- Returns:
- AiArtifactList
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-