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

# Count Play runs and delivered Monitor findings by day

> Returns bounded, tenant-scoped daily counts from durable Play runs and delivered Monitor receipts. Each bucket reports source coverage; incomplete history is never a zero claim.

Authentication: workspace API key in `Authorization: Bearer <key>`.

## Errors

| Status | Meaning |
| - | - |
| 400 | The request conflicts with current state or a retained request identity. |
| 401 | The request conflicts with current state or a retained request identity. |
| 500 | The request conflicts with current state or a retained request identity. |


## OpenAPI

````yaml openapi.json POST /api/v2/plays/activity
openapi: 3.1.1
info:
  title: Deepline API
  version: v2
  description: >-
    Discover typed GTM tools and callable Plays, then execute a tool or start
    and inspect a durable Deepline Play run. Use the MCP endpoint when your
    client supports Model Context Protocol.
  contact:
    name: Deepline support
    email: team@deepline.com
    url: https://deepline.com/contact
servers:
  - url: https://code.deepline.com
    description: Deepline production runtime API
security: []
tags:
  - name: Health
    description: Availability checks.
  - name: Billing
    description: Safe recovery of existing purchase intent.
  - name: Tools
    description: Discover and execute typed provider tools.
  - name: Plays
    description: Discover, start, and inspect durable Play runs.
externalDocs:
  description: API reference
  url: https://deepline.com/docs/api-reference
paths:
  /api/v2/plays/activity:
    post:
      tags:
        - Plays
      summary: Count Play runs and delivered Monitor findings by day
      description: >-
        Returns bounded, tenant-scoped daily counts from durable Play runs and
        delivered Monitor receipts. Each bucket reports source coverage;
        incomplete history is never a zero claim.
      operationId: getPlaysActivity
      requestBody:
        required: true
        description: Calendar window and grouping.
        content:
          application/json:
            schema:
              type: object
              properties:
                timeZone:
                  type: string
                  default: UTC
                days:
                  type: integer
                  minimum: 1
                  maximum: 45
                  default: 30
                endDate:
                  type: string
                  format: date
                groupBy:
                  type: string
                  enum:
                    - kind
                    - trigger_source
      responses:
        '200':
          description: A successful Runtime API response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  timeZone:
                    type: string
                  groupBy:
                    enum:
                      - kind
                      - trigger_source
                  endDate:
                    type: string
                  asOfAt:
                    type: number
                  buckets:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        label:
                          type: string
                        startAt:
                          type: number
                        endAt:
                          type: number
                        groups:
                          type: array
                          items:
                            type: object
                            properties:
                              group:
                                type: string
                              count:
                                type: number
                            required:
                              - group
                              - count
                        failedPlayRuns:
                          type: number
                        complete:
                          type: object
                          properties:
                            playRuns:
                              type: boolean
                            monitorDeliveries:
                              type: boolean
                          required:
                            - playRuns
                            - monitorDeliveries
                      required:
                        - key
                        - label
                        - startAt
                        - endAt
                        - groups
                        - failedPlayRuns
                        - complete
                  coverage:
                    type: object
                    properties:
                      playRunsEarliestCompleteAt:
                        type:
                          - number
                          - 'null'
                      monitorDeliveriesEarliestCompleteAt:
                        type:
                          - number
                          - 'null'
                      monitorDeliveriesCompleteThroughAt:
                        type:
                          - number
                          - 'null'
                      projectionPending:
                        type: boolean
                      earliestPendingAt:
                        type:
                          - number
                          - 'null'
                    required:
                      - playRunsEarliestCompleteAt
                      - monitorDeliveriesEarliestCompleteAt
                      - monitorDeliveriesCompleteThroughAt
                      - projectionPending
                      - earliestPendingAt
                required:
                  - timeZone
                  - groupBy
                  - endDate
                  - buckets
                  - coverage
        '400':
          description: >-
            The request conflicts with current state or a retained request
            identity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Unauthorized
        '401':
          description: >-
            The request conflicts with current state or a retained request
            identity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Unauthorized
        '500':
          description: >-
            The request conflicts with current state or a retained request
            identity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Unauthorized
      security:
        - bearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          oneOf:
            - type: string
              description: Route-specific error message.
            - type: object
              properties:
                code:
                  type: string
                message:
                  type: string
                resolution:
                  type: string
              additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Deepline workspace API key
      description: >-
        Create a workspace API key in the Deepline dashboard before calling
        authenticated endpoints.

````

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