{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/amigo/main/json-schema/amigo-src-app-endpoints-metric-get-metrics-response-schema.json", "title": "Response", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/amigo-metric-api-openapi.yml#/components/schemas/src__app__endpoints__metric__get_metrics__Response", "properties": { "metrics": { "items": { "$ref": "#/$defs/MetricInstance" }, "type": "array", "title": "Metrics", "description": "The list of retrieved metrics." }, "has_more": { "type": "boolean", "title": "Has More", "description": "Whether there are more metrics to retrieve." }, "continuation_token": { "anyOf": [ {}, { "type": "null" } ], "title": "Continuation Token", "description": "The continuation token to use to retrieve the next set of metrics." }, "filter_values": { "anyOf": [ { "$ref": "#/$defs/src__app__endpoints__metric__get_metrics__Response__FilterValues" }, { "type": "null" } ], "description": "For each filter that this endpoint supports that can take on dynamic values, this field includes what these values are. This is only provided for the first page in the pagination results.\n\nNote that the values are counted assuming the authenticated user has access to all the metrics, so they might differ from how many are actually\nretrieved." } }, "type": "object", "required": [ "metrics", "has_more", "continuation_token", "filter_values" ], "$defs": { "MetricInstance": { "properties": { "id": { "type": "string", "title": "Id", "description": "The ID of the metric." }, "org_id": { "type": "string", "title": "Org Id", "description": "The organization ID of the metric." }, "name": { "type": "string", "title": "Name", "description": "The name of the metric." }, "applied_to_services": { "items": { "type": "string" }, "type": "array", "title": "Applied To Services", "description": "The services that the metric is applied to." }, "additional_notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Additional Notes", "description": "Additional notes about the metric." }, "tags": { "items": { "$ref": "#/$defs/Tag" }, "type": "array", "title": "Tags", "description": "The tags of the metric." }, "creator": { "$ref": "#/$defs/amigo_lib__mongo__collections__metric__Metric__UserInfo", "description": "The user who created the metric." }, "updated_by": { "$ref": "#/$defs/amigo_lib__mongo__collections__metric__Metric__UserInfo", "description": "The user who last updated the metric." }, "metric_value_type": { "$ref": "#/$defs/MetricValueType", "description": "The type of value that this metric is measuring." }, "is_deleted": { "type": "boolean", "title": "Is Deleted", "description": "Whether the metric is deleted." }, "created_at": { "type": "string", "format": "date-time", "title": "Created At", "description": "The time when the metric is created." }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At", "description": "The time when the metric is last updated." } }, "type": "object", "required": [ "id", "org_id", "name", "applied_to_services", "additional_notes", "tags", "creator", "updated_by", "metric_value_type", "is_deleted", "created_at", "updated_at" ], "title": "MetricInstance" }, "MetricValueType": { "type": "string", "enum": [ "boolean", "numerical", "categorical" ] }, "Tag": { "properties": { "key": { "type": "string", "title": "Key" }, "value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Value" } }, "type": "object", "required": [ "key", "value" ], "title": "Tag" }, "amigo_lib__mongo__collections__metric__Metric__UserInfo": { "properties": { "org_id": { "type": "string", "title": "Org Id" }, "user_id": { "type": "string", "title": "User Id" } }, "type": "object", "required": [ "org_id", "user_id" ], "title": "UserInfo" }, "src__app__endpoints__metric__get_metrics__Response__FilterValues": { "properties": { "applied_to_services_ids": { "items": { "type": "string" }, "type": "array", "title": "Applied To Services Ids", "description": "A set of service IDs that have metrics applied to the service." }, "creators": { "items": { "$ref": "#/$defs/amigo_lib__mongo__collections__metric__Metric__UserInfo" }, "type": "array", "title": "Creators", "description": "A set of creator infos that created the metrics under the current filters." }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags", "description": "A set of tag keys that exist in the metrics under the current filters." }, "types": { "items": { "type": "string" }, "type": "array", "title": "Types", "description": "A set of metric types that exist in the metrics under the current filters." } }, "type": "object", "required": [ "applied_to_services_ids", "creators", "tags", "types" ], "title": "FilterValues" } } }