148 lines
4.2 KiB
JSON
148 lines
4.2 KiB
JSON
|
{
|
||
|
"openapi": "3.0.0",
|
||
|
"info": {
|
||
|
"title": "bindAPI",
|
||
|
"version": "1.0.9"
|
||
|
},
|
||
|
"servers": [
|
||
|
{
|
||
|
"url": "{schema}://{hostname}/api",
|
||
|
"description": "The bindAPI URL.",
|
||
|
"variables": {
|
||
|
"schema": {
|
||
|
"enum": [
|
||
|
"http",
|
||
|
"https"
|
||
|
],
|
||
|
"default": "https"
|
||
|
},
|
||
|
"hostname": {
|
||
|
"enum": [
|
||
|
"ns1.24unix.net",
|
||
|
"ns2.24unix.net"
|
||
|
],
|
||
|
"default": "ns2.24unix.net"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"paths": {
|
||
|
"/ping": {
|
||
|
"get": {
|
||
|
"tags": [
|
||
|
"Server"
|
||
|
],
|
||
|
"description": "Checks for connectivity and valid APIkey",
|
||
|
"operationId": "ping",
|
||
|
"responses": {
|
||
|
"200": {
|
||
|
"description": "OK"
|
||
|
},
|
||
|
"401": {
|
||
|
"description": "API key is missing or invalid."
|
||
|
}
|
||
|
},
|
||
|
"security": [
|
||
|
{
|
||
|
"Authorization": []
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
"/version": {
|
||
|
"get": {
|
||
|
"tags": [
|
||
|
"Server"
|
||
|
],
|
||
|
"description": "Check the API version of the nameserver.",
|
||
|
"operationId": "version",
|
||
|
"responses": {
|
||
|
"200": {
|
||
|
"description": "x.y.z, aka major, minor, patch"
|
||
|
},
|
||
|
"401": {
|
||
|
"description": "API key is missing or invalid."
|
||
|
}
|
||
|
},
|
||
|
"security": [
|
||
|
{
|
||
|
"Authorization": []
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
"/domains": {
|
||
|
"get": {
|
||
|
"tags": [
|
||
|
"Domains"
|
||
|
],
|
||
|
"summary": "List all domains.",
|
||
|
"description": "Returns a list of all domains on this server.",
|
||
|
"operationId": "getAllDomains",
|
||
|
"responses": {
|
||
|
"200": {
|
||
|
"description": "OK"
|
||
|
},
|
||
|
"401": {
|
||
|
"description": "API key is missing or invalid."
|
||
|
},
|
||
|
"404": {
|
||
|
"description": "Domain not found."
|
||
|
}
|
||
|
},
|
||
|
"security": [
|
||
|
{
|
||
|
"Authorization": []
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
"/domains/{name}": {
|
||
|
"get": {
|
||
|
"tags": [
|
||
|
"Domains"
|
||
|
],
|
||
|
"summary": "Returns a single domain.",
|
||
|
"description": "Returns information of a single domain specified by its domain name.",
|
||
|
"operationId": "getSingleDomain",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"name": "name",
|
||
|
"in": "path",
|
||
|
"required": true,
|
||
|
"schema": {
|
||
|
"type": "string"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"responses": {
|
||
|
"200": {
|
||
|
"description": "OK"
|
||
|
},
|
||
|
"401": {
|
||
|
"description": "API key is missing or invalid."
|
||
|
},
|
||
|
"404": {
|
||
|
"description": "Domain not found."
|
||
|
}
|
||
|
},
|
||
|
"security": []
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"components": {
|
||
|
"securitySchemes": {
|
||
|
"Authorization": {
|
||
|
"type": "apiKey",
|
||
|
"description": "Api Authentication",
|
||
|
"name": "X-API-Key",
|
||
|
"in": "header"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"tags": [
|
||
|
{
|
||
|
"name": "Server"
|
||
|
}
|
||
|
]
|
||
|
}
|