Package com.sap.ai.sdk.core.client

# Class ArtifactApi

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

public class ArtifactApi 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.

- ## Field Summary

  ### Fields inherited from class com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi

  `apiClient, defaultHeaders`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ArtifactApi()`
  Instantiates this API class to invoke operations on the AI Core
  `ArtifactApi(AiCoreService aiCoreService)`
  Instantiates this API class to invoke operations on the AI Core

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Integer`
  `count(String aiResourceGroup)`
  Get number of artifacts
  `Integer`
  `count(String aiResourceGroup, String scenarioId, String executionId, String name, String kind, String $search, Boolean searchCaseInsensitive, List<String> artifactLabelSelector)`
  Get number of artifacts
  `AiArtifactCreationResponse`
  `create(String aiResourceGroup, AiArtifactPostData aiArtifactPostData)`
  Register artifact
  `AiArtifact`
  `get(String aiResourceGroup, String artifactId)`
  Get artifact by ID
  `AiArtifact`
  `get(String aiResourceGroup, String artifactId, String $expand)`
  Get artifact by ID
  `AiArtifactList`
  `query(String aiResourceGroup)`
  Get list of artifacts
  `AiArtifactList`
  `query(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 artifacts
  `ArtifactApi`
  `withDefaultHeaders(Map<String,String> defaultHeaders)`
  Creates a new API instance with additional default headers.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ArtifactApi

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

  - ### ArtifactApi

    public ArtifactApi(@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 ArtifactApi 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

  - ### 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 artifacts

    Retrieve 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 id
      `scenarioId` - (optional) Scenario identifier
      `executionId` - (optional) Execution identifier
      `name` - (optional) Artifact name
      `kind` - (optional) Kind of the artifact
      `$search` - (optional) Generic search term to be looked for in various attributes
      `searchCaseInsensitive` - (optional, default to false) indicates whether the search should be case insensitive
      `artifactLabelSelector` - (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 artifacts

    Retrieve 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 artifact

    Register 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 id
      `aiArtifactPostData` - 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 ID

    Retrieve 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 id
      `artifactId` - (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 ID

    Retrieve 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 id
      `artifactId` - 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 artifacts

    Retrieve 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 id
      `scenarioId` - (optional) Scenario identifier
      `executionId` - (optional) Execution identifier
      `name` - (optional) Artifact name
      `kind` - (optional) Kind of the artifact
      `artifactLabelSelector` - (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 attributes
      `searchCaseInsensitive` - (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 artifacts

    Retrieve 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