---
title: "POST /v2/{+parent}/views"
method: POST
path: "/v2/{+parent}/views"
tags: ["locations"]
---

# POST /v2/{+parent}/views

`POST /v2/{+parent}/views`

Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.

## Path parameters

- `parent` string, required

## Query parameters

- `viewId` string

## Request body

- LogView — Describes a view over log entries in a bucket.
  - `updateTime` string, google-datetime — Output only. The last update timestamp of the view.
  - `createTime` string, google-datetime — Output only. The creation timestamp of the view.
  - `filter` string — Optional. Filter that restricts which log entries in a bucket are visible in this view.Filters must be logical conjunctions that use the AND operator, and they can use any of the following qualifiers: SOURCE(), which specifies a project, folder, organization, or billing account of origin. resource.type, which specifies the resource type. LOG_ID(), which identifies the log.They can also use the negations of these qualifiers with the NOT operator.For example:SOURCE("projects/myproject") AND resource.type = "gce_instance" AND NOT LOG_ID("stdout")
  - `name` string — Output only. The resource name of the view.For example:projects/my-project/locations/global/buckets/my-bucket/views/my-view
  - `description` string — Optional. Describes this view.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/logging.md) · [All operations](https://skmtc.dev/google/apis/logging/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/logging/revisions/820c4b0f7358/schema)
