Cachet Metrics API

The Metrics API from Cachet — 2 operation(s) for metrics.

GitHub OpenAPI

Operations 6

GET /metrics List Metrics #
DELETE /metrics Delete Metrics #
POST /metrics Create Metric #
GET /metrics/{metric} Get Metric #
PUT /metrics/{metric} Update Metric #
DELETE /metrics/{metric} Delete Metric #

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/cachethq:cachethq-metrics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

cachethq-metrics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cachethq Metrics API
  version: 0.0.1
  description: 'Operations tagged Metrics across 2 of this provider''s published API definitions: cachethq-openapi.json, openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: http://localhost:8001/api
- url: https://v3.cachethq.io/api
  description: The Cachet v3 demo server.
security:
- http: []
tags:
- name: Metrics
paths:
  /metrics:
    get:
      operationId: cachet.api.metrics.index
      summary: List Metrics
      tags:
      - Metrics
      parameters:
      - name: per_page
        in: query
        description: How many items to show per page.
        schema:
          type: integer
          default: 15
        example: 20
      - name: page
        in: query
        description: Which page to show.
        schema:
          type: integer
        example: 2
      - name: sort
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - name
            - -name
            - order
            - -order
            - id
            - -id
        explode: false
      - name: include
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - points
            - pointsCount
            - pointsExists
            - tags
            - tagsCount
            - tagsExists
        explode: false
      - name: filter[name]
        in: query
        description: Filter by name.
        schema:
          type: string
        example: metric name
      - name: filter[calc_type]
        in: query
        description: Filter by calculation type.
        schema:
          $ref: '#/components/schemas/MetricTypeEnum'
      - name: filter[tags]
        in: query
        description: Filter by one or more comma-separated tags.
        schema:
          type: string
        example: api,database
      responses:
        '200':
          description: Paginated set of `Metric`
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Metric'
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                      last:
                        type: string
                      prev:
                        type: string
                      next:
                        type: string
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        minimum: 1
                      from:
                        type:
                        - integer
                        - 'null'
                        minimum: 1
                      path:
                        type:
                        - string
                        - 'null'
                        description: Base path for paginator generated URLs.
                      per_page:
                        type: integer
                        description: Number of items shown per page.
                        minimum: 0
                      to:
                        type:
                        - integer
                        - 'null'
                        description: Number of the last item in the slice.
                        minimum: 1
                    required:
                    - current_page
                    - from
                    - path
                    - per_page
                    - to
                  included:
                    type: array
                    items:
                      anyOf:
                      - $ref: '#/components/schemas/MetricPoint'
                      - $ref: '#/components/schemas/Tag'
                required:
                - data
                - links
                - meta
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                required:
                - message
      security: []
    delete:
      operationId: metric.destroyMany
      summary: Delete Metrics
      tags:
      - Metrics
      parameters:
      - name: ids
        in: query
        required: true
        description: Comma-separated metric IDs to delete.
        schema:
          type: string
        example: 1,2,3
      responses:
        '204':
          description: No content
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                required:
                - message
        '403':
          $ref: '#/components/responses/MissingAbilityException'
        '401':
          $ref: '#/components/responses/AuthenticationException'
    post:
      operationId: cachet.api.metrics.store
      summary: Create Metric
      tags:
      - Metrics
      requestBody:
        description: '`CreateMetricRequestData`'
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMetricRequestData'
      responses:
        '200':
          description: '`Metric`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Metric'
                  included:
                    type: array
                    items:
                      anyOf:
                      - $ref: '#/components/schemas/MetricPoint'
                      - $ref: '#/components/schemas/Tag'
                required:
                - data
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                required:
                - message
        '403':
          $ref: '#/components/responses/MissingAbilityException'
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
    servers:
    - url: http://localhost:8001/api
    - url: https://v3.cachethq.io/api
      description: The Cachet v3 demo server.
  /metrics/{metric}:
    get:
      operationId: cachet.api.metrics.show
      summary: Get Metric
      tags:
      - Metrics
      parameters:
      - name: metric
        in: path
        required: true
        description: The metric ID
        schema:
          type: integer
      - name: include
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - points
            - pointsCount
            - pointsExists
            - tags
            - tagsCount
            - tagsExists
        explode: false
      responses:
        '200':
          description: '`Metric`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Metric'
                  included:
                    type: array
                    items:
                      anyOf:
                      - $ref: '#/components/schemas/MetricPoint'
                      - $ref: '#/components/schemas/Tag'
                required:
                - data
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                required:
                - message
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
      security: []
    put:
      operationId: cachet.api.metrics.update
      summary: Update Metric
      tags:
      - Metrics
      parameters:
      - name: metric
        in: path
        required: true
        description: The metric ID
        schema:
          type: integer
      requestBody:
        description: '`UpdateMetricRequestData`'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMetricRequestData'
      responses:
        '200':
          description: '`Metric`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Metric'
                  included:
                    type: array
                    items:
                      anyOf:
                      - $ref: '#/components/schemas/MetricPoint'
                      - $ref: '#/components/schemas/Tag'
                required:
                - data
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                required:
                - message
        '403':
          $ref: '#/components/responses/MissingAbilityException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
    delete:
      operationId: cachet.api.metrics.destroy
      summary: Delete Metric
      tags:
      - Metrics
      parameters:
      - name: metric
        in: path
        required: true
        description: The metric ID
        schema:
          type: integer
      responses:
        '204':
          description: No content
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                required:
                - message
        '403':
          $ref: '#/components/responses/MissingAbilityException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '401':
          $ref: '#/components/responses/AuthenticationException'
    servers:
    - url: http://localhost:8001/api
    - url: https://v3.cachethq.io/api
      description: The Cachet v3 demo server.
components:
  schemas:
    CreateMetricRequestData:
      type: object
      properties:
        name:
          type: string
          maxLength: 255
        suffix:
          type: string
          maxLength: 255
        calc_type:
          anyOf:
          - $ref: '#/components/schemas/MetricTypeEnum'
          - type: 'null'
        description:
          type:
          - string
          - 'null'
        default_value:
          type:
          - number
          - 'null'
        display_chart:
          type:
          - boolean
          - 'null'
        threshold:
          type:
          - integer
          - 'null'
          minimum: 0
          maximum: 60
        places:
          type:
          - integer
          - 'null'
          minimum: 0
          maximum: 4
        tags:
          type: array
          default: []
          items:
            type: string
      required:
      - name
      - suffix
      title: CreateMetricRequestData
    MetricPoint:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
          - metricPoints
        attributes:
          type: object
          properties:
            id:
              type: integer
            metric_id:
              type: integer
            calculated_value:
              type: number
            value:
              type: number
            counter:
              type: integer
            created:
              type: object
              properties:
                human:
                  type:
                  - string
                  - 'null'
                string:
                  type:
                  - string
                  - 'null'
              required:
              - human
              - string
            updated:
              type: object
              properties:
                human:
                  type:
                  - string
                  - 'null'
                string:
                  type:
                  - string
                  - 'null'
              required:
              - human
              - string
          required:
          - id
          - metric_id
          - calculated_value
          - value
          - counter
          - created
          - updated
        relationships:
          type: object
          properties:
            metric:
              type: object
              properties:
                data:
                  anyOf:
                  - $ref: '#/components/schemas/MetricIdentifier'
                  - type: 'null'
              required:
              - data
      required:
      - id
      - type
      title: MetricPoint
    MetricViewEnum:
      type: integer
      enum:
      - 0
      - 1
      - 2
      - 3
      title: MetricViewEnum
    Metric:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
          - metrics
        attributes:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
            suffix:
              type: string
            description:
              type:
              - string
              - 'null'
            default_value:
              type:
              - object
              - 'null'
            calc_type:
              $ref: '#/components/schemas/MetricTypeEnum'
            display_chart:
              type: integer
            places:
              type: integer
            default_view:
              $ref: '#/components/schemas/MetricViewEnum'
            threshold:
              type: integer
            order:
              type: integer
            visible:
              $ref: '#/components/schemas/ResourceVisibilityEnum'
            created:
              type: object
              properties:
                human:
                  type:
                  - string
                  - 'null'
                string:
                  type:
                  - string
                  - 'null'
              required:
              - human
              - string
            updated:
              type: object
              properties:
                human:
                  type:
                  - string
                  - 'null'
                string:
                  type:
                  - string
                  - 'null'
              required:
              - human
              - string
          required:
          - id
          - name
          - suffix
          - description
          - default_value
          - calc_type
          - display_chart
          - places
          - default_view
          - threshold
          - order
          - visible
          - created
          - updated
        relationships:
          type: object
          properties:
            points:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/MetricPointIdentifier'
              required:
              - data
            tags:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/TagIdentifier'
              required:
              - data
      required:
      - id
      - type
      title: Metric
    ResourceVisibilityEnum:
      type: integer
      enum:
      - 0
      - 1
      - 2
      title: ResourceVisibilityEnum
    MetricPointIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
          - metricPoints
        id:
          type: string
      required:
      - type
      - id
      title: MetricPointIdentifier
    MetricIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
          - metrics
        id:
          type: string
      required:
      - type
      - id
      title: MetricIdentifier
    TagIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
          - tags
        id:
          type: string
      required:
      - type
      - id
      title: TagIdentifier
    MetricTypeEnum:
      type: integer
      enum:
      - 0
      - 1
      title: MetricTypeEnum
    Tag:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
          - tags
        attributes:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
            slug:
              type: string
          required:
          - id
          - name
          - slug
      required:
      - id
      - type
      title: Tag
    UpdateMetricRequestData:
      type: object
      properties:
        name:
          type:
          - string
          - 'null'
          maxLength: 255
        suffix:
          type:
          - string
          - 'null'
          maxLength: 255
        description:
          type:
          - string
          - 'null'
        default_value:
          type:
          - number
          - 'null'
        threshold:
          type:
          - integer
          - 'null'
          minimum: 0
          maximum: 60
        tags:
          type:
          - array
          - 'null'
          items:
            type: string
      title: UpdateMetricRequestData
  responses:
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
            - message
            - errors
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
            - message
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
            - message
    MissingAbilityException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
            - message
  securitySchemes:
    http:
      type: http
      scheme: bearer
x-refined-from:
- cachethq-openapi.json
- openapi.json