> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rootprint.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update saved view



## OpenAPI

````yaml /api/openapi.json patch /api/indexes/{indexId}/views/{viewId}
openapi: 3.1.0
info:
  description: HTTP API for the Rootprint log management platform.
  title: Rootprint API
  version: 0.3.4
servers:
  - description: Rootprint API
    url: https://example.com
security:
  - cookieAuth: []
paths:
  /api/indexes/{indexId}/views/{viewId}:
    patch:
      tags:
        - Log explorer
      summary: Update saved view
      operationId: patchApiIndexesByIndexIdViewsByViewId
      parameters:
        - in: path
          name: indexId
          required: true
          schema:
            minLength: 1
            type: string
        - in: path
          name: viewId
          required: true
          schema:
            minimum: 1
            pattern: ^\d+$
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              properties:
                columns:
                  anyOf:
                    - items:
                        type: string
                      type: array
                    - type: 'null'
                description:
                  anyOf:
                    - type: string
                    - type: 'null'
                filters:
                  items:
                    properties:
                      exclude:
                        type: boolean
                      field:
                        minLength: 1
                        type: string
                      value:
                        minLength: 1
                        type: string
                    required:
                      - field
                      - value
                      - exclude
                    type: object
                  type: array
                name:
                  maxLength: 200
                  minLength: 1
                  type: string
                query:
                  type: string
                sortDirection:
                  enum:
                    - asc
                    - desc
                  type: string
              required: []
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedViewResponse'
          description: Successful response
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    SavedViewResponse:
      properties:
        columns:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
        createdAt:
          format: date-time
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
        filters:
          items:
            properties:
              exclude:
                type: boolean
              field:
                minLength: 1
                type: string
              value:
                minLength: 1
                type: string
            required:
              - field
              - value
              - exclude
            type: object
          type: array
        id:
          type: number
        indexId:
          type: string
        name:
          type: string
        query:
          type: string
        sortDirection:
          enum:
            - asc
            - desc
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - id
        - indexId
        - name
        - description
        - query
        - filters
        - sortDirection
        - columns
        - createdAt
        - updatedAt
      type: object
    ApiErrorBody:
      properties:
        error:
          properties:
            code:
              type: string
            details:
              items:
                properties:
                  message:
                    type: string
                  path:
                    type: string
                required:
                  - path
                  - message
                type: object
              type: array
            message:
              type: string
            requestId:
              type: string
            statusCode:
              type: number
          required:
            - code
            - message
            - statusCode
            - requestId
          type: object
      required:
        - error
      type: object
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Request validation failed
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Authentication required
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Permission denied
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Resource not found
    Conflict:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Conflict with current resource state
    InternalError:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Internal server error
    ServiceUnavailable:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Upstream service unavailable
  securitySchemes:
    cookieAuth:
      in: cookie
      name: better-auth.session_token
      type: apiKey

````