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

# Create View

> Create a new saved canvas view.

Captures the current search query, filters, and pinned nodes
so the user can restore this view later.

Returns:
    Updated list of all saved canvas views.



## OpenAPI

````yaml https://api.pragmatiks.io/openapi.json post /canvas/views
openapi: 3.1.0
info:
  title: Pragma API
  version: 0.1.0
servers: []
security: []
paths:
  /canvas/views:
    post:
      tags:
        - canvas
      summary: Create View
      description: |-
        Create a new saved canvas view.

        Captures the current search query, filters, and pinned nodes
        so the user can restore this view later.

        Returns:
            Updated list of all saved canvas views.
      operationId: canvas-create_view
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CanvasViewCreateRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CanvasViewsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CanvasViewCreateRequest:
      properties:
        name:
          type: string
          title: Name
        search_query:
          type: string
          title: Search Query
          default: ''
        filters:
          items:
            $ref: '#/components/schemas/FilterCriteria'
          type: array
          title: Filters
        pinned_node_ids:
          items:
            type: string
          type: array
          title: Pinned Node Ids
      type: object
      required:
        - name
      title: CanvasViewCreateRequest
      description: |-
        Request body for creating a saved canvas view.

        Attributes:
            name: User-assigned name for this view.
            search_query: Text search query to persist.
            filters: Filter criteria to persist.
            pinned_node_ids: Resource IDs to pin when restoring.
    CanvasViewsResponse:
      properties:
        views:
          items:
            $ref: '#/components/schemas/CanvasView'
          type: array
          title: Views
      type: object
      required:
        - views
      title: CanvasViewsResponse
      description: |-
        Response body for listing saved canvas views.

        Attributes:
            views: List of saved canvas views.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FilterCriteria:
      properties:
        type:
          type: string
          title: Type
        value:
          type: string
          title: Value
      type: object
      required:
        - type
        - value
      title: FilterCriteria
      description: |-
        Single filter criterion for a saved canvas view.

        Attributes:
            type: Filter category (provider, status, resourceType, health).
            value: Filter value to match against.
    CanvasView:
      properties:
        id:
          type: string
          title: Id
          default: ''
        name:
          type: string
          title: Name
        search_query:
          type: string
          title: Search Query
          default: ''
        filters:
          items:
            $ref: '#/components/schemas/FilterCriteria'
          type: array
          title: Filters
        pinned_node_ids:
          items:
            type: string
          type: array
          title: Pinned Node Ids
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      type: object
      required:
        - name
      title: CanvasView
      description: |-
        Persisted saved view for the canvas.

        Saved views capture a combination of search query, filters, and
        pinned nodes that users can restore later.

        Attributes:
            id: SurrealDB record identifier.
            name: User-assigned name for this view.
            search_query: Text search query to apply when restoring.
            filters: List of filter criteria to apply when restoring.
            pinned_node_ids: Resource IDs that should be pinned when restoring.
            created_at: Timestamp when the view was first saved.
            updated_at: Timestamp of last modification.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````