V1/metric
Was this helpful?
Was this helpful?
Delete a metric. The metric is no longer modifiable or usable, but remains in the database. One can still retrieve it using its ID to view metrics that were evaluated in previous conversations.
This endpoint will error if the metric is used in any simulation unit tests.
Permissions
This endpoint requires the following permissions:
User:GetUserInfo
for the authenticated user.
Metric:DeleteMetric
for the metric to delete.
The ID of the metric to update.
^[a-f0-9]{24}$
The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
No content
Search for metrics that match the given filters and contain the given query in its name or description. Only the top 50 results will be returned. The results will be sorted by the relevance of the search query.
Permissions
This endpoint requires the following permissions:
User:GetUserInfo
for the authenticated user.
This endpoint may be impacted by the following permissions:
Only metrics that the authenticated user has Metric:GetMetric
permission for will be retrieved.
The query to search for. Any metrics containing the terms in its name and description would be returned.
The IDs of the services that the metric is applied to.
The types of the metrics.
The creators of the metrics. Each value must be of the format org_id,user_id
.
The tags of the metrics. Must be specified using the syntax key:value
, which means to match all metrics with the given key
and value
pair among its tags. If value
is *
, it means the value
does not matter. If value
is empty, it matches against when the value is None
.
The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
Retrieve metrics that match the given filters.
Permissions
This endpoint requires the following permissions:
User:GetUserInfo
for the authenticated user.
This endpoint may be impacted by the following permissions:
Only metrics that the authenticated user has Metric:GetMetric
permission for will be retrieved.
The ID of the metric to retrieve.
The maximum number of metrics to return.
50
The continuation token from the previous request used to retrieve the next page of metrics.
0
The IDs of the services that the metric is applied to.
The types of the metrics.
Whether the metric is deleted.
false
The creators of the metrics. Each value must be of the format org_id,user_id
.
The tags of the metrics. Must be specified using the syntax key:value
, which means to match all metrics with the given key
and value
pair among its tags. If value
is *
, it means the value
does not matter. If value
is empty, it matches against when the value is None
.
The fields to sort the metrics by. Supported fields are updated_at
. Specify a +
before the field name to indicate ascending sorting and -
for descending sorting. Multiple fields can be specified to break ties.
[]
The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
Create a metric.
Permissions
User:GetUserInfo
for the authenticated user.
Metric:CreateMetric
for the metric to create.
The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
The name of the metric. Must be unique within the organization.
The description of the metric.
The services that the metric is applied to.
Additional notes about the metric.
Update properties of a metric. The metric's name and metric values cannot be updated.
Permissions
This endpoint requires the following permissions:
User:GetUserInfo
for the authenticated user.
Metric:ModifyMetric
for the metric to modify.
The ID of the metric to update.
^[a-f0-9]{24}$
The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
The description of the metric. Only updated if set.
The services that the metric is applied to. Only updated if set.
Additional notes about the metric. Only updated if set.
{}
A specific type to indicate that a field is not set in the request.
The tags of the metric. Only updated if set.
No content
Evaluate the specified metrics for the given conversation, optionally up to the specified interaction.
Permissions
This endpoint requires the following permissions:
User:GetUserInfo
for the authenticated user.
Metric:GetMetric
for the metrics.
Metric:EvaluateMetric
for the metrics.
The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
The IDs of the metrics to evaluate.
The ID of the conversation to evaluate the metrics for.
^[a-f0-9]{24}$
If specified, only messages up to (and including) this interaction will be evaluated.
^[a-f0-9]{24}$