Feature request: /api/status endpoint for last entry in updates.json #521

Open
opened 2025-11-20 04:24:42 -05:00 by saavagebueno · 2 comments
Owner

Originally created by @Jandalslap on GitHub (May 3, 2025).

  1. What's the feature?
    I'd like an api endpoint for a widget that can be added to getHomepage as a customapi service please.
    The key values in the updates.json would be enough. Current IP 'ip' and date and time changed 'time'. Perhaps a previous IP's count?

  2. Extra information?
    Include an API Key for this feature that can be added and changed in the config.

Originally created by @Jandalslap on GitHub (May 3, 2025). 1. What's the feature? I'd like an api endpoint for a widget that can be added to getHomepage as a customapi service please. The key values in the updates.json would be enough. Current IP 'ip' and date and time changed 'time'. Perhaps a previous IP's count? 2. Extra information? Include an API Key for this feature that can be added and changed in the config. <!-- YOU CAN CHAT THERE EVENTUALLY: https://github.com/qdm12/ddns-updater/discussions -->
Author
Owner

@adizukerman commented on GitHub (Jun 28, 2025):

Second that!

@adizukerman commented on GitHub (Jun 28, 2025): Second that!
Author
Owner

@Jandalslap commented on GitHub (Jun 28, 2025):

Hey, in the meantime I created a way to utilise my Cloudflare DNS API endpoint instead to provide the same:

- DDNS Updater:
    icon: /icons/ddns-updater.png
    href: "{{HOMEPAGE_VAR_DDNS_UPDATER_HREF}}"
    #target: _self
    ping: http://ddns-updater:8000/ddns-updater
    description: ip updater
    widget: # Custom widget for cloudflare dns - other providers will differ
        type: customapi
        url: https://api.cloudflare.com/client/v4/zones/{{HOMEPAGE_VAR_DDNS_UPDATER_CLOUDFLARE_ZONE_ID}}/dns_records?type=A # DNS Zone ID
        refreshInterval: 10000
        method: GET
        headers:
            Authorization: Bearer {{HOMEPAGE_VAR_DDNS_UPDATER_CLOUDFLARE_API}} # Create a new read only Zone DNS API key for this widget
            Content-Type: application/json
        mappings:
            - field: 'result[0].name'
              label: Domain Name
              format: text
            - field: 'result[0].content'
              label: DNS IP
              format: text
            - field: 'result[0].modified_on'
              label: Updated
              format: date
              dateStyle: medium       
              timeStyle: short       
              locale: en-{{HOMEPAGE_VAR_DDNS_UPDATER_WIDGET_LOCAL}} # two letter country code eg 'en-US' 

Image

And then for my router widget next to it I just queried a public site for my current IP and keep an eye out to make sure they both match. Best I've come up with so far :-)

- Router:
    icon: /icons/tp-link.png
    href: "{{HOMEPAGE_VAR_ROUTER_HREF}}"
    #target: _self
    ping: "{{HOMEPAGE_VAR_ROUTER_URL}}"
    description: gateway router
    widget:
        type: customapi
        url: https://api.ipify.org?format=json # public site
        refreshInterval: 10000 # optional - in milliseconds, defaults to 10s
        method: GET
        mappings:
            - field: 'ip'
              label: Current IP
              format: text

Image

@Jandalslap commented on GitHub (Jun 28, 2025): Hey, in the meantime I created a way to utilise my Cloudflare DNS API endpoint instead to provide the same: - DDNS Updater: icon: /icons/ddns-updater.png href: "{{HOMEPAGE_VAR_DDNS_UPDATER_HREF}}" #target: _self ping: http://ddns-updater:8000/ddns-updater description: ip updater widget: # Custom widget for cloudflare dns - other providers will differ type: customapi url: https://api.cloudflare.com/client/v4/zones/{{HOMEPAGE_VAR_DDNS_UPDATER_CLOUDFLARE_ZONE_ID}}/dns_records?type=A # DNS Zone ID refreshInterval: 10000 method: GET headers: Authorization: Bearer {{HOMEPAGE_VAR_DDNS_UPDATER_CLOUDFLARE_API}} # Create a new read only Zone DNS API key for this widget Content-Type: application/json mappings: - field: 'result[0].name' label: Domain Name format: text - field: 'result[0].content' label: DNS IP format: text - field: 'result[0].modified_on' label: Updated format: date dateStyle: medium timeStyle: short locale: en-{{HOMEPAGE_VAR_DDNS_UPDATER_WIDGET_LOCAL}} # two letter country code eg 'en-US' ![Image](https://github.com/user-attachments/assets/a72324b1-a1d1-4d39-aca0-7f5d46e198fa) And then for my router widget next to it I just queried a public site for my current IP and keep an eye out to make sure they both match. Best I've come up with so far :-) - Router: icon: /icons/tp-link.png href: "{{HOMEPAGE_VAR_ROUTER_HREF}}" #target: _self ping: "{{HOMEPAGE_VAR_ROUTER_URL}}" description: gateway router widget: type: customapi url: https://api.ipify.org?format=json # public site refreshInterval: 10000 # optional - in milliseconds, defaults to 10s method: GET mappings: - field: 'ip' label: Current IP format: text ![Image](https://github.com/user-attachments/assets/f404c3d8-29d2-439d-a95d-10ef40b9a36a)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#521