{"id":47928167,"url":"https://github.com/vinted/rest-dhcpd","last_synced_at":"2026-04-04T07:01:02.310Z","repository":{"id":77989054,"uuid":"602063743","full_name":"vinted/rest-dhcpd","owner":"vinted","description":"REST driven DHCP server","archived":false,"fork":false,"pushed_at":"2023-03-10T13:33:49.000Z","size":38,"stargazers_count":25,"open_issues_count":0,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-04-04T07:00:01.260Z","etag":null,"topics":["dhcp","dhcp-server","dhcpd","rest","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vinted.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-15T12:25:38.000Z","updated_at":"2025-07-04T02:55:28.000Z","dependencies_parsed_at":"2024-06-21T17:00:38.967Z","dependency_job_id":"e7e06257-1c86-4304-89de-05c5b75b2e3a","html_url":"https://github.com/vinted/rest-dhcpd","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/vinted/rest-dhcpd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinted%2Frest-dhcpd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinted%2Frest-dhcpd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinted%2Frest-dhcpd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinted%2Frest-dhcpd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinted","download_url":"https://codeload.github.com/vinted/rest-dhcpd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinted%2Frest-dhcpd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31390695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dhcp","dhcp-server","dhcpd","rest","rest-api"],"created_at":"2026-04-04T07:00:43.428Z","updated_at":"2026-04-04T07:01:02.245Z","avatar_url":"https://github.com/vinted.png","language":"Go","readme":"# REST DHCPD\nDHCP server controlled via REST endpoints.\n\n## Configuration\n\nBy default configuration files are located in `/etc/rest-dchp` directory.\nThis can be overridden with `-configPath` command-line argument.\nGlobal server configuration is stored in `rest-dhcpd-config.json` file:\n\n```\n{\n    \"IP\": \"192.168.100.1\",\n    \"LeaseDuration\": 30,\n    \"AuthToken\": \"secretToken\",\n    \"ListenInterface\": \"virbr1\",\n    \"HTTPListenAddress\": \"127.0.0.1:6767\",\n    \"TLSEnabled\": true,\n    \"TLSPrivateKeyFile\": \"example.key\",\n    \"TLSCertificateFile\": \"example.crt\",\n    \"Options\": {\n      \"1\": \"255.255.255.0\",\n      \"3\": \"192.168.100.1\",\n      \"6\": \"10.32.0.3\"\n    }\n}\n```\n`IP` - IP address of DHCP server.  \n`LeaseDuration` - DHCP lease duration in seconds.  \n`AuthToken` - authentication token for REST interface.  \n`ListenInterface` - network interface to listen fro DHCP requests.  \n`HTTPListenAddress` - address to listen fro HTTP requests. To listen on all network addresses use port without any IP address `:6767`.  \n`TLSEnabled` - start REST interface with HTTPS support.  \n`TLSPrivateKeyFile` - private key file for HTTPS support.  \n`TLSCertificateFile` - certificate file for HTTPS support.  \n`Options` - list of global DHCP options. Can be overridden by client config.  \n\n### Basics\nREST DHCP server does not provide dynamic DHCP leases. It only provides leases to configured clients.\nClients are added, deleted and modified via REST interface. Client configuration is stored in `-configPath` folder, `rest-dhcpd-clients.json` file.\n\n## API\n\nREST API supports following methods:\n`GET, PUT, DELETE`\n\n### API endpoints\n\n`/` - supports `GET` method. Displays index page.  \n`/metrics` - supports `GET` method. Displays prometheus metrics.  \n`/clients` - supports `GET` method. Lists all configured clients.  \n`/client/AA:BB:CC:DD:EE:FF` - supports:  \n\t\t- `GET` - displays configuration of a client defined by `AA:BB:CC:DD:EE:FF` `MAC` address.  \n\t\t- `DELETE` - deletes configuration of a client defined by `AA:BB:CC:DD:EE:FF` `MAC` address.  \n\t\t- `PUT` -  creates new or update existing configuration of a client defined by `AA:BB:CC:DD:EE:FF` `MAC` address.  \n\n### Examples\n\n#### List all available clients\n```\ncurl http://127.0.0.1:6767/clients -H \"REST-DHCPD-Auth-Token: secretToken\"\n```\n##### Display configuration of a specific client\n```\ncurl http://127.0.0.1:6767/client/aa:bb:cc:dd:ee:ff -H \"REST-DHCPD-Auth-Token: secretToken\"\n```\n#####  Add or update client\n```\ncurl  -X PUT http://127.0.0.1:6767/client/aa:bb:cc:dd:ee:ff -H \"REST-DHCPD-Auth-Token: secretToken\" -d '{\"Hostname\":\"test4\",\"IP\":\"192.168.13.17\",\"Options\":{\"13\":\"option13\"}}'\n```\n##### Delete client\n```\ncurl -X DELETE http://127.0.0.1:6767/client/aa:bb:cc:dd:ee:ff -H \"REST-DHCPD-Auth-Token: secretToken\"\n```\n\n#### HTTP return codes\n`200` - OK. Request was completed successfully.  \n`400` - BadRequest. Reports that configuration cannot be added or updated. HTTP body will display more detailed information about error.  \n`401` - Unauthorized.  `REST-DHCPD-Auth-Token` provided by client does not mach token in configuration.  \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinted%2Frest-dhcpd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinted%2Frest-dhcpd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinted%2Frest-dhcpd/lists"}