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

# Update saved view

> Update your personal view, or an owned/shared view with current write authority. Administrators can manage shared views; only its owner can make one personal. Versions reject concurrent edits.



## OpenAPI

````yaml api-reference/openapi.json PATCH /v1/orgs/{orgId}/databases/{databaseId}/tables/{tableId}/views/{viewId}
openapi: 3.1.2
info:
  title: Rootset public API
  version: 0.2.2
  description: >-
    Typed MDM storage. Temporal values are UTC only; IDs are opaque ULIDs.
    Runtime table definitions are discovered through the schema endpoint.
servers:
  - url: http://localhost:4310
security: []
paths:
  /v1/orgs/{orgId}/databases/{databaseId}/tables/{tableId}/views/{viewId}:
    patch:
      tags:
        - schema
      summary: >-
        Update your personal view, or an owned/shared view with current write
        authority. Administrators can manage shared views; only its owner can
        make one personal. Versions reject concurrent edits.
      operationId: updateSavedView
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
          example: 01K6J7B8000000000000000000
        - name: databaseId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
          example: 01K6J7B8000000000000000001
        - name: tableId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
          example: 01K6J7B8000000000000000002
        - name: viewId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
          example: 01K6J7B8000000000000000003
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 8
            maxLength: 255
          description: >-
            Bound to actor, operation, target, schema version and canonical
            payload; changed input returns 409.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                expectedSchemaVersion:
                  type: integer
                  minimum: 1
                  maximum: 2147483647
                expectedVersion:
                  type: string
                  pattern: ^[1-9][0-9]{0,18}$
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                visibility:
                  type: string
                  enum:
                    - personal
                    - shared
                definition:
                  type: object
                  properties:
                    columnOrder:
                      maxItems: 200
                      type: array
                      items:
                        type: string
                        pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
                    columnWidths:
                      type: object
                      propertyNames:
                        type: string
                      additionalProperties:
                        type: number
                        minimum: 40
                        maximum: 2000
                    frozenColumns:
                      type: integer
                      minimum: 0
                      maximum: 200
                    hiddenColumns:
                      maxItems: 200
                      type: array
                      items:
                        type: string
                        pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
                    query:
                      type: object
                      properties:
                        where: 2bf74ec6-dac9-415e-93c5-af08542a0a84
                        orderBy:
                          maxItems: 8
                          type: array
                          items:
                            type: object
                            properties:
                              field:
                                type: string
                                minLength: 1
                                maxLength: 64
                              direction:
                                type: string
                                enum:
                                  - asc
                                  - desc
                            required:
                              - field
                              - direction
                            additionalProperties: false
                      additionalProperties: false
                  required:
                    - columnOrder
                    - columnWidths
                    - frozenColumns
                    - hiddenColumns
                    - query
                  additionalProperties: false
              required:
                - expectedSchemaVersion
                - expectedVersion
              additionalProperties: false
              $defs:
                __schema0:
                  anyOf:
                    - type: object
                      properties:
                        field:
                          type: string
                          minLength: 1
                          maxLength: 64
                        op:
                          type: string
                          enum:
                            - eq
                            - ne
                            - lt
                            - lte
                            - gt
                            - gte
                            - between
                            - in
                            - isNull
                            - isNotNull
                            - prefix
                            - contains
                            - iContains
                            - pathExists
                            - pathEq
                            - jsonContains
                        value:
                          description: >-
                            Any finite JSON value. Cell size/depth and typed
                            numeric policies are enforced by the domain
                            validator.
                          anyOf:
                            - type: 'null'
                            - type: boolean
                            - type: number
                            - type: string
                            - type: array
                              items: {}
                            - type: object
                              additionalProperties: {}
                        path:
                          maxItems: 32
                          type: array
                          items:
                            anyOf:
                              - type: string
                                maxLength: 1024
                              - type: integer
                                minimum: 0
                                maximum: 2147483647
                      required:
                        - field
                        - op
                      additionalProperties: false
                    - type: object
                      properties:
                        and:
                          minItems: 1
                          maxItems: 100
                          type: array
                          items:
                            $ref: >-
                              #/components/schemas/updateSavedViewInput/$defs/__schema0
                      required:
                        - and
                      additionalProperties: false
                    - type: object
                      properties:
                        or:
                          minItems: 1
                          maxItems: 100
                          type: array
                          items:
                            $ref: >-
                              #/components/schemas/updateSavedViewInput/$defs/__schema0
                      required:
                        - or
                      additionalProperties: false
            example:
              expectedSchemaVersion: 1
              expectedVersion: '1'
              name: Needs review
      responses:
        '200':
          description: Authorised operation result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/updateSavedViewOutput'
        '400':
          description: Malformed request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Missing, expired, revoked or wrong-audience credential.
          headers:
            WWW-Authenticate:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: Insufficient current authority.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Unknown or undisclosed target.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '408':
          description: >-
            Ordinary JSON request body did not finish within its bounded read
            deadline.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: Revision, schema, uniqueness or idempotency conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '413':
          description: Payload or output budget exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '422':
          description: Typed validation failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate, concurrency or admission limit.
          headers:
            Retry-After:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '500':
          description: Redacted internal failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '502':
          description: A required upstream service is unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '503':
          description: >-
            A required service is unavailable. Check service configuration
            before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - apiKey: []
        - oauth:
            - rows:read
