Microcks metrics API

Operations related to metrics

Operations 7

GET /metrics/invocations/global Get aggregated invocation statistics for a day #
GET /metrics/conformance/aggregate Get aggregation of conformance metrics #
GET /metrics/conformance/service/{serviceId} Get conformance metrics for a Service #
GET /metrics/invocations/top Get top invocation statistics for a day #
GET /metrics/invocations/{serviceName}/{serviceVersion} Get invocation statistics for Service #
GET /metrics/invocations/global/latest Get aggregated invocations statistics for latest days #
GET /metrics/tests/latest Get latest tests results #

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/microcks-metrics-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

microcks-metrics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microcks API v1.14 config Metrics API
  version: 1.14.0
  description: API offered by Microcks, the Kubernetes native tool for API and microservices mocking and testing (microcks.io)
  contact:
    name: Laurent Broudoux
    url: https://github.com/microcks
    email: laurent@microcks.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  x-logo:
    backgroundColor: '#ffffff'
    url: https://microcks.io/images/microcks-logo-blue.png
servers:
- url: http://microcks.example.com/api
  description: ''
security:
- jwt-bearer: []
tags:
- name: metrics
  description: Operations related to metrics
paths:
  /metrics/invocations/global:
    summary: Invocation Statistics across Services and APIs
    get:
      tags:
      - metrics
      parameters:
      - name: day
        description: The day to get statistics for (formatted with yyyyMMdd pattern). Default to today if not provided.
        schema:
          type: string
        in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DailyInvocationStatistic'
          description: Aggregated invocation statistics for specified day
      operationId: GetAggregatedInvocationsStats
      summary: Get aggregated invocation statistics for a day
  /metrics/conformance/aggregate:
    summary: Aggregation of Test conformance metrics
    get:
      tags:
      - metrics
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WeightedMetricValue'
          description: Get aggregated coverage metric value
      operationId: GetConformanceMetricsAggregation
      summary: Get aggregation of conformance metrics
  /metrics/conformance/service/{serviceId}:
    summary: Test Conformance metrics on API and Services
    parameters:
    - name: serviceId
      description: Unique Services identifier this metrics are related to
      schema:
        type: string
      in: path
      required: true
    get:
      tags:
      - metrics
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestConformanceMetric'
          description: Test coverage metric for Service
      operationId: GetServiceTestConformanceMetric
      summary: Get conformance metrics for a Service
  /metrics/invocations/top:
    summary: Top Invocation Statistics across Services and APIs
    get:
      tags:
      - metrics
      parameters:
      - name: day
        description: The day to get statistics for (formatted with yyyyMMdd pattern). Default to today if not provided.
        schema:
          type: string
        in: query
      - name: limit
        description: The number of top invoked mocks to return
        schema:
          type: integer
        in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DailyInvocationStatistic'
          description: Top invocations for a defined day
      operationId: GetTopIvnocationsStatsByDay
      summary: Get top invocation statistics for a day
  /metrics/invocations/{serviceName}/{serviceVersion}:
    summary: Invocation Statistics for API and Services
    parameters:
    - name: serviceName
      description: Name of service to get statistics for
      schema:
        type: string
      in: path
      required: true
    - name: serviceVersion
      description: Version of service to get statistics for
      schema:
        type: string
      in: path
      required: true
    get:
      tags:
      - metrics
      parameters:
      - name: day
        description: The day to get statistics for (formatted with yyyyMMdd pattern). Default to today if not provided.
        schema:
          type: string
        in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DailyInvocationStatistic'
          description: Invocation statistics for service for specified day
      operationId: GetInvocationStatsByService
      summary: Get invocation statistics for Service
  /metrics/invocations/global/latest:
    summary: Latest Invocation Statistics across Services and APIs
    get:
      tags:
      - metrics
      parameters:
      - name: limit
        description: Number of days to get back in time. Default is 20.
        schema:
          type: integer
        in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CounterMap'
          description: A map where keys are day (formatted using yyyyMMdd pattern) and values are counter of invocations on this day
      operationId: GetLatestAggregatedInvocationsStats
      summary: Get aggregated invocations statistics for latest days
  /metrics/tests/latest:
    summary: Lastest Test results across Services and APIs
    get:
      tags:
      - metrics
      parameters:
      - name: limit
        description: Number of days to consider for test results to return. Default is 7 (one week)
        schema:
          type: integer
        in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestResultSummary'
          description: Test results summary for specified <limit> last days.
      operationId: GetLatestTestResults
      summary: Get latest tests results
