Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/okikio/cloudflare-ddns. DDNS using Cloudflare Workers, built for NAS, homelab, and self-hosted setu
Something went wrong. Try again.
cloudflare-ddns schema.json
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277{ "openapi": "3.1.0", "info": { "title": "Cloudflare DDNS", "version": "1.0.0", "description": "A Cloudflare Worker that acts as a DDNS provider. Synology NAS devices (and other clients) call this service to keep DNS records in sync with a changing public IP address." }, "components": { "schemas": {}, "parameters": {} }, "paths": { "/health": { "get": { "tags": [ "System" ], "summary": "Health check", "operationId": "get_HealthEndpoint", "responses": { "200": { "description": "Service is healthy", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean", "enum": [ true ] } }, "required": [ "ok" ] } } } } } } }, "/nic/update": { "get": { "tags": [ "DDNS" ], "summary": "Synology DynDNS2 update endpoint", "description": "Plain-text DynDNS2-compatible endpoint for Synology DSM and similar clients. Returns text/plain responses such as `good <ip>`, `nochg <ip>`, `badauth`, `nohost`, or `911`.", "operationId": "get_SynologyUpdateEndpoint", "parameters": [ { "schema": { "type": "string", "nullable": true, "description": "Fully-qualified hostname to update, for example nas.example.com." }, "required": false, "description": "Fully-qualified hostname to update, for example nas.example.com.", "name": "hostname", "in": "query" }, { "schema": { "type": "string", "nullable": true, "description": "Client-supplied IPv4 or IPv6 address. Invalid values are ignored in favor of CF-Connecting-IP." }, "required": false, "description": "Client-supplied IPv4 or IPv6 address. Invalid values are ignored in favor of CF-Connecting-IP.", "name": "myip", "in": "query" }, { "schema": { "type": "string", "nullable": true, "description": "Unused by this worker, but included for Synology DynDNS2 compatibility." }, "required": false, "description": "Unused by this worker, but included for Synology DynDNS2 compatibility.", "name": "username", "in": "query" }, { "schema": { "type": "string", "nullable": true, "description": "Shared secret used to authenticate the update request." }, "required": false, "description": "Shared secret used to authenticate the update request.", "name": "password", "in": "query" } ], "responses": { "200": { "description": "DynDNS2 plain-text status response", "content": { "text/plain": { "schema": { "type": "string" } } } }, "500": { "description": "Server-side error returned as DynDNS2 status text", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/update": { "post": { "tags": [ "DDNS" ], "summary": "Update a DNS record with the caller's current IP", "description": "Authenticate with X-DDNS-Secret header. Optionally provide hostname and ip in the JSON body; omitted values are inferred from config and the request's CF-Connecting-IP header.", "operationId": "post_UpdateEndpoint", "parameters": [ { "schema": { "type": "string", "description": "Shared secret for authentication" }, "required": true, "description": "Shared secret for authentication", "name": "X-DDNS-Secret", "in": "header" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "hostname": { "type": "string" }, "ip": { "type": "string" } } } } } }, "responses": { "200": { "description": "DNS record update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" }, "action": { "type": "string" }, "hostname": { "type": "string" }, "record_type": { "type": "string" }, "ip": { "type": "string" }, "record_id": { "type": "string" } }, "required": [ "ok", "action", "hostname", "record_type", "ip" ] } } } }, "400": { "description": "Bad request (missing IP or invalid hostname)", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "number" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } } }, "required": [ "success", "errors" ] } } } }, "401": { "description": "Authentication failed", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "number" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } } }, "required": [ "success", "errors" ] } } } } } } } }, "webhooks": {}}