components:
  schemas:
    updateSavedViewOutput:
      type: object
      properties:
        id:
          type: string
          pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
        tableId:
          type: string
          pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
        name:
          type: string
          minLength: 1
          maxLength: 120
        visibility:
          type: string
          enum:
            - personal
            - shared
        ownerUserId:
          anyOf:
            - type: string
              pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
            - type: 'null'
        ownerName:
          type: string
        version:
          type: string
          pattern: ^[1-9][0-9]{0,18}$
        schemaVersion:
          type: integer
          minimum: 1
          maximum: 2147483647
        canEdit:
          type: boolean
        canChangeVisibility:
          type: boolean
        createdAt:
          type: string
          pattern: >-
            ^(?!0000)\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d\.\d{3}Z$
        updatedAt:
          type: string
          pattern: >-
            ^(?!0000)\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d\.\d{3}Z$
        definition:
          type: object
          properties:
            columnOrder:
              maxItems: 200
              type: array
              items:
                type: string
                pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
            columnWidths:
              type: object
              propertyNames:
                type: string
              additionalProperties:
                type: number
                minimum: 40
                maximum: 2000
            frozenColumns:
              type: integer
              minimum: 0
              maximum: 200
            hiddenColumns:
              maxItems: 200
              type: array
              items:
                type: string
                pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
            query:
              type: object
              properties:
                where: dc009ff5-ebee-4b20-a90a-ae3230a42872
                orderBy:
                  maxItems: 8
                  type: array
                  items:
                    type: object
                    properties:
                      field:
                        type: string
                        minLength: 1
                        maxLength: 64
                      direction:
                        type: string
                        enum:
                          - asc
                          - desc
                    required:
                      - field
                      - direction
                    additionalProperties: false
              additionalProperties: false
          required:
            - columnOrder
            - columnWidths
            - frozenColumns
            - hiddenColumns
            - query
          additionalProperties: false
        validationErrors:
          maxItems: 200
          type: array
          items:
            type: string
      required:
        - id
        - tableId
        - name
        - visibility
        - ownerUserId
        - ownerName
        - version
        - schemaVersion
        - canEdit
        - canChangeVisibility
        - createdAt
        - updatedAt
        - definition
        - validationErrors
      additionalProperties: false
      $defs:
        __schema0:
          anyOf:
            - type: object
              properties:
                field:
                  type: string
                  minLength: 1
                  maxLength: 64
                op:
                  type: string
                  enum:
                    - eq
                    - ne
                    - lt
                    - lte
                    - gt
                    - gte
                    - between
                    - in
                    - isNull
                    - isNotNull
                    - prefix
                    - contains
                    - iContains
                    - pathExists
                    - pathEq
                    - jsonContains
                value:
                  description: >-
                    Any finite JSON value. Cell size/depth and typed numeric
                    policies are enforced by the domain validator.
                  anyOf:
                    - type: 'null'
                    - type: boolean
                    - type: number
                    - type: string
                    - type: array
                      items: {}
                    - type: object
                      additionalProperties: {}
                path:
                  maxItems: 32
                  type: array
                  items:
                    anyOf:
                      - type: string
                        maxLength: 1024
                      - type: integer
                        minimum: 0
                        maximum: 2147483647
              required:
                - field
                - op
              additionalProperties: false
            - type: object
              properties:
                and:
                  minItems: 1
                  maxItems: 100
                  type: array
                  items:
                    $ref: '#/components/schemas/updateSavedViewOutput/$defs/__schema0'
              required:
                - and
              additionalProperties: false
            - type: object
              properties:
                or:
                  minItems: 1
                  maxItems: 100
                  type: array
                  items:
                    $ref: '#/components/schemas/updateSavedViewOutput/$defs/__schema0'
              required:
                - or
              additionalProperties: false
    ErrorEnvelope:
      type: object
      required:
        - error
      additionalProperties: false
      properties:
        error:
          type: object
          required:
            - code
            - message
            - requestId
          additionalProperties: false
          properties:
            code:
              type: string
              description: >-
                Known domain codes are published in ErrorCode; unknown future
                codes remain valid.
              x-rootset-known-error-codes:
                - VALIDATION_FAILED
                - UNAUTHENTICATED
                - ACCESS_DENIED
                - FORBIDDEN
                - LAST_ADMIN
                - INSUFFICIENT_SCOPE
                - PERSONAL_IDENTITY_REQUIRED
                - DELEGATION_EXCEEDS_AUTHORITY
                - RESOURCE_NOT_FOUND
                - ROW_VERSION_CONFLICT
                - SCHEMA_VERSION_CONFLICT
                - UNIQUE_CONFLICT
                - FOREIGN_KEY_CONFLICT
                - AUTO_INCREMENT_EXHAUSTED
                - ROW_SIZE_LIMIT
                - ROW_LIMIT_REACHED
                - PAYLOAD_TOO_LARGE
                - REQUEST_TIMEOUT
                - QUERY_TIMEOUT
                - CURSOR_INVALID
                - STEP_UP_REQUIRED
                - IDEMPOTENCY_CONFLICT
                - JOB_FAILED
                - RATE_LIMITED
                - CAPACITY_LIMIT
                - SCHEMA_MAINTENANCE
                - ARTIFACT_UNVERIFIED
                - ARTIFACT_EXPIRED
                - CONFIGURATION_INVALID
                - DEPENDENCY_UNAVAILABLE
                - INTERNAL_ERROR
            message:
              type: string
            requestId:
              type: string
            details: {}
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: Rootset personal API key
    oauth:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: http://localhost:4310/oauth/authorize
          tokenUrl: http://localhost:4310/oauth/token
          scopes:
            profile:manage: >-
              Current profile:manage authority; the live role ceiling still
              applies.
            account:security: >-
              Current account:security authority; the live role ceiling still
              applies.
            org:read: Current org:read authority; the live role ceiling still applies.
            org:manage: Current org:manage authority; the live role ceiling still applies.
            members:read: >-
              Current members:read authority; the live role ceiling still
              applies.
            members:manage: >-
              Current members:manage authority; the live role ceiling still
              applies.
            keys:manage: >-
              Current keys:manage authority; the live role ceiling still
              applies.
            team-keys:manage: >-
              Current team-keys:manage authority; the live role ceiling still
              applies.
            databases:read: >-
              Current databases:read authority; the live role ceiling still
              applies.
            databases:manage: >-
              Current databases:manage authority; the live role ceiling still
              applies.
            tables:read: >-
              Current tables:read authority; the live role ceiling still
              applies.
            tables:manage: >-
              Current tables:manage authority; the live role ceiling still
              applies.
            schema:manage: >-
              Current schema:manage authority; the live role ceiling still
              applies.
            rows:read: Current rows:read authority; the live role ceiling still applies.
            schema:read: >-
              Current schema:read authority; the live role ceiling still
              applies.
            rows:write: Current rows:write authority; the live role ceiling still applies.
            history:read: >-
              Current history:read authority; the live role ceiling still
              applies.
            exports:read: >-
              Current exports:read authority; the live role ceiling still
              applies.
            jobs:read: Current jobs:read authority; the live role ceiling still applies.
            jobs:cancel: >-
              Current jobs:cancel authority; the live role ceiling still
              applies.
            jobs:retry: Current jobs:retry authority; the live role ceiling still applies.
            backups:read: >-
              Current backups:read authority; the live role ceiling still
              applies.
            backups:manage: >-
              Current backups:manage authority; the live role ceiling still
              applies.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.