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

# Update a saved report

> Rewrites any of a report's fields; the rest keep their values. The result is checked as a whole, as the dashboard's builder checks it. `position` moves the report in the grid.



## OpenAPI

````yaml https://api.highseat.com/v1/openapi.json patch /sites/{site}/reports/{id}
openapi: 3.1.1
info:
  title: Highseat Stats API
  version: 1.0.0
  description: >-
    The same figures the dashboard shows, and the changes an admin makes there.
    A read key answers every GET route; a write key also answers the routes that
    change data.


    Authentication, write keys, idempotency, limits and the shape of every
    response: https://highseat.com/docs/api.
  license:
    name: Proprietary
servers:
  - url: https://api.highseat.com/v1
security:
  - bearerAuth: []
paths:
  /sites/{site}/reports/{id}:
    patch:
      tags:
        - Reports
      summary: Update a saved report
      description: >-
        Rewrites any of a report's fields; the rest keep their values. The
        result is checked as a whole, as the dashboard's builder checks it.
        `position` moves the report in the grid.
      operationId: updateReport
      parameters:
        - name: site
          in: path
          required: true
          schema:
            type: string
            description: 'The site: its domain as registered (example.com), or its site id.'
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: The report's id, from the reports list.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                  description: The tile's title.
                type:
                  enum:
                    - trend
                    - list
                  type: string
                  description: >-
                    trend charts the metric over time; list ranks the rows of
                    one dimension.
                metric:
                  enum:
                    - visitors
                    - sessions
                    - pageviews
                    - events
                    - bounceRate
                    - avgDuration
                    - revenue
                  type: string
                  description: >-
                    What a trend charts per bucket. `events` counts the event
                    each series names. A list ranks by its dimension's own
                    count, as its dashboard card does.
                dimension:
                  anyOf:
                    - enum:
                        - page_path
                        - entry_page
                        - exit_page
                        - hostname
                        - country
                        - region
                        - city
                        - browser
                        - os
                        - device_type
                        - referrer_source
                        - referrer_domain
                        - referrer_channel
                        - utm_source
                        - utm_medium
                        - utm_campaign
                        - utm_content
                        - utm_term
                        - event_name
                        - goal
                        - property
                      type: string
                    - type: 'null'
                  description: >-
                    A list's rows: a filter dimension a dashboard card lists
                    (page_path, entry_page, exit_page, hostname, country,
                    region, city, browser, os, device_type, referrer_source,
                    referrer_channel, utm_*, event_name), or property. Null for
                    a trend.
                propertyKey:
                  anyOf:
                    - type: string
                      minLength: 1
                      maxLength: 200
                    - type: 'null'
                  description: >-
                    The event property a list by `property` ranks the values of.
                    Null otherwise.
                series:
                  type: array
                  minItems: 1
                  maxItems: 3
                  items:
                    type: object
                    properties:
                      label:
                        type: string
                        maxLength: 100
                        default: ''
                        description: >-
                          The line's name in the legend. Empty names it by its
                          filters' values.
                      filters:
                        type: array
                        maxItems: 20
                        items:
                          type: string
                          maxLength: 1200
                        default: []
                        description: >-
                          The filters the line counts under, in the grammar
                          `filter=` takes, dimension[.key]:operator:value. All
                          have to match.
                  description: >-
                    One to 3 series for a trend, each drawn as its own line of
                    the same metric; exactly one for a list, whose filters
                    narrow its rows. An `events` trend names its event on every
                    series with `event_name:is:<name>` or
                    `goal.event:is:<name>`.
                period:
                  anyOf:
                    - not: {}
                    - type: 'null'
                  description: >-
                    The range the tile always reads: a calendar period (day,
                    week, month, year), all, or a window of an hour or more
                    (24h, 30d, 3mo). Null follows the Reports page's picker.
                granularity:
                  anyOf:
                    - enum:
                        - hour
                        - day
                        - week
                        - month
                      type: string
                    - type: 'null'
                  description: >-
                    A trend's bucket size. Null follows the range's length, as
                    the dashboard's chart does.
                showRevenue:
                  type: boolean
                  description: >-
                    Whether a list's tile shows its revenue column, once the
                    site has sold. A display choice: the report's results carry
                    each row's revenue either way.
                position:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                  description: >-
                    Moves the report to this place in the grid, counted from 0,
                    and renumbers the others around it. A number past the end
                    puts it last.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      type:
                        enum:
                          - trend
                          - list
                        type: string
                      metric:
                        enum:
                          - visitors
                          - sessions
                          - pageviews
                          - events
                          - bounceRate
                          - avgDuration
                          - revenue
                        type: string
                      dimension:
                        anyOf:
                          - type: string
                          - type: 'null'
                      propertyKey:
                        anyOf:
                          - type: string
                          - type: 'null'
                      series:
                        type: array
                        items:
                          type: object
                          properties:
                            label:
                              type: string
                            filters:
                              type: array
                              items:
                                type: string
                              description: >-
                                In the grammar `filter=` takes,
                                dimension[.key]:operator:value.
                          required:
                            - label
                            - filters
                      period:
                        anyOf:
                          - type: string
                          - type: 'null'
                      granularity:
                        anyOf:
                          - enum:
                              - hour
                              - day
                              - week
                              - month
                            type: string
                          - type: 'null'
                      showRevenue:
                        type: boolean
                      position:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        description: The report's place in the grid, ascending.
                      createdAt:
                        type: string
                        format: date-time
                        x-native-type: date
                      updatedAt:
                        type: string
                        format: date-time
                        x-native-type: date
                      createdBy:
                        anyOf:
                          - type: object
                            properties:
                              name:
                                type: string
                            required:
                              - name
                          - type: 'null'
                        description: >-
                          The API key that created the report. Null for one made
                          in the dashboard, and once the key is deleted.
                    required:
                      - id
                      - name
                      - type
                      - metric
                      - dimension
                      - propertyKey
                      - series
                      - period
                      - granularity
                      - showRevenue
                      - position
                      - createdAt
                      - updatedAt
                      - createdBy
                required:
                  - data
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            RateLimit:
              $ref: '#/components/headers/RateLimit'
        '400':
          $ref: '#/components/responses/WriteError400'
        '401':
          $ref: '#/components/responses/Error401'
        '403':
          $ref: '#/components/responses/WriteError403'
        '404':
          $ref: '#/components/responses/Error404'
        '409':
          $ref: '#/components/responses/WriteError409'
        '413':
          $ref: '#/components/responses/WriteError413'
        '422':
          $ref: '#/components/responses/WriteError422'
        '429':
          $ref: '#/components/responses/Error429'
        '503':
          $ref: '#/components/responses/Error503'
components:
  headers:
    RateLimit-Limit:
      description: Calls the key may make in the window.
      schema:
        type: integer
    RateLimit-Remaining:
      description: Calls left in the current window.
      schema:
        type: integer
    RateLimit-Reset:
      description: Seconds until the window reopens.
      schema:
        type: integer
    RateLimit-Policy:
      description: >-
        The quota and window, as the IETF draft writes it:
        "hourly";q=600;w=3600.
      schema:
        type: string
    RateLimit:
      description: >-
        The remaining budget, as the IETF draft writes it:
        "hourly";r=599;t=3540.
      schema:
        type: string
    Retry-After:
      description: Seconds to wait before the next call.
      schema:
        type: integer
  responses:
    WriteError400:
      description: >-
        The request is malformed, or its Idempotency-Key is not 1 to 255
        characters: BAD_REQUEST.
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error401:
      description: 'No API key, or one that is not valid: UNAUTHORIZED.'
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    WriteError403:
      description: >-
        The key can only read (KEY_READ_ONLY), or the workspace is closed until
        it pays and takes no changes (FORBIDDEN).
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error404:
      description: 'The site, the row the path names or the route does not exist: NOT_FOUND.'
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    WriteError409:
      description: >-
        The change conflicts with a row that exists (CONFLICT, or the write's
        own code, which carries the row's `id`), or a request with the same
        Idempotency-Key still runs (IDEMPOTENCY_KEY_IN_USE).
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    WriteError413:
      description: 'The body is over 1 MB: PAYLOAD_TOO_LARGE.'
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    WriteError422:
      description: >-
        The Idempotency-Key was sent with another request in the last 24 hours
        (IDEMPOTENCY_KEY_REUSED), or the site already has as many rows of this
        kind as it may save (the write's own code, such as GOAL_LIMIT_REACHED).
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error429:
      description: >-
        The key has used its hourly budget (RATE_LIMITED), or its workspace
        already runs as many calls at once as it may
        (TOO_MANY_CONCURRENT_REQUESTS).
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error503:
      description: 'The server is busy; retry in a moment: SERVICE_UNAVAILABLE.'
      headers:
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: >-
                Stable and machine-readable: BAD_REQUEST, INVALID_FILTER,
                INVALID_CURSOR, UNAUTHORIZED, FORBIDDEN, KEY_READ_ONLY,
                NOT_FOUND, METHOD_NOT_ALLOWED, CONFLICT, IDEMPOTENCY_KEY_IN_USE,
                PAYLOAD_TOO_LARGE, IDEMPOTENCY_KEY_REUSED, QUERY_TIMEOUT,
                RATE_LIMITED, TOO_MANY_CONCURRENT_REQUESTS, SERVICE_UNAVAILABLE
                or INTERNAL_SERVER_ERROR. A write may answer a code of its own:
                a conflict (GOAL_EXISTS, DOMAIN_TAKEN, SECRET_EXISTS) or a limit
                (GOAL_LIMIT_REACHED, FUNNEL_LIMIT_REACHED). Codes are added,
                never renamed.
            message:
              type: string
              description: What went wrong, written for a person.
            id:
              type: string
              description: >-
                On a conflict, the existing row's id, so a client can update it
                instead.
            issues:
              type: array
              items:
                type: object
                properties:
                  path:
                    type: array
                    items:
                      anyOf:
                        - type: string
                        - type: number
                    description: >-
                      The parameter at fault, e.g. ['filter', 1] for the second
                      filter.
                  message:
                    type: string
                required:
                  - path
                  - message
              description: One entry per invalid parameter.
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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