Grepr Agent Session Analytics API

The Agent Session Analytics API from Grepr — 3 operation(s) for agent session analytics.

Operations 5

GET /v1/agent-session-analytics/jobs List #
POST /v1/agent-session-analytics/jobs Create #
DELETE /v1/agent-session-analytics/jobs/{jobId} Delete #
GET /v1/agent-session-analytics/jobs/{jobId} Get #
GET /v1/agent-session-analytics/jobs/{jobId}/download Download #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/grepr:grepr-agent-session-analytics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

grepr-agent-session-analytics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Grepr Agent Session Analytics API
  version: 1.0.0
  description: 'Operations tagged Agent Session Analytics across 2 of this provider''s published API definitions: grepr-openapi.json, grepr.json. Each path carries the servers of the definition it was published in.'
tags:
- name: Agent Session Analytics
paths:
  /v1/agent-session-analytics/jobs:
    get:
      operationId: list
      parameters:
      - in: query
        name: datasetId
        schema:
          type: string
      - in: query
        name: offset
        schema:
          default: 0
          format: int32
          type: integer
      - in: query
        name: limit
        schema:
          default: 50
          format: int32
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSessionAnalyticsPage'
          description: Analytics runs retrieved
      security:
      - grepr-api-key: []
      - grepr-oidc: []
      tags:
      - Agent Session Analytics
      summary: List
      x-summary-source: derived
    post:
      operationId: create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgentSessionAnalyticsJob'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSessionAnalyticsJob'
          description: Analytics run created
      security:
      - grepr-api-key: []
      - grepr-oidc: []
      tags:
      - Agent Session Analytics
      summary: Create
      x-summary-source: derived
  /v1/agent-session-analytics/jobs/{jobId}:
    delete:
      operationId: delete
      parameters:
      - in: path
        name: jobId
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Analytics run cancelled
      security:
      - grepr-api-key: []
      - grepr-oidc: []
      tags:
      - Agent Session Analytics
      summary: Delete
      x-summary-source: derived
    get:
      operationId: get
      parameters:
      - in: path
        name: jobId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSessionAnalyticsJob'
          description: Analytics run retrieved
      security:
      - grepr-api-key: []
      - grepr-oidc: []
      tags:
      - Agent Session Analytics
      summary: Get
      x-summary-source: derived
  /v1/agent-session-analytics/jobs/{jobId}/download:
    get:
      operationId: download
      parameters:
      - in: path
        name: jobId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSessionAnalyticsDownload'
          description: Analytics CSV download retrieved
      security:
      - grepr-api-key: []
      - grepr-oidc: []
      tags:
      - Agent Session Analytics
      summary: Download
      x-summary-source: derived