components:
  schemas:
    TestResultSummary:
      description: 'Represents the summary result of a Service or API test run by Microcks. '
      required:
      - id
      - testDate
      - serviceId
      - success
      properties:
        id:
          description: Unique identifier of TestResult
          type: string
        testDate:
          format: int64
          description: Timestamp of creation date of this service
          type: integer
        serviceId:
          description: Unique identifier of service tested
          type: string
        success:
          description: Flag telling if test is a success
          type: boolean
    WeightedMetricValue:
      description: Value of a metric with an associated weight
      required:
      - name
      - weight
      - value
      type: object
      properties:
        name:
          description: Metric name or serie name
          type: string
        weight:
          description: Weight of this metric value (typically a percentage)
          type: integer
        value:
          description: The value of this metric
          type: integer
    CounterMap:
      description: A generic map of counter
      type: object
      additionalProperties:
        type: number
    DailyInvocationStatistic:
      description: The daily statistic of a service mock invocations
      required:
      - id
      - day
      - serviceName
      - serviceVersion
      - dailyCount
      type: object
      properties:
        id:
          description: Unique identifier of this statistic object
          type: string
        day:
          description: The day (formatted as yyyyMMdd string) represented by this statistic
          type: string
        serviceName:
          description: The name of the service this statistic is related to
          type: string
        serviceVersion:
          description: The version of the service this statistic is related to
          type: string
        dailyCount:
          description: The number of service mock invocations on this day
          type: number
        hourlyCount:
          description: The number of service mock invocations per hour of the day (keys range from 0 to 23)
          type: object
          additionalProperties: true
        minuteCount:
          description: The number of service mock invocations per minute of the day (keys range from 0 to 1439)
          type: object
          additionalProperties: true
    TestConformanceMetric:
      description: Represents the test conformance metrics (current score, history and evolution trend) of a Service
      required:
      - id
      - serviceId
      - currentScore
      - maxPossibleScore
      type: object
      properties:
        id:
          description: Unique identifier of coverage metric
          type: string
        serviceId:
          description: Unique identifier of the Service this metric is related to
          type: string
        aggregationLabelValue:
          description: Value of the label used for metrics aggregation (if any)
          type: string
        maxPossibleScore:
          format: double
          description: Maximum conformance score that can be reached (depends on samples expresiveness)
          type: number
        currentScore:
          format: double
          description: Current test conformance score for the related Service
          type: number
        lastUpdateDay:
          description: The day of latest score update (in yyyyMMdd format)
          type: string
        latestTrend:
          $ref: '#/components/schemas/Trend'
          description: Evolution trend of currentScore
        latestScores:
          description: History of latest scores (key is date with format yyyyMMdd, value is score as double)
          type: object
          additionalProperties:
            type: number
    Trend:
      description: Evolution trend qualifier
      enum:
      - DOWN
      - LOW_DOWN
      - STABLE
      - LOW_UP
      - UP
      type: string
  securitySchemes:
    jwt-bearer:
      flows:
        clientCredentials:
          tokenUrl: https://keycloak.example.com/realms/microcks/protocol/openid-connect/token
          refreshUrl: https://keycloak.example.com/realms/microcks/protocol/openid-connect/token
          scopes:
            user: Simple authenticated user
            manager: Services & APIs content manager
            admin: Administrator of the Microcks instance
      type: oauth2
      description: JWT Bearer acquired using OAuth 2 Authentication flow or Direct Access Grant