---
updatedAt: 2025-08-22T22:28:02.000Z
agentTools:
  projectIndex: https://docs.cloudzero.com/llms.txt
---

# /v2/views/{view_id}

Get a single View

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "version": "2.0.0",
    "title": "CloudZero API V2 Resources",
    "description": "CloudZero V2 API",
    "contact": {
      "name": "CloudZero Support",
      "url": "https://www.cloudzero.com/contact",
      "email": "support@cloudzero.com"
    },
    "license": {
      "name": "BSD 3",
      "identifier": "BSD-3"
    }
  },
  "servers": [
    {
      "url": "https://api.cloudzero.com"
    }
  ],
  "tags": [
    {
      "name": "views",
      "description": "View Resources"
    }
  ],
  "paths": {
    "/v2/views/{view_id}": {
      "get": {
        "operationId": "getOneView",
        "description": "Get a single View",
        "tags": [
          "views"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/cloudzero_idempotency_key"
          },
          {
            "$ref": "#/components/parameters/cloudzero_test_key"
          },
          {
            "$ref": "#/components/parameters/view_id"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "view": {
                      "$ref": "#/components/schemas/view"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequestError"
          },
          "403": {
            "$ref": "#/components/responses/forbiddenError"
          }
        },
        "security": [
          {
            "APIKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "cloudzero_test_key": {
        "description": "If passed, the operation executes in the namespace specified by this key.\nResource mutations in the namespace last for 1 hour.\n",
        "name": "cloudzero-test-key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "cloudzero_idempotency_key": {
        "description": "If passed, any subsequent operation with the same value for this header will return the exact same result.\nThis is true for all responses, i.e. successes and errors.\n",
        "name": "cloudzero-idempotency-key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "view_id": {
        "description": "Unique View identifier",
        "name": "view_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "forbiddenError": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            }
          }
        }
      },
      "badRequestError": {
        "description": "Bad Request Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "$ref": "#/components/schemas/error"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "error": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "epoch": {
        "description": "String representation of an epoch (UTC timestamp)",
        "type": "string",
        "pattern": "^\\d+(\\.\\d{1,})?$"
      },
      "with_id": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ]
      },
      "with_last_updated": {
        "type": "object",
        "properties": {
          "last_updated": {
            "description": "UTC timestamp for the last update of this entity",
            "$ref": "#/components/schemas/epoch"
          }
        },
        "required": [
          "last_updated"
        ]
      },
      "view_base": {
        "allOf": [
          {
            "$ref": "#/components/schemas/view_new"
          },
          {
            "$ref": "#/components/schemas/with_id"
          },
          {
            "$ref": "#/components/schemas/with_last_updated"
          }
        ]
      },
      "view": {
        "allOf": [
          {
            "$ref": "#/components/schemas/view_base"
          },
          {
            "type": "object",
            "properties": {
              "notifications": {
                "$ref": "#/components/schemas/view_notifications_response"
              }
            }
          }
        ]
      },
      "view_new": {
        "type": "object",
        "properties": {
          "name": {
            "description": "View name",
            "type": "string"
          },
          "filter": {
            "$ref": "#/components/schemas/view_filter"
          },
          "connections": {
            "$ref": "#/components/schemas/view_connections"
          },
          "principal_dimension": {
            "$ref": "#/components/schemas/view_principal_dimension"
          },
          "anomalies": {
            "$ref": "#/components/schemas/view_anomalies"
          },
          "notifications": {
            "$ref": "#/components/schemas/view_notifications"
          }
        },
        "required": [
          "name",
          "principal_dimension",
          "connections",
          "filter"
        ]
      },
      "view_anomalies": {
        "type": "object",
        "description": "Anomalies configuration for the view. These fields are used to configure the anomaly detection for the view.\nAnomalies are detected by comparing the cost of a given day to the cost of the previous day.\nIf the cost of the current day is greater than or equal to the threshold, an anomaly event will be generated.\nThe anomaly event will be sent to the configured connections for the view.\nThe following fields are used to configure the anomaly detection:\n",
        "properties": {
          "enabled": {
            "description": "Specifies whether or not to enable anomaly detection for the view.\n  `true` (Default): anomaly detection is enabled for the view\n  `false`: anomaly detection is disabled for the view\n",
            "type": "boolean"
          },
          "threshold_type": {
            "$ref": "#/components/schemas/view_anomalies_threshold_type"
          },
          "threshold_amount": {
            "$ref": "#/components/schemas/view_anomalies_threshold_amount"
          },
          "min_cost_impact": {
            "description": "Minimum dollar threshold for anomaly detection. This optional field sets a floor value that works alongside the percentage-based threshold (automatic or manual). Anomalies must exceed BOTH the percentage-based threshold AND this minimum cost impact to trigger a notification.\nThe effective threshold is calculated as: `GREATEST(percentage_threshold, min_cost_impact)`\nFor example, if a view has an automatic threshold of $10 and min_cost_impact is set to $50, only anomalies that cost at least $50 will trigger notifications, even if they exceed the $10 percentage-based threshold.\nThis helps suppress low-dollar anomalies that meet the percentage threshold but are too small to investigate.\n",
            "type": "number",
            "format": "double",
            "minimum": 0
          }
        }
      },
      "view_anomalies_threshold_type": {
        "description": "Type of threshold to use when detecting anomalies within this view. This field, combined with the `threshold_amount`\nfield sets the threshold for anomalies detected within this view. The threshold is used to determine if a day to day\ncost spike is considered an anomaly. The cost spike  must be greater\nor equal to the threshold in order generate an anomaly event. The following values are currently supported:\n  `Automatic`: the threshold will be automatically calculated using a sliding scale based on the view's cost\n  `Percent`: the threshold will be a percentage of the view's cost\n",
        "type": "string",
        "enum": [
          "Automatic",
          "Percent"
        ]
      },
      "view_anomalies_threshold_amount": {
        "description": "Value of the threshold to apply to anomalies for the specified view. The value is interpreted based on the `threshold_type`:\n  `Automatic`: threshold_amount is ignored when the threshold type is `Automatic`\n  `Percent`: threshold_amount is the percentage of the view's cost to use as the threshold\n",
        "type": "integer"
      },
      "view_connections": {
        "description": "Contains the connections that will receive notifications for this view",
        "type": "object",
        "properties": {
          "email": {
            "$ref": "#/components/schemas/view_connections_email"
          },
          "slack": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/view_connections_slack"
            }
          }
        }
      },
      "view_connections_email": {
        "description": "Email Connection",
        "type": "object",
        "properties": {
          "addresses": {
            "description": "List of email addresses to notify",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "include_all_organizers": {
            "description": "Whether or not to additionally notifiy all organizers in the organization",
            "type": "boolean"
          }
        }
      },
      "view_connections_slack": {
        "description": "Slack Connection",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "view_notifications": {
        "description": "Enabled flags for the view's weekly and monthly spend trend notifications. These do not control anomaly notifications; use `anomalies` for those. Both default to `true`. Send only the fields to set. Omitted fields keep their current value (`true` for a new view), and updating other view fields never changes them. The create response reports the view's actual settings.\n",
        "type": "object",
        "properties": {
          "weekly": {
            "description": "Whether the weekly spend trend notification is enabled",
            "type": "boolean"
          },
          "monthly": {
            "description": "Whether the monthly spend trend notification is enabled",
            "type": "boolean"
          }
        },
        "example": {
          "weekly": false,
          "monthly": true
        }
      },
      "view_notifications_response": {
        "description": "Current weekly and monthly spend trend notification flags, not anomaly settings. Create, get one, and list return them unless the settings could not be read at that moment, in which case the field is absent; absence means unknown, not enabled.\n",
        "type": "object",
        "properties": {
          "weekly": {
            "description": "Whether the weekly spend trend notification is enabled",
            "type": "boolean"
          },
          "monthly": {
            "description": "Whether the monthly spend trend notification is enabled",
            "type": "boolean"
          }
        },
        "required": [
          "weekly",
          "monthly"
        ],
        "example": {
          "weekly": false,
          "monthly": true
        }
      },
      "view_filter": {
        "description": "Filter mapping of dimension name to allowed values",
        "type": "object",
        "additionalProperties": {
          "description": "filters",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "example": {
          "accounts": [
            "123456789012"
          ]
        }
      },
      "view_principal_dimension": {
        "description": "primary group by dimension for the view",
        "type": "string"
      }
    },
    "securitySchemes": {
      "APIKeyAuth": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "x-readme": {}
}
```