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

# Fetch activity

> Returns a paginated list of activity items (change events) in your workspace, optionally filtered by project, text item, library component, or entity type.

**Filtering behavior:** `projectIds`, `textItemIds`, and `componentIds` are combined with OR logic — any activity matching at least one of the provided IDs (across all three filter types) is included. `entityType` is applied with AND logic on top of that, further narrowing results to only activity of the specified entity type.



## OpenAPI

````yaml openapi.json get /activity
openapi: 3.0.0
info:
  version: 1.0.0
  title: Ditto API
  description: Programmatically read and write data in your Ditto workspace.
servers:
  - url: https://api.dittowords.com/v2
security: []
paths:
  /activity:
    get:
      tags:
        - Activity
      summary: Fetch activity
      description: >-
        Returns a paginated list of activity items (change events) in your
        workspace, optionally filtered by project, text item, library component,
        or entity type.


        **Filtering behavior:** `projectIds`, `textItemIds`, and `componentIds`
        are combined with OR logic — any activity matching at least one of the
        provided IDs (across all three filter types) is included. `entityType`
        is applied with AND logic on top of that, further narrowing results to
        only activity of the specified entity type.
      parameters:
        - schema:
            type: string
            description: >-
              Comma-separated list of project developer IDs to filter activity
              for. Activity matching any of the provided project, text item, or
              component IDs is included (OR logic across all three ID filters).
          required: false
          description: >-
            Comma-separated list of project developer IDs to filter activity
            for. Activity matching any of the provided project, text item, or
            component IDs is included (OR logic across all three ID filters).
          name: projectIds
          in: query
        - schema:
            type: string
            description: >-
              Comma-separated list of text item developer IDs to filter activity
              for. Activity matching any of the provided project, text item, or
              component IDs is included (OR logic across all three ID filters).
          required: false
          description: >-
            Comma-separated list of text item developer IDs to filter activity
            for. Activity matching any of the provided project, text item, or
            component IDs is included (OR logic across all three ID filters).
          name: textItemIds
          in: query
        - schema:
            type: string
            description: >-
              Comma-separated list of library component developer IDs to filter
              activity for. Activity matching any of the provided project, text
              item, or component IDs is included (OR logic across all three ID
              filters).
          required: false
          description: >-
            Comma-separated list of library component developer IDs to filter
            activity for. Activity matching any of the provided project, text
            item, or component IDs is included (OR logic across all three ID
            filters).
          name: componentIds
          in: query
        - schema:
            type: string
            enum:
              - textItem
              - component
              - variant
              - variable
            description: >-
              Narrows results to a single entity type (AND logic with the ID
              filters). One of: `textItem` (text item changes), `component`
              (library component changes), `variant` (variant changes on text
              items or components), `variable` (variable changes). When combined
              with `projectIds`, `textItemIds`, or `componentIds`, only activity
              that matches both the ID filters and this entity type is returned.
          required: false
          description: >-
            Narrows results to a single entity type (AND logic with the ID
            filters). One of: `textItem` (text item changes), `component`
            (library component changes), `variant` (variant changes on text
            items or components), `variable` (variable changes). When combined
            with `projectIds`, `textItemIds`, or `componentIds`, only activity
            that matches both the ID filters and this entity type is returned.
          name: entityType
          in: query
        - schema:
            type: string
            description: 'Maximum number of activity items to return (default: 50, max: 200)'
          required: false
          description: 'Maximum number of activity items to return (default: 50, max: 200)'
          name: limit
          in: query
        - schema:
            type: string
            description: >-
              The `nextCursor` value from a previous response, used to fetch the
              next page
          required: false
          description: >-
            The `nextCursor` value from a previous response, used to fetch the
            next page
          name: cursor
          in: query
      responses:
        '200':
          description: >-
            Returns a paginated list of activity items matching the requested
            filters
          content:
            application/json:
              schema:
                type: object
                properties:
                  activity:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The type of change that occurred
                        date:
                          type: string
                          description: ISO 8601 timestamp of when the change occurred
                        user:
                          type: object
                          properties:
                            name:
                              type: string
                              description: Display name of the user who made the change
                          required:
                            - name
                        projectId:
                          type: string
                          nullable: true
                          description: >-
                            Developer ID of the project this change belongs to,
                            or null if not project-scoped
                        textItemIds:
                          type: array
                          items:
                            type: string
                          description: Developer IDs of text items affected by this change
                        componentId:
                          type: string
                          nullable: true
                          description: >-
                            Developer ID of the library component affected by
                            this change, or null if not component-scoped
                        data:
                          nullable: true
                          description: Change-type-specific data payload
                      required:
                        - type
                        - date
                        - user
                        - projectId
                        - textItemIds
                        - componentId
                    description: List of activity items matching the requested filters
                  nextCursor:
                    type: string
                    nullable: true
                    description: >-
                      Opaque cursor for fetching the next page of results. Pass
                      as the `cursor` query parameter in the next request. Null
                      if there are no more results.
                required:
                  - activity
                  - nextCursor
                example:
                  activity:
                    - type: edit
                      date: '2024-06-01T12:34:56.000Z'
                      user:
                        name: Alice
                      projectId: my-project
                      textItemIds:
                        - welcome-header
                      componentId: null
                      data: {}
                  nextCursor: NmExODU2MmI3ZDllMDAyNzk5OTk1ZWVi
        '400':
          description: >-
            Returned when a provided developer ID does not match any resource in
            the workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing the validation failure
                required:
                  - message
              example:
                message: 'Project id not found: nonexistent-project'
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````