components:
  schemas:
    DatadogQueryPredicate:
      properties:
        query:
          default: ''
          description: The datadog query used by the predicate. See https://docs.datadoghq.com/tracing/trace_explorer/query_syntax
          example: service:grepr-service-1
          type: string
        type:
          description: A predicate that checks if an event matches a datadog query.
          enum:
          - datadog-query
          type: string
      required:
      - query
      - type
      type: object
    AgentSessionAnalyticsDownload:
      properties:
        expiresAt:
          format: date-time
          type: string
        filename:
          type: string
        url:
          type: string
      type: object
    NewRelicQueryPredicate:
      properties:
        query:
          default: ''
          description: 'The New Relic query used by the predicate. See https://docs.newrelic.com/docs/logs/ui-data/query-syntax-logs/ '
          example: service:grepr-service-1
          type: string
        type:
          description: A predicate that checks if an event matches a New Relic query.
          enum:
          - newrelic-query
          type: string
      required:
      - query
      - type
      type: object
    Totals:
      properties:
        analyzedSessions:
          format: int64
          type: integer
        cacheReadTokens:
          format: int64
          type: integer
        cacheWriteTokens:
          format: int64
          type: integer
        costReportingComplete:
          type: boolean
        exportedSessions:
          format: int64
          type: integer
        inputTokens:
          format: int64
          type: integer
        matchingSessions:
          format: int64
          type: integer
        miscellaneousSessions:
          format: int64
          type: integer
        modelCalls:
          format: int64
          type: integer
        namedGroupSessions:
          format: int64
          type: integer
        outputTokens:
          format: int64
          type: integer
        reasoningTokens:
          format: int64
          type: integer
        reportedCostUsd:
          format: double
          type: number
        sessionDurationMs:
          format: int64
          type: integer
        toolCalls:
          format: int64
          type: integer
        toolDurationMs:
          format: int64
          type: integer
        toolErrors:
          format: int64
          type: integer
        toolResultBytes:
          format: int64
          type: integer
      type: object
    EventPredicate:
      description: Predicate applied to rows before analytical aggregation.
      discriminator:
        mapping:
          and-predicate: '#/components/schemas/AndEventPredicate'
          datadog-query: '#/components/schemas/DatadogQueryPredicate'
          metric-predicate: '#/components/schemas/MetricEventPredicate'
          newrelic-query: '#/components/schemas/NewRelicQueryPredicate'
          nrql-query: '#/components/schemas/NrqlQueryPredicate'
        propertyName: type
      oneOf:
      - $ref: '#/components/schemas/AndEventPredicate'
      - $ref: '#/components/schemas/DatadogQueryPredicate'
      - $ref: '#/components/schemas/MetricEventPredicate'
      - $ref: '#/components/schemas/NewRelicQueryPredicate'
      - $ref: '#/components/schemas/NrqlQueryPredicate'
      properties:
        query:
          type: string
        type:
          type: string
      required:
      - type
      type: object
    Breakdown:
      properties:
        cacheReadTokens:
          format: int64
          type: integer
        cacheWriteTokens:
          format: int64
          type: integer
        calls:
          format: int64
          type: integer
        callsWithUsage:
          format: int64
          type: integer
        costReportingComplete:
          type: boolean
        inputTokens:
          format: int64
          type: integer
        name:
          type: string
        outputTokens:
          format: int64
          type: integer
        reasoningTokens:
          format: int64
          type: integer
        reportedCostUsd:
          format: double
          type: number
        sessions:
          format: int64
          type: integer
      type: object
    AgentSessionAnalyticsPage:
      properties:
        items:
          items:
            $ref: '#/components/schemas/AgentSessionAnalyticsJob'
          type: array
        limit:
          format: int32
          type: integer
        offset:
          format: int32
          type: integer
        total:
          format: int64
          type: integer
      type: object
    AndEventPredicate:
      properties:
        queries:
          default: []
          description: List of predicates that must all match for this predicate to match.
          items:
            $ref: '#/components/schemas/EventPredicate'
          maxItems: 2147483647
          minItems: 1
          title: Child predicates
          type: array
        type:
          description: A predicate that matches when every child predicate matches.
          enum:
          - and-predicate
          type: string
      required:
      - queries
      - type
      type: object
    MetricEventPredicate:
      properties:
        filterTags:
          additionalProperties:
            default: {}
            description: The set of tags to query for. If unspecified, all tags are queried.
            example:
              env:
              - prod
              service:
              - my-app
            items:
              default: '{}'
              description: The set of tags to query for. If unspecified, all tags are queried.
              example: '{"service":["my-app"],"env":["prod"]}'
              type: string
            type: array
            uniqueItems: true
          default: {}
          description: The set of tags to query for. If unspecified, all tags are queried.
          example:
            env:
            - prod
            service:
            - my-app
          type: object
        metricNames:
          default: []
          description: The names of the metrics to query. Must not be empty.
          example:
          - cpu.load
          - cpu.utilization
          items:
            description: The names of the metrics to query. Must not be empty.
            example: '["cpu.load","cpu.utilization"]'
            type: string
          maxItems: 2147483647
          minItems: 1
          type: array
        query:
          type: string
        type:
          description: A predicate that checks if an event matches a metrics query.
          enum:
          - metric-predicate
          type: string
      required:
      - metricNames
      - query
      - type
      type: object
    Intent:
      properties:
        description:
          type: string
        label:
          type: string
        miscellaneous:
          type: boolean
        percentage:
          format: double
          type: number
        sessions:
          format: int64
          type: integer
      type: object
    AgentAnalyticsDashboardSummary:
      properties:
        dataQuality:
          $ref: '#/components/schemas/DataQuality'
        emitters:
          items:
            $ref: '#/components/schemas/Breakdown'
          type: array
        intentToolMatrix:
          items:
            $ref: '#/components/schemas/MatrixCell'
          type: array
        intentUsage:
          items:
            $ref: '#/components/schemas/Breakdown'
          type: array
        models:
          items:
            $ref: '#/components/schemas/Breakdown'
          type: array
        topIntents:
          items:
            $ref: '#/components/schemas/Intent'
          type: array
        topTools:
          items:
            $ref: '#/components/schemas/Tool'
          type: array
        totals:
          $ref: '#/components/schemas/Totals'
      type: object
    DataQuality:
      properties:
        embeddingFailures:
          format: int64
          type: integer
        incompleteContentSessions:
          format: int64
          type: integer
        labelFailures:
          format: int64
          type: integer
        metadataOnlyEvents:
          format: int64
          type: integer
        missingUsageSessions:
          format: int64
          type: integer
        truncatedEvents:
          format: int64
          type: integer
        warnings:
          format: int64
          type: integer
      type: object
    Tool:
      properties:
        calls:
          format: int64
          type: integer
        costReportingComplete:
          type: boolean
        durationMs:
          format: int64
          type: integer
        errors:
          format: int64
          type: integer
        operation:
          type: string
        reportedCostUsd:
          format: double
          type: number
        resultBytes:
          format: int64
          type: integer
        sessionsUsing:
          format: int64
          type: integer
      type: object
    MatrixCell:
      properties:
        intent:
          type: string
        operation:
          type: string
        sessionsUsing:
          format: int64
          type: integer
      type: object
    CreateAgentSessionAnalyticsJob:
      properties:
        datasetId:
          type: string
        end:
          format: date-time
          type: string
        maximumNamedGroups:
          default: 20
          format: int32
          maximum: 100
          minimum: 1
          type: integer
        modelIntegrationId:
          type: string
        query:
          $ref: '#/components/schemas/EventPredicate'
        sessionCap:
          default: 10000
          format: int32
          maximum: 100000
          minimum: 1
          type: integer
        start:
          format: date-time
          type: string
      required:
      - datasetId
      - end
      - modelIntegrationId
      - query
      - start
      type: object
    AgentSessionAnalyticsJob:
      properties:
        analysisVersion:
          type: string
        analyzedSessionCount:
          format: int64
          type: integer
        artifactByteSize:
          format: int64
          type: integer
        clusteringAlgorithmVersion:
          type: string
        completedAt:
          format: date-time
          type: string
        createdAt:
          format: date-time
          type: string
        dashboardSummary:
          $ref: '#/components/schemas/AgentAnalyticsDashboardSummary'
        datasetId:
          type: string
        downloadAvailable:
          type: boolean
        embeddingDimensions:
          format: int32
          type: integer
        embeddingModel:
          type: string
        exportedSessionCount:
          format: int64
          type: integer
        failureReason:
          type: string
        jobId:
          type: string
        jobState:
          enum:
          - CREATED
          - PENDING
          - INFRA_UPDATE
          - INFRA_UPDATE_WAIT
          - VERIFYING
          - WAITING
          - RUNNING
          - STOPPED
          - FINISHED
          - FAILED
          - CANCELLED
          - DELETED
          - UPDATING
          - STARTING
          - RESTARTING
          - STOPPING
          - ROLLING_BACK
          - DELETING
          type: string
        labelModel:
          type: string
        matchingSessionCount:
          format: int64
          type: integer
        miscellaneousSessionCount:
          format: int32
          type: integer
        namedGroupCount:
          format: int32
          type: integer
        request:
          $ref: '#/components/schemas/CreateAgentSessionAnalyticsJob'
        resultWasCapped:
          type: boolean
        state:
          enum:
          - RUNNING
          - COMPLETED
          - FAILED
          - CANCELLED
          type: string
        warningCount:
          format: int32
          type: integer
      type: object
    NrqlQueryPredicate:
      properties:
        query:
          default: ''
          description: The Nrql query used by the predicate. See https://docs.newrelic.com/docs/nrql
          example: SELECT * FROM Log WHERE service = 'grepr-service-1'
          type: string
        strict:
          default: true
          description: Whether the query should be parsed in strict mode.
          type: boolean
        type:
          description: A predicate that checks if an event matches an NRQL query.
          enum:
          - nrql-query
          type: string
      required:
      - query
      - type
      type: object
  securitySchemes:
    grepr-api-key:
      in: header
      name: GREPR-API-KEY
      type: apiKey
    grepr-oidc:
      bearerFormat: JWT
      openIdConnectUrl: https://grepr-prod.us.auth0.com/.well-known/openid-configuration
      type: openIdConnect
x-refined-from:
- grepr-openapi.json
- grepr.json
x-tagGroups:
- name: Integrations
  tags:
  - Grepr-hosted Data Warehouse Integration
  - External S3 Data Warehouse Integration
  - Datadog Integration
  - New Relic Integration
  - Splunk Integration
  - Sumo Logic Integration
  - OpenTelemetry Integration
- name: Pipelines
  tags:
  - Jobs
  - Templates
  - Datasets
  - Status Metrics
  - External Triggers
  - Job Actions
  - Triggers
- name: Pipeline Components
  tags:
  - Operations
  - Transforms
  - Sources
  - Sinks
- name: Administration
  tags:
  - Users
  - Teams
  - Roles
  - Permission
  - Invitations
  - Activity Logs
- name: Organization
  tags:
  - Organizations
  - Access Configuration
  - Grepr API Key
  - Service Accounts
  - Signup
- name: Query & Analysis
  tags:
  - Job Anomalies
  - Grok Parsing
  - Query Parsing
  - Validation
- name: System
  tags:
  - Manifest