SubdomainDB is a simple self-hosted API that allows you to maintain your own subdomain database. Don't run this on an unauthenticated environment. For now there is no authentication implemented.
bundle install
bundle exec rake db:migrate
rerun -- rackup --port 4000 config.ru
or with Docker:
docker build --rm -t subdomaindb .
docker run -d -v subdomainDB:/subdomainDB -p 127.0.0.1:4000:4000 subdomaindb
Response (found)
{
"domains": [
{
"id": 1,
"name": "example.com"
},
{
"id": 2,
"name": "apple.com"
}
],
"success": true
}
Response (found)
{
"domains": [
{
"id": 8,
"name": "nu.example.com",
"created_at": "2018-01-04 21:15:42 UTC"
},
{
"id": 12,
"name": "pro.apple.com",
"created_at": "2018-01-05 01:32:48 UTC"
}
],
"debug": {
"offset": 0,
"limit": 10
},
"success": true
}
Response (not found)
{
"success": false,
"message": "No results"
}
Response (found)
{
"domains": [
{
"id": 11,
"name": "admin.apple.com",
"created_at": "2018-01-05 01:32:48 UTC"
},
{
"id": 12,
"name": "pro.apple.com",
"created_at": "2018-01-05 01:32:48 UTC"
}
],
"success": true
}
Response (not found)
{
"success": false,
"message": "domain not found"
}
Request
{
"domains" : [
"admin.example.com",
"test.example.com"
]
}
Response
{
"message" : "domains inserted",
"success" : true
}
Response
{
"message" : "Successfully deleted",
"success" : true
}