{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/observeinc/json-schema/observeinc-apm-environments-list-response-schema.json",
  "title": "ApmEnvironmentsListResponse",
  "description": "Response envelope for GET /v1/apm/environments. `interval` echoes the\nserver-resolved query window. Pagination is on the environments axis\n— `serviceNamespaces` is the complete list per environment, never paged.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/observeinc-apm-api-openapi.yml#/components/schemas/Apm-EnvironmentsListResponse",
  "type": "object",
  "required": [
    "interval",
    "environments",
    "meta"
  ],
  "properties": {
    "interval": {
      "$ref": "#/$defs/Apm-Interval"
    },
    "environments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Apm-EnvironmentEntry"
      }
    },
    "meta": {
      "$ref": "#/$defs/Apm-Meta"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Apm-EnvironmentEntry": {
      "title": "ApmEnvironmentEntry",
      "type": "object",
      "description": "One environment + the service namespaces observed in it.",
      "required": [
        "environment",
        "serviceNamespaces",
        "truncated"
      ],
      "properties": {
        "environment": {
          "type": "string"
        },
        "serviceNamespaces": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "truncated": {
          "type": "boolean",
          "description": "True when serviceNamespaces was capped at the server limit and the\nfull set for this environment is larger than the array returned.\nserviceNamespaces is never paged; this flag signals truncation.\n"
        }
      },
      "additionalProperties": false
    },
    "Apm-Interval": {
      "title": "ApmInterval",
      "type": "object",
      "description": "A `[startTime, endTime)` half-open window. Used both as the per-record\ntime slice on `MetricsRecord` and as the response-level executed-window\necho. RFC3339, startTime inclusive, endTime exclusive.\n",
      "required": [
        "startTime",
        "endTime"
      ],
      "properties": {
        "startTime": {
          "type": "string",
          "format": "date-time"
        },
        "endTime": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    },
    "Apm-Meta": {
      "title": "ApmMeta",
      "type": "object",
      "description": "APM list-response meta. Extends platform Meta (totalCount only) with\nlimit and offset echoed from the request. A totalCount of -1 means the\nexact count is unknown (too expensive to compute); in that case paginate\nby advancing offset until a short page (len(items) < limit) is returned.\n",
      "required": [
        "totalCount",
        "limit",
        "offset"
      ],
      "properties": {
        "totalCount": {
          "type": "integer",
          "format": "int64"
        },
        "limit": {
          "type": "integer",
          "format": "int64"
        },
        "offset": {
          "type": "integer",
          "format": "int64"
        }
      },
      "additionalProperties": false
    }
  }
}