{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cisco-catalyst-center/json-schema/cisco-catalyst-center-dnsservices-trend-analytics-response-model-schema.json",
  "title": "DNSServicesTrendAnalyticsResponseModel",
  "description": "DNS Services Trend Analytics Response Model",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cisco-catalyst-center-dns-services-api-openapi.yml#/components/schemas/DNSServicesTrendAnalyticsResponseModel",
  "type": "object",
  "properties": {
    "version": {
      "type": "string",
      "description": "Response version"
    },
    "response": {
      "type": "array",
      "description": "Trend Analytics response",
      "items": {
        "$ref": "#/$defs/DNSServicesTrendAnalyticsResponse"
      }
    },
    "page": {
      "$ref": "#/$defs/NetworkServicesPaginationWithTrendResponse"
    }
  },
  "$defs": {
    "DNSServicesTrendAnalyticsResponse": {
      "type": "object",
      "properties": {
        "timestamp": {
          "type": "integer",
          "description": "Timestamp of the data (epoch time)",
          "format": "int64"
        },
        "groups": {
          "type": "array",
          "description": "List of groups",
          "items": {
            "$ref": "#/$defs/NetworkServicesAnalyticsGroup"
          }
        },
        "attributes": {
          "type": "array",
          "description": "List of attributes",
          "items": {
            "$ref": "#/$defs/NetworkServicesAttributeResponse"
          }
        },
        "aggregateAttributes": {
          "type": "array",
          "description": "List of aggregate attributes",
          "items": {
            "$ref": "#/$defs/NetworkServicesAggregateAttributeResponse"
          }
        }
      },
      "description": "DNS Services Trend Analytics Response object"
    },
    "NetworkServicesAggregateAttributeResponse": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Aggregate attribute name"
        },
        "function": {
          "type": "string",
          "description": "Aggregate function"
        },
        "value": {
          "type": "object",
          "description": "This is the aggregate value of the attribute after applying the function on the dataset"
        }
      }
    },
    "NetworkServicesAnalyticsGroup": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "This is the group key. Its the concatination of groupBy attributes"
        },
        "attributes": {
          "type": "array",
          "description": "List of attributes",
          "items": {
            "$ref": "#/$defs/NetworkServicesAttributeResponse"
          }
        },
        "aggregateAttributes": {
          "type": "array",
          "description": "List of aggregate attributes",
          "items": {
            "$ref": "#/$defs/NetworkServicesAggregateAttributeResponse"
          }
        }
      },
      "description": "Network Services Analytics Group object"
    },
    "NetworkServicesAttributeResponse": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the attribute"
        },
        "value": {
          "type": "object",
          "description": "Value of the attribute"
        }
      }
    },
    "NetworkServicesPaginationWithTrendResponse": {
      "type": "object",
      "properties": {
        "limit": {
          "minimum": 1,
          "type": "integer",
          "description": "Number of records to be returned in response",
          "default": 100
        },
        "offset": {
          "minimum": 1,
          "type": "integer",
          "description": "Starting offset of data to fetch and returned",
          "default": 1
        },
        "count": {
          "minimum": 1,
          "type": "integer",
          "description": "Total number of records that can be returned for this request",
          "default": 1
        },
        "timestampOrder": {
          "type": "string",
          "description": "The sort order of the timestamp can be either ascending or descending",
          "enum": [
            "asc",
            "desc"
          ]
        }
      }
    }
  }
}