Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [%iKnow] >  [Metrics] >  [MetricQAPI]
Private  Storage   

deprecatedclass %iKnow.Metrics.MetricQAPI extends %iKnow.Queries.AbstractQAPI

This is an automatically generated class, offering a functionally equivalent set of methods and queries as %iKnow.Metrics.MetricAPI, exposed as SqlProc methods.

See the classdocs for %iKnow.Metrics.MetricAPI for more information.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
12 3


Summary

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
GetMetricId GetValue SetValue


Methods

• classmethod GetMetricId(pDomainId As %Integer, pMetricName As %Integer, Output scText As %String = "") as %Library.Integer [ SQLProc = ]
Returns the ID corresponding to the supplied metric name for this domain.
• classmethod GetValue(pDomainId As %Integer, pMetricId As %Integer, pTargetType As %String(MAXLEN=32767), pTargetId As %Integer, pContext As %String(MAXLEN=32767)="") as %Library.Numeric [ SQLProc = ]

Returns the value of a particular target element identified by pTargetId (for example, when pTargetType = $$$IKMTRENTITY, pTargetId is a unique entity ID).

pContext is only required when the metric is not of type $$$IKMTRTYPEDOMAIN and should be a source ID for $$$IKMTRTYPESOURCE or a metadata value for $$$IKMTRTYPEGROUP.

• classmethod SetValue(pDomainId As %Integer, pMetricId As %Integer, pTargetType As %String(MAXLEN=32767), pTargetId As %Integer, pValue As %Integer, pContext As %String(MAXLEN=32767)="") as %Boolean [ SQLProc = ]

Sets the value of a particular target element identified by pTargetId (for example, when pTargetType = $$$IKMTRENTITY, pTargetId is a unique entity ID) to pValue.

pContext is only required when the metric is not of type $$$IKMTRTYPEDOMAIN and should be a source ID for $$$IKMTRTYPESOURCE or a metadata value for $$$IKMTRTYPEGROUP.


Queries

• query GetMetrics(pDomainId As %Integer)
Selects metricId As %Integer, name As %String(MAXLEN=32767), description As %String(MAXLEN=32767), type As %String(MAXLEN=32767), definitionClass As %String(MAXLEN=32767), builderClass As %String(MAXLEN=32767), groupField As %String(MAXLEN=32767)
Returns all the metrics registered in this domain.
• query GetTargets(pDomainId As %Integer, pMetricId As %Integer)
Selects targetType As %String(MAXLEN=32767)
Returns all the target types registered for a given metric.
• query GetTop(pDomainId As %Integer, pMetricId As %Integer, pPage As %Integer = 1, pPageSize As %Integer = 10, pContext As %String(MAXLEN=32767)="", pTargetType As %String(MAXLEN=32767)="")
Selects targetId As %Integer, targetValue As %String(MAXLEN=32767), score As %Numeric, targetType As %String(MAXLEN=32767)

Returns the elements with the highest values for custom metric pMetricId, optionally restricted to the target type pTargetType.

pContext is ignored when the metric is type $$$IKMTRTYPEDOMAIN and should be a source ID for $$$IKMTRTYPESOURCE or a metadata value for $$$IKMTRTYPEGROUP. In the latter case, pContext is optional and the top entries for all metadata values will be returned if left blank.



Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.