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

# Retrieve workspace asset analytics

> Retrieve the Activity tab's Assets numbers, one row per library asset or file in a workspace. Pages by workspace: `page` and `limit` count workspaces, and each page holds every row of up to `limit` workspaces.

> [!NOTE]
>
> This endpoint is rate limited to **60 requests per minute** per
> company. See [Rate limits](https://developers.dock.us/api-reference/rate-limits.md) for details.

Returns both sections of the **Activity → Assets** tab: library assets (`kind: asset`) and files uploaded to the workspace (`kind: file`). Use `filters[kind]` for one of them. Each row includes `asset` on asset rows or `file` on file rows (the other is null), so you can key rows by workspace ID plus asset or file ID. Only files uploaded to the workspace itself (`file.source: Project`) have view and download counts; files from tasks, forms, comments and file widgets always return 0, as in the app.

This endpoint pages by workspace, not by row: `page` and `limit` count workspaces, and each page holds every asset and file row of up to `limit` workspaces. `pageInfo.total` and `pageInfo.pages` count workspaces, and `pageInfo.pageTotal` counts the rows on the page. A page can be empty when its workspaces have no assets or files; keep paging while `hasNextPage` is `true`.


## OpenAPI

````yaml get /workspaces/analytics/assets
openapi: 3.1.0
info:
  title: Dock API
  description: >-
    The Dock API is a RESTful API that allows you to interact with Dock in a
    programmatic way
  termsOfService: https://www.dock.us/legal/terms
  contact:
    name: API Support
    email: developers@dock.us
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://api.dock.us/{version}
    description: Production server
    variables:
      version:
        default: v1
        enum:
          - v1
security:
  - bearerAuth: []
tags:
  - name: Status check
    description: API to check if the API is up
  - name: Accounts
    description: API to manage accounts
  - name: Assets
    description: API to manage assets
  - name: Asset share links
    description: API to retrieve asset share links
  - name: Courses
    description: API to retrieve courses and their content
  - name: Files
    description: API to manage files
  - name: Forms
    description: API to retrieve forms and their responses
  - name: Learning assignments
    description: API to assign courses and pathways to learners
  - name: Meetings
    description: API to manage meetings and call transcripts
  - name: Pathways
    description: API to retrieve learning pathways
  - name: Playbooks
    description: API to retrieve playbooks and their content
  - name: Tags
    description: API to manage tags
  - name: Users
    description: API to manage users
  - name: Workspaces
    description: API to manage workspaces
  - name: Workspace analytics
    description: API to pull the numbers behind a workspace's Activity tab
  - name: Templates
    description: API to manage templates
  - name: Workspace pages
    description: API to manage workspace pages
  - name: Workspace plans
    description: API to manage workspace plans
  - name: Workspace plan tasks
    description: API to manage workspace plan tasks
  - name: Workspace sections
    description: API to manage workspace sections
paths:
  /workspaces/analytics/assets:
    get:
      tags:
        - Workspace analytics
      summary: Retrieve workspace asset analytics
      description: >-
        Retrieve the Activity tab's Assets numbers, one row per library asset or
        file in a workspace. Pages by workspace: `page` and `limit` count
        workspaces, and each page holds every row of up to `limit` workspaces.
      parameters:
        - $ref: '#/components/parameters/workspaceAssetAnalyticsProperties'
        - $ref: '#/components/parameters/workspaceAssetAnalyticsFilters'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: >-
            Retrieve the Activity tab's Assets numbers, one row per library
            asset or file in a workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      workspaceAssetAnalytics:
                        type: array
                        items:
                          $ref: '#/components/schemas/WorkspaceAssetAnalytics'
                      pageInfo:
                        $ref: '#/components/schemas/Pagination'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
components:
  parameters:
    workspaceAssetAnalyticsProperties:
      name: properties
      in: query
      description: >-
        Select the numbers and nested fields to return. By default a row has
        only `object`, `kind`, `workspace`, and `asset` or `file` (the other is
        null); `workspace.*`, `asset.*` and `file.*` add fields to them.
      schema:
        type: array
        items:
          type: string
          enum:
            - viewsCount
            - downloadsCount
            - lastActivityAt
            - workspace.name
            - workspace.workspaceUrl
            - workspace.createdAt
            - workspace.updatedAt
            - asset.name
            - asset.assetType
            - asset.assetUrl
            - asset.thumbnailUrl
            - asset.createdAt
            - asset.updatedAt
            - file.name
            - file.url
            - file.source
            - file.createdAt
            - creator.createdAt
            - creator.updatedAt
            - creator.firstName
            - creator.lastName
            - creator.avatar
            - creator.email
            - creator.name
    workspaceAssetAnalyticsFilters:
      name: filters
      in: query
      description: >-
        Filter the workspaces to report on. Without `workspaceId`, every
        workspace in the company is included.
      style: deepObject
      explode: true
      schema:
        type: object
        properties:
          workspaceId:
            type: string
            description: Comma-separated workspace IDs (up to 100)
            example: RiHO4e0Ju3DS,aB3dE5fG7hJ9
          accountId:
            type: string
            description: Only workspaces of this account
          templateId:
            type: string
            description: Only workspaces created from this template
          kind:
            type: string
            enum:
              - asset
              - file
            description: Only library assets or only files
    page:
      name: page
      in: query
      example: 1
      description: Page number
      schema:
        type: integer
    limit:
      name: limit
      in: query
      description: Number of results to return
      example: 10
      schema:
        type: integer
  schemas:
    WorkspaceAssetAnalytics:
      type: object
      required:
        - object
        - kind
        - workspace
        - asset
        - file
      properties:
        object:
          type: string
          description: Type of the object
          enum:
            - workspace-asset-analytics
          example: workspace-asset-analytics
          readOnly: true
        kind:
          type: string
          enum:
            - asset
            - file
          description: >-
            `asset` for a library asset (read `asset`), `file` for a file in the
            workspace (read `file`). Always returned.
          example: asset
        workspace:
          $ref: '#/components/schemas/Workspace'
          description: >-
            The workspace this row is about. Always returned with `object`, `id`
            and `url`; `workspace.*` adds fields.
        asset:
          allOf:
            - $ref: '#/components/schemas/Asset'
          nullable: true
          description: >-
            The library asset this row is about, on `kind: asset` rows; null on
            file rows. Always returned with `object`, `id` and `url`; `asset.*`
            adds fields.
        file:
          type: object
          nullable: true
          description: >-
            The file this row is about, on `kind: file` rows; null on asset
            rows. Always returned with `object` and `id`; `file.*` adds fields.
          required:
            - object
            - id
          properties:
            object:
              type: string
              enum:
                - workspace-file
              example: workspace-file
              readOnly: true
            id:
              type: string
              description: ID of the file in the workspace
              example: fL3kQ8vZpW2a
              readOnly: true
            name:
              type: string
              nullable: true
              description: File name
              example: Pricing.pdf
            url:
              type: string
              nullable: true
              description: File URL
              example: https://files.dock.us/pricing.pdf
            source:
              type: string
              nullable: true
              description: >-
                Where the file was uploaded. Only `Project` files have view and
                download counts; the others always return 0.
              enum:
                - Project
                - Task
                - File Widget
                - Project File Widget
                - Project message comment
                - Form
                - Plan step comment
              example: Project
            createdAt:
              type: string
              format: date-time
              nullable: true
              description: When the file was uploaded
              example: '2026-10-01T12:00:00.000Z'
        viewsCount:
          type: integer
          description: Views
          example: 9
        downloadsCount:
          type: integer
          description: Downloads
          example: 2
        lastActivityAt:
          type: string
          description: Most recent view or download
          example: '2026-10-01T12:00:00.000Z'
          format: date-time
          nullable: true
        creator:
          allOf:
            - $ref: '#/components/schemas/User'
          nullable: true
          description: >-
            Who uploaded the file, with the requested `creator.*` properties.
            Null for assets.
    Pagination:
      type: object
      properties:
        page:
          type: integer
          description: Current page number
          example: 1
        pages:
          type: integer
          description: Total number of pages
          example: 10
        total:
          type: integer
          description: Total number of items
          example: 100
        pageTotal:
          type: integer
          description: Number of items on the current page
          example: 10
        hasNextPage:
          type: boolean
          description: Whether there is a next page
          example: true
        hasPrevPage:
          type: boolean
          description: Whether there is a previous page
          example: false
    Workspace:
      allOf:
        - $ref: '#/components/schemas/BaseObject'
        - type: object
          properties:
            workspaceUsers:
              type: array
              description: Users of the workspace
              items:
                $ref: '#/components/schemas/WorkspaceUser'
            workspaceDomains:
              type: array
              description: Domains of the workspace
              items:
                $ref: '#/components/schemas/WorkspaceDomain'
            account:
              $ref: '#/components/schemas/Account'
            object:
              type: string
              description: Type of the object
              enum:
                - workspace
              example: workspace
              readOnly: true
            url:
              type: string
              example: https://api.dock.us/v1/workspaces/RiHO4e0Ju3DS
              description: URL to the resource
              readOnly: true
            name:
              type: string
              description: Name of the workspace
              example: Customer Onboarding
            workspaceUrl:
              type: string
              description: URL of the workspace
              example: https://acme.dock.us/customer-onboarding-vRQgIvscHAiO
            templateId:
              type: string
              description: ID of the associated template
              example: RiHO4e0Ju3DS
              nullable: true
            startDate:
              type: string
              format: date
              description: Start date of the workspace
              example: '2024-01-01'
              nullable: true
            targetEndDate:
              type: string
              format: date
              description: Target end date of the workspace
              example: '2024-01-01'
              nullable: true
            actualEndDate:
              type: string
              format: date
              description: Actual end date of the workspace
              example: '2024-01-01'
              nullable: true
            projectAge:
              type: number
              description: Age of the project
              example: 100
            taskProgress:
              type: string
              description: Progress of all the tasks
              example: '50'
            lastContactView:
              type: string
              format: date-time
              description: Last contact view date of the workspace
              example: '2024-01-01T00:00:00Z'
              nullable: true
            totalViews:
              type: number
              description: Total views of the workspace
              example: 100
            totalActions:
              type: number
              description: Total actions of the workspace
              example: 100
            totalTimeSpent:
              type: number
              description: Total time spent of the workspace
              example: 100
            contactsCount:
              type: number
              description: Number of contacts associated with the workspace
              example: 100
            deal:
              $ref: '#/components/schemas/Deal'
        - type: object
          properties:
            customFields:
              type: array
              description: Custom fields associated with the workspace
              items:
                $ref: '#/components/schemas/CustomFieldWithValue'
    Asset:
      allOf:
        - $ref: '#/components/schemas/BaseObject'
        - type: object
          properties:
            tags:
              type: array
              description: Tags of the asset
              items:
                $ref: '#/components/schemas/Tag'
            object:
              type: string
              description: Type of the object
              enum:
                - asset
              example: asset
              readOnly: true
            url:
              type: string
              example: https://api.dock.us/v1/assets/RiHO4e0Ju3DS
              description: URL to the resource
              readOnly: true
            name:
              type: string
              description: Name of the asset
              example: Logo
            description:
              type: string
              description: Description of the asset
              example: Logo of the asset
              nullable: true
            transcript:
              type:
                - string
                - 'null'
              description: Transcript extracted from the asset file
            views:
              type: integer
              description: Number of views
              example: 100
            shares:
              type: integer
              description: Number of shares
              example: 100
            assetType:
              type: string
              description: Type of the asset
              enum:
                - image
                - pdf
                - link
                - video
                - audio
                - embed
                - htmlPage
                - googleDocEmbed
                - googleSheetEmbed
                - googleSlidesEmbed
                - microsoftWordEmbed
                - microsoftExcelEmbed
                - microsoftPowerPointEmbed
                - googleDocEmbedPdf
                - googleSheetEmbedPdf
                - googleSlidesEmbedPdf
                - microsoftWordEmbedPdf
                - microsoftExcelEmbedPdf
                - microsoftPowerPointEmbedPdf
              example: image
            assetUrl:
              type: string
              format: uri
              description: URL to the asset
              example: https://dock.us/logo.png
            thumbnailUrl:
              type: string
              format: uri
              description: >-
                Preview image shown for the asset in the Library. Resolved in
                order: a custom thumbnail set in Dock, then the file's generated
                thumbnail (images use the file itself), then the link preview
                image for link and embed assets. `null` when none exists — for
                example a PDF or video uploaded through the API that has not yet
                been opened in Dock, an audio asset, or an HTML page without a
                custom thumbnail. URLs pointing at private storage are signed
                and expire after a few hours, so re-read the asset instead of
                storing the URL.
              example: >-
                https://storage.googleapis.com/dock-production-private/thumbnail/RiHO4e0Ju3DS.png?X-Goog-Signature=...
              nullable: true
              readOnly: true
            isInternal:
              type: boolean
              description: Whether the asset is restricted to internal use
              example: false
    User:
      allOf:
        - $ref: '#/components/schemas/BaseObject'
        - type: object
          properties:
            object:
              type: string
              description: Type of the object
              enum:
                - user
              example: user
              readOnly: true
            url:
              type: string
              example: https://api.dock.us/v1/users/RiHO4e0Ju3DS
              description: URL to the resource
              readOnly: true
            firstName:
              type: string
              description: First name of the user
              example: John
              nullable: true
            lastName:
              type: string
              description: Last name of the user
              example: Doe
              nullable: true
            avatar:
              type: string
              format: uri
              description: Avatar of the user
              example: https://dock.us/avatar.png
              nullable: true
            email:
              type: string
              description: Email of the user
              example: john.doe@example.com
            name:
              type: string
              description: Name of the user
              example: John Doe
    BaseObject:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Id'
        updatedAt:
          type: string
          format: date-time
          description: Last updated date
          example: '2021-01-01T00:00:00.000Z'
          readOnly: true
        createdAt:
          type: string
          format: date-time
          description: Created at date
          example: '2021-01-01T00:00:00.000Z'
          readOnly: true
    WorkspaceUser:
      allOf:
        - $ref: '#/components/schemas/BaseObject'
        - type: object
          properties:
            object:
              type: string
              description: Type of the object
              enum:
                - workspace-user
              example: workspace-user
              readOnly: true
            url:
              type: string
              example: https://api.dock.us/v1/workspace-users/RiHO4e0Ju3DS
              description: URL to the resource
              readOnly: true
            role:
              $ref: '#/components/schemas/WorkspaceRole'
            user:
              $ref: '#/components/schemas/User'
    WorkspaceDomain:
      allOf:
        - $ref: '#/components/schemas/BaseObject'
        - type: object
          properties:
            object:
              type: string
              description: Type of the object
              enum:
                - workspace-domain
              example: workspace-domain
              readOnly: true
            url:
              type: string
              example: https://api.dock.us/v1/workspace-domains/RiHO4e0Ju3DS
              description: URL to the resource
              readOnly: true
            role:
              $ref: '#/components/schemas/WorkspaceRole'
            domain:
              type: string
              description: Domain of the workspace user
              format: hostname
              example: dock.us
    Account:
      allOf:
        - $ref: '#/components/schemas/BaseObject'
        - type: object
          properties:
            object:
              type: string
              description: Type of the object
              enum:
                - account
              example: account
              readOnly: true
            url:
              type: string
              example: https://api.dock.us/v1/accounts/RiHO4e0Ju3DS
              description: URL to the resource
              readOnly: true
            name:
              type: string
              description: Name of the account
              example: Dock
            website:
              type: string
              format: uri
              description: Website of the account
              example: https://dock.us
              nullable: true
            ownerId:
              type: string
              description: Owner ID of the account
              example: RiHO4e0Ju3DS
            logo:
              type: string
              format: uri
              description: Logo of the account
              example: https://dock.us/logo.png
              nullable: true
            salesforceAccountId:
              type: string
              description: Salesforce account ID of the account
              example: 0015f00000Bg59dAAB
              nullable: true
            hubspotCompanyId:
              type: string
              description: HubSpot company ID of the account
              example: '8662045446'
              nullable: true
    Deal:
      allOf:
        - $ref: '#/components/schemas/BaseObject'
        - type: object
          properties:
            object:
              type: string
              description: Type of the object
              enum:
                - deal
              example: deal
              readOnly: true
            url:
              type: string
              example: https://api.dock.us/v1/deals/RiHO4e0Ju3DS
              description: URL to the resource
              readOnly: true
            createdDate:
              type: string
              format: date-time
              description: Created date of the deal
              example: '2024-01-01T00:00:00Z'
              nullable: true
            closeDate:
              type: string
              format: date-time
              description: Close date of the deal
              example: '2024-01-01T00:00:00Z'
              nullable: true
            name:
              type: string
              description: Name of the deal
              example: Deal 1
              nullable: true
            amount:
              type: integer
              description: Amount of the deal
              example: '100000'
              nullable: true
            type:
              type: string
              description: Type of the deal
              example: New Business
              nullable: true
            stage:
              type: string
              description: Stage of the deal
              example: Proposal Sent
              nullable: true
          oneOf:
            - properties:
                hubspotDealId:
                  type: string
                  description: HubSpot deal ID
                  example: '1234567890'
                  nullable: true
              additionalProperties: false
            - properties:
                salesforceOpportunityId:
                  type: string
                  description: Salesforce opportunity ID
                  example: 0015f00000Bg59dAAB
                  nullable: true
              additionalProperties: false
    CustomFieldWithValue:
      allOf:
        - $ref: '#/components/schemas/CustomField'
        - type: object
          properties:
            value:
              type: string
              description: >-
                Value of the custom field. For `richText` fields this is
                returned as HTML.
              example: 'Yes'
    Tag:
      allOf:
        - $ref: '#/components/schemas/BaseObject'
        - type: object
          properties:
            object:
              type: string
              description: Type of the object
              enum:
                - tag
              example: tag
              readOnly: true
            url:
              type: string
              example: https://api.dock.us/v1/tags/RiHO4e0Ju3DS
              description: URL to the resource
              readOnly: true
            title:
              type: string
              description: Title of the tag
              example: Logo
    Id:
      type: string
      description: Id of the object
      example: RiHO4e0Ju3DS
      readOnly: true
    WorkspaceRole:
      type: string
      description: Role of the user to access the workspace
      enum:
        - owner
        - editor
        - collaborator
        - viewer
        - commenter
      example: owner
    CustomField:
      allOf:
        - $ref: '#/components/schemas/BaseObject'
        - type: object
          properties:
            object:
              type: string
              description: Type of the object
              enum:
                - custom-field
              example: custom-field
              readOnly: true
            url:
              type: string
              example: https://api.dock.us/v1/custom-fields/RiHO4e0Ju3DS
              description: URL to the resource
              readOnly: true
            variableName:
              type: string
              description: Variable name of the custom field
              example: account.name
            type:
              type: string
              description: Type of the custom field
              example: singleCheckbox
              enum:
                - number
                - date
                - singleLineText
                - multiLineText
                - richText
                - singleCheckbox
                - multiCheckboxes
                - dropdownSelect
                - radioSelect
            options:
              type: array
              description: For dropdown, radio, and checkbox custom fields, the options
              nullable: true
              items:
                type: object
                properties:
                  index:
                    type: integer
                    description: Index of the option
                    example: 1
                  label:
                    type: string
                    description: Label of the option
                    example: 'Yes'
                  value:
                    type: string
                    description: Value of the option
                    example: 'true'
  responses:
    '400':
      description: >-
        The server cannot or will not process the request due to something that
        is perceived to be a client error (e.g., malformed request syntax,
        invalid request message framing, or deceptive request routing)
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    description: A short code indicating the error code returned
                    example: BAD_REQUEST
                  message:
                    type: string
                    description: A human readable explanation of what went wrong
                    example: >-
                      The request could not be understood or was missing
                      required parameters
                required:
                  - code
                  - message
            required:
              - error
    '401':
      description: >-
        Although the HTTP standard specifies "unauthorized", semantically this
        response means "unauthenticated". That is, the client must authenticate
        itself to get the requested response
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - UNAUTHORIZED
                    description: A short code indicating the error code returned
                    example: UNAUTHORIZED
                  message:
                    type: string
                    description: A human readable explanation of what went wrong
                    example: >-
                      Access denied. You are not authorized to access this
                      resource
                required:
                  - code
                  - message
            required:
              - error
    '403':
      description: >-
        The client does not have access rights to the content; that is, it is
        unauthorized, so the server is refusing to give the requested resource.
        Unlike 401 Unauthorized, the client's identity is known to the server
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - FORBIDDEN
                    description: A short code indicating the error code returned
                    example: FORBIDDEN
                  message:
                    type: string
                    description: A human readable explanation of what went wrong
                    example: Access to this resource is restricted
                required:
                  - code
                  - message
            required:
              - error
    '429':
      description: >-
        The user has sent too many requests in a given amount of time ("rate
        limiting")
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - RATE_LIMIT_EXCEEDED
                    description: A short code indicating the error code returned
                    example: RATE_LIMIT_EXCEEDED
                  message:
                    type: string
                    description: A human readable explanation of what went wrong
                    example: Rate limit exceeded. Please try again later
                required:
                  - code
                  - message
            required:
              - error
    '500':
      description: The server has encountered a situation it does not know how to handle
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - INTERNAL_SERVER_ERROR
                    description: A short code indicating the error code returned
                    example: INTERNAL_SERVER_ERROR
                  message:
                    type: string
                    description: A human readable explanation of what went wrong
                    example: >-
                      The server has encountered a situation it does not know
                      how to handle
                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.