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

# Patch View

> # Description

Patches the view.

# Payload

```json
{
    "projectId": "string",
    "dashboardId": "string",
    "name": "string",
    "fromDate": "string",
    "toDate": "string",
    "filter": array,
    "displayConfig": object
}
```

where: 

* `projectId`: Project identifier. Optional.
* `dashboardId`: Dashboard Identifier to attach the view to it. Optional.
* `name`: Name for the view. Optional.
* `fromDate`: Starting date in `YYYY-MM-DD` format. Optional.
* `toDate`: Ending date in `YYYY-MM-DD` format. Optional.
* `filter`: Filters applied to the view. Optional.
* `displayConfig`: Please refer to the Fetch views `Response` documentation. Optional.

# Response

## 200 OK

```json
{
    "name": "string",
    "id": "string",
    "projectId": "string",
    "dashboardId": "string",
    "fromDate": "string",
    "toDate": "string",
    "filter": array,
    "displayConfig": object,
    "userId": "string"
}
```

where: 

* `id`: View identifier.
* `projectId`: Project identifier.
* `dashboardId`: Dashboard Identifier to attach the view to it.
* `name`: Name for the view.
* `fromDate`: Starting date in `YYYY-MM-DD` format.
* `toDate`: Ending date in `YYYY-MM-DD` format.
* `filter`: Filters applied to the view.
* `displayConfig`: Please refer to the Fetch views `Response` documentation.
* `userId`: User identifier owner of the view.

## 401 Unauthorized

> The user doesn't have permissions.

## 500 Internal Server Error

> Error occurred while processing the request.

# Description

Patches the view.

# Payload

```json theme={null}
{
    "projectId": "string",
    "dashboardId": "string",
    "name": "string",
    "fromDate": "string",
    "toDate": "string",
    "filter": array,
    "displayConfig": object
}
```

where:

* `projectId`: Project identifier. Optional.
* `dashboardId`: Dashboard Identifier to attach the view to it. Optional.
* `name`: Name for the view. Optional.
* `fromDate`: Starting date in `YYYY-MM-DD` format. Optional.
* `toDate`: Ending date in `YYYY-MM-DD` format. Optional.
* `filter`: Filters applied to the view. Optional.
* `displayConfig`: Please refer to the Fetch views `Response` documentation. Optional.

# Response

## 200 OK

```json theme={null}
{
    "name": "string",
    "id": "string",
    "projectId": "string",
    "dashboardId": "string",
    "fromDate": "string",
    "toDate": "string",
    "filter": array,
    "displayConfig": object,
    "userId": "string"
}
```

where:

* `id`: View identifier.
* `projectId`: Project identifier.
* `dashboardId`: Dashboard Identifier to attach the view to it.
* `name`: Name for the view.
* `fromDate`: Starting date in `YYYY-MM-DD` format.
* `toDate`: Ending date in `YYYY-MM-DD` format.
* `filter`: Filters applied to the view.
* `displayConfig`: Please refer to the Fetch views `Response` documentation.
* `userId`: User identifier owner of the view.

## 401 Unauthorized

> The user doesn't have permissions.

## 500 Internal Server Error

> Error occurred while processing the request.


## OpenAPI

````yaml PATCH /projects-api/v1/views/{viewId}
openapi: 3.0.3
info:
  title: SightX API
  version: 1.0.0
  description: >-
    SightX REST API documentation. Most responses are JSON; some export
    endpoints return files. API access is a paid add-on — contact
    sales@sightx.io for details.
servers:
  - url: https://auth.admin.sightx.io
    description: Authentication (Production)
  - url: https://auth.staging-admin.sightx.io
    description: Authentication (Staging)
security:
  - AuthorizationHeader: []
paths:
  /projects-api/v1/views/{viewId}:
    patch:
      summary: Patch View
      description: >-
        # Description


        Patches the view.


        # Payload


        ```json

        {
            "projectId": "string",
            "dashboardId": "string",
            "name": "string",
            "fromDate": "string",
            "toDate": "string",
            "filter": array,
            "displayConfig": object
        }

        ```


        where: 


        * `projectId`: Project identifier. Optional.

        * `dashboardId`: Dashboard Identifier to attach the view to it.
        Optional.

        * `name`: Name for the view. Optional.

        * `fromDate`: Starting date in `YYYY-MM-DD` format. Optional.

        * `toDate`: Ending date in `YYYY-MM-DD` format. Optional.

        * `filter`: Filters applied to the view. Optional.

        * `displayConfig`: Please refer to the Fetch views `Response`
        documentation. Optional.


        # Response


        ## 200 OK


        ```json

        {
            "name": "string",
            "id": "string",
            "projectId": "string",
            "dashboardId": "string",
            "fromDate": "string",
            "toDate": "string",
            "filter": array,
            "displayConfig": object,
            "userId": "string"
        }

        ```


        where: 


        * `id`: View identifier.

        * `projectId`: Project identifier.

        * `dashboardId`: Dashboard Identifier to attach the view to it.

        * `name`: Name for the view.

        * `fromDate`: Starting date in `YYYY-MM-DD` format.

        * `toDate`: Ending date in `YYYY-MM-DD` format.

        * `filter`: Filters applied to the view.

        * `displayConfig`: Please refer to the Fetch views `Response`
        documentation.

        * `userId`: User identifier owner of the view.


        ## 401 Unauthorized


        > The user doesn't have permissions.


        ## 500 Internal Server Error


        > Error occurred while processing the request.
      operationId: patch-view-patch-projects-api-v1-views-viewid
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              dashboardId: '{{dashboardId}}'
              projectId: '{{projectId}}'
              fromDate: '2020-01-01'
              toDate: '2022-12-31'
      responses:
        '200':
          description: Patch View
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                name: My View
                id: 6148e4a99e3abc0d3b382752
                projectId: 60820257e8002f000f13d551
                dashboardId: d00000000000000000000011
                fromDate: '2020-01-01'
                toDate: '2022-12-31'
                filter: []
                displayConfig:
                  60d4b2fdf7ce530fa14c21cb:
                    expanded: true
                  60ca29dd1ace580e2feb56ea:
                    chartType: PIE
                    order: ORIGINAL
                    expanded: false
                  60ca2153f3e4670e361b6cb3:
                    chartType: DEFAULT
                    order: ORIGINAL
                    expanded: true
                    transposed: false
                userId: 5e1155a9091833000f274bbd
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      servers:
        - url: https://project.sightx.io
components:
  securitySchemes:
    AuthorizationHeader:
      type: apiKey
      in: header
      name: Authorization
      description: Access token obtained from the m2m-token endpoint.

````