PhotoPrism Metrics API

The Metrics API from PhotoPrism — 1 operation(s) for metrics.

Operations 1

GET /api/v1/metrics a prometheus-compatible metrics endpoint for monitoring this instance #

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/photoprism:photoprism-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

photoprism-metrics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact: {}
  description: 'API request bodies and responses are usually JSON-encoded, except for binary data and some of the OAuth2 endpoints. Note that the `Content-Type` header must be set to `application/json` for this, as the request may otherwise fail with error 400.

    When clients have a valid access token, e.g. obtained through the `POST /api/v1/session` or `POST /api/v1/oauth/token` endpoint, they can use a standard Bearer Authorization header to authenticate their requests. Submitting the access token with a custom `X-Auth-Token` header is supported as well.'
  title: PhotoPrism Metrics API
  version: v1
servers:
- url: https://demo.photoprism.app
security:
- BearerAuth: []
tags:
- name: Metrics
paths:
  /api/v1/metrics:
    get:
      operationId: GetMetrics
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                items:
                  $ref: '#/components/schemas/io_prometheus_client.MetricFamily'
                type: array
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/i18n.Response'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/i18n.Response'
      summary: a prometheus-compatible metrics endpoint for monitoring this instance
      tags:
      - Metrics
components:
  schemas:
    timestamppb.Timestamp:
      properties:
        nanos:
          description: 'Non-negative fractions of a second at nanosecond resolution. This field is

            the nanosecond portion of the duration, not an alternative to seconds.

            Negative second values with fractions must still have non-negative nanos

            values that count forward in time. Must be between 0 and 999,999,999

            inclusive.'
          type: integer
        seconds:
          description: 'Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must

            be between -62135596800 and 253402300799 inclusive (which corresponds to

            0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).'
          type: integer
      type: object
    io_prometheus_client.Gauge:
      properties:
        value:
          type: number
      type: object
    io_prometheus_client.Histogram:
      properties:
        bucket:
          description: Buckets for the conventional histogram.
          items:
            $ref: '#/components/schemas/io_prometheus_client.Bucket'
          type: array
        created_timestamp:
          $ref: '#/components/schemas/timestamppb.Timestamp'
        exemplars:
          description: Only used for native histograms. These exemplars MUST have a timestamp.
          items:
            $ref: '#/components/schemas/io_prometheus_client.Exemplar'
          type: array
        negative_count:
          description: Absolute count of each bucket.
          items:
            type: number
          type: array
        negative_delta:
          description: 'Use either "negative_delta" or "negative_count", the former for

            regular histograms with integer counts, the latter for float

            histograms.'
          items:
            type: integer
          type: array
        negative_span:
          description: Negative buckets for the native histogram.
          items:
            $ref: '#/components/schemas/io_prometheus_client.BucketSpan'
          type: array
        positive_count:
          description: Absolute count of each bucket.
          items:
            type: number
          type: array
        positive_delta:
          description: 'Use either "positive_delta" or "positive_count", the former for

            regular histograms with integer counts, the latter for float

            histograms.'
          items:
            type: integer
          type: array
        positive_span:
          description: 'Positive buckets for the native histogram.

            Use a no-op span (offset 0, length 0) for a native histogram without any

            observations yet and with a zero_threshold of 0. Otherwise, it would be

            indistinguishable from a classic histogram.'
          items:
            $ref: '#/components/schemas/io_prometheus_client.BucketSpan'
          type: array
        sample_count:
          type: integer
        sample_count_float:
          description: Overrides sample_count if > 0.
          type: number
        sample_sum:
          type: number
        schema:
          description: 'schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8.

            They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and

            then each power of two is divided into 2^n logarithmic buckets.

            Or in other words, each bucket boundary is the previous boundary times 2^(2^-n).

            In the future, more bucket schemas may be added using numbers < -4 or > 8.'
          type: integer
        zero_count:
          description: Count in zero bucket.
          type: integer
        zero_count_float:
          description: Overrides sb_zero_count if > 0.
          type: number
        zero_threshold:
          description: Breadth of the zero bucket.
          type: number
      type: object
    io_prometheus_client.Summary:
      properties:
        created_timestamp:
          $ref: '#/components/schemas/timestamppb.Timestamp'
        quantile:
          items:
            $ref: '#/components/schemas/io_prometheus_client.Quantile'
          type: array
        sample_count:
          type: integer
        sample_sum:
          type: number
      type: object
    io_prometheus_client.Counter:
      properties:
        created_timestamp:
          $ref: '#/components/schemas/timestamppb.Timestamp'
        exemplar:
          $ref: '#/components/schemas/io_prometheus_client.Exemplar'
        value:
          type: number
      type: object
    io_prometheus_client.Metric:
      properties:
        counter:
          $ref: '#/components/schemas/io_prometheus_client.Counter'
        gauge:
          $ref: '#/components/schemas/io_prometheus_client.Gauge'
        histogram:
          $ref: '#/components/schemas/io_prometheus_client.Histogram'
        label:
          items:
            $ref: '#/components/schemas/io_prometheus_client.LabelPair'
          type: array
        summary:
          $ref: '#/components/schemas/io_prometheus_client.Summary'
        timestamp_ms:
          type: integer
        untyped:
          $ref: '#/components/schemas/io_prometheus_client.Untyped'
      type: object
    i18n.Response:
      properties:
        code:
          type: integer
        details:
          type: string
        error:
          type: string
        message:
          type: string
        messageId:
          type: string
        messageParams:
          items: {}
          type: array
      type: object
    io_prometheus_client.MetricFamily:
      properties:
        help:
          type: string
        metric:
          items:
            $ref: '#/components/schemas/io_prometheus_client.Metric'
          type: array
        name:
          type: string
        type:
          $ref: '#/components/schemas/io_prometheus_client.MetricType'
        unit:
          type: string
      type: object
    io_prometheus_client.Quantile:
      properties:
        quantile:
          type: number
        value:
          type: number
      type: object
    io_prometheus_client.MetricType:
      enum:
      - 0
      - 1
      - 2
      - 3
      - 4
      - 5
      format: int32
      type: integer
      x-enum-varnames:
      - MetricType_COUNTER
      - MetricType_GAUGE
      - MetricType_SUMMARY
      - MetricType_UNTYPED
      - MetricType_HISTOGRAM
      - MetricType_GAUGE_HISTOGRAM
    io_prometheus_client.LabelPair:
      properties:
        name:
          type: string
        value:
          type: string
      type: object
    io_prometheus_client.BucketSpan:
      properties:
        length:
          description: Length of consecutive buckets.
          type: integer
        offset:
          description: Gap to previous span, or starting point for 1st span (which can be negative).
          type: integer
      type: object
    io_prometheus_client.Exemplar:
      properties:
        label:
          items:
            $ref: '#/components/schemas/io_prometheus_client.LabelPair'
          type: array
        timestamp:
          allOf:
          - $ref: '#/components/schemas/timestamppb.Timestamp'
          description: OpenMetrics-style.
        value:
          type: number
      type: object
    io_prometheus_client.Bucket:
      properties:
        cumulative_count:
          description: Cumulative in increasing order.
          type: integer
        cumulative_count_float:
          description: Overrides cumulative_count if > 0.
          type: number
        exemplar:
          $ref: '#/components/schemas/io_prometheus_client.Exemplar'
        upper_bound:
          description: Inclusive.
          type: number
      type: object
    io_prometheus_client.Untyped:
      properties:
        value:
          type: number
      type: object
  securitySchemes:
    BearerAuth:
      in: header
      name: Authorization
      type: apiKey
externalDocs:
  description: Learn more ›
  url: https://docs.photoprism.app/developer-guide/api/