Class MetricsApi
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 CoreMetricsApi(AiCoreService aiCoreService) Instantiates this API class to invoke operations on the AI Core -
Method Summary
Modifier and TypeMethodDescriptionDelete metrics, tags, or labelsGet metrics according to specified filter conditions.find(String aiResourceGroup, String $filter, List<String> executionIds, List<String> $select, String tagFilters, Integer $top, Integer $skip) Get metrics according to specified filter conditions.com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponsepatch(String aiResourceGroup, TrckMetricResource trckMetricResource) Create or update metrics, tags, or labelswithDefaultHeaders(Map<String, String> defaultHeaders) Creates a new API instance with additional default headers.
-
Constructor Details
-
MetricsApi
public MetricsApi()Instantiates this API class to invoke operations on the AI Core -
MetricsApi
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
-
delete
@Nonnull public TrckDeleteMetricsResponse delete(@Nonnull String aiResourceGroup, @Nonnull String executionId) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Delete metrics, tags, or labelsDelete metrics, tags, or labels associated with an execution.
200 - Metric Resource was successfully deleted
404 - The specified resource was not found
- Parameters:
aiResourceGroup- Specify a resource group idexecutionId- The Id of an execution- Returns:
- TrckDeleteMetricsResponse
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
find
@Nonnull public TrckGetMetricResourceList find(@Nonnull String aiResourceGroup, @Nullable String $filter, @Nullable List<String> executionIds, @Nullable List<String> $select, @Nullable String tagFilters, @Nullable Integer $top, @Nullable Integer $skip) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Get metrics according to specified filter conditions.Retrieve metrics, labels, or tags according to filter conditions. One query parameter is mandatory, either execution ID or filter. Use up to 10 execution IDs in a query parameter. With top/skip parameters it is possible to paginate the result list.
200 - List of tracking metadata, where each item includes metrics, labels, tags and customInfo. If $select query parameter is specified, each item will include only the resources specified in $select.
400 - The specification of the resource was incorrect
501 - Operation is not Supported.
- Parameters:
aiResourceGroup- (required) Specify a resource group id$filter- (optional) Filter parameter allows filtering of metric resource using ExecutionId(s). User can only use in, eq operators in filter expression.executionIds- (optional) executionIds parameter allows filtering of metric resource using single or multiple ExecutionId(s).$select- (optional) returns only the resources that the client explicitly requests. User can also pass * as a value for $select, which will behave same as that of not passing $select query param.tagFilters- (optional) Filter metrics using tags by providing expressions in the format name=value or name!=value, separated by commas (,). The results will include only those metrics that match all the specified tag expressions, ensuring a logical AND operation. The filter supports up to 100 tag expressions, key-only searches (e.g., name) without a value, and tags containing special characters, which must be properly percent-encoded for accurate matching.$top- (optional, default to 1000) Number of results to display$skip- (optional) Number of results to be skipped from the ordered list of results- Returns:
- TrckGetMetricResourceList
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
find
@Nonnull public TrckGetMetricResourceList find(@Nonnull String aiResourceGroup) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Get metrics according to specified filter conditions.Retrieve metrics, labels, or tags according to filter conditions. One query parameter is mandatory, either execution ID or filter. Use up to 10 execution IDs in a query parameter. With top/skip parameters it is possible to paginate the result list.
200 - List of tracking metadata, where each item includes metrics, labels, tags and customInfo. If $select query parameter is specified, each item will include only the resources specified in $select.
400 - The specification of the resource was incorrect
501 - Operation is not Supported.
- Parameters:
aiResourceGroup- Specify a resource group id- Returns:
- TrckGetMetricResourceList
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
patch
@Nonnull public com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse patch(@Nonnull String aiResourceGroup, @Nonnull TrckMetricResource trckMetricResource) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Create or update metrics, tags, or labelsUpdate or create metrics, tags, or labels associated with an execution.
204 - Metrics was successfully updated/created
400 - The specification of the resource was incorrect
413 - request entity is larger than limits defined by server.
- Parameters:
aiResourceGroup- Specify a resource group idtrckMetricResource- The value for the parameter trckMetricResource- Returns:
- An OpenApiResponse containing the status code of the HttpResponse.
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-