Skip to content

Custom API widget#2197

Merged
lissy93 merged 4 commits into
masterfrom
feat/customapi-widget
Jun 11, 2026
Merged

Custom API widget#2197
lissy93 merged 4 commits into
masterfrom
feat/customapi-widget

Conversation

@lissy93

@lissy93 lissy93 commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Category

Feature

Overview

This PR creates a new widget, custom-api which can be configured to consume (almost) any JSON input from an upstream API or use specially built API endpoints, so that you can show data from third-parties within your dashboard even when a specific widget doesn't exist yet.

It's heavily inspired by how Homepage does this (https://gethomepage.dev/widgets/services/customapi/), so should make switchin to or from Dashy/Homepage quite easy.

Issue Number

Fixes #2191

Additional Info

Example image
- name: CustomApi · GitHub & Finance
    icon: fas fa-chart-line
    widgets:
      # GitHub repo - number / relativeDate / date / size, additionalField (theme colour)
      - type: customapi
        label: Dashy on GitHub
        options:
          url: https://api.github.com/repos/lissy93/dashy
          refreshInterval: 60000
          mappings:
            - field: full_name
              label: Repo
            - field: stargazers_count
              label: Stars
              format: number
              additionalField:
                field: forks_count
                format: number
                color: theme
            - field: language
              label: Language
            - field: open_issues_count
              label: Open issues
              format: number
            - field: pushed_at
              label: Last push
              format: relativeDate
            - field: created_at
              label: Created
              format: date
              dateStyle: medium
            - field: topics
              label: Topics
              format: size

      - type: custom-api
        label: GitHub Profile
        updateInterval: 120
        options:
          url: https://api.github.com/users/lissy93
          display: list
          mappings:
            - field: login
              label: User
            - field: name
              label: Name
            - field: public_repos
              label: Public repos
              format: number
            - field: followers
              label: Followers
              format: number
              additionalField:
                field: following
                format: number
                color: adaptive
            - field: created_at
              label: Joined
              format: relativeDate

      # Crypto Fear & Greed Index — numeric string + a text classification beside it
      - type: customapi
        label: Crypto Fear & Greed
        options:
          url: https://api.alternative.me/fng/
          refreshInterval: 300000
          mappings:
            - field: data.0.value
              label: Index
              format: number
              additionalField:
                field: data.0.value_classification
                color: theme
            - field: data.0.value_classification
              label: Sentiment

@lissy93 lissy93 linked an issue Jun 11, 2026 that may be closed by this pull request
4 tasks
@lissy93 lissy93 merged commit 381054f into master Jun 11, 2026
12 checks passed
@lissy93 lissy93 deleted the feat/customapi-widget branch June 11, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[QUESTION] Is the API response widget still on the roadmap?

1 participant