|
16 | 16 | description: Interact with and view information about rules. |
17 | 17 | - name: Routes |
18 | 18 | description: Interact with and view information about routes. |
| 19 | + - name: DNS |
| 20 | + description: Interact with and view information about DNS configuration. |
19 | 21 | components: |
20 | 22 | schemas: |
21 | 23 | User: |
@@ -373,6 +375,76 @@ components: |
373 | 375 | enum: [ "network","network_id","description","enabled","peer","metric","masquerade" ] |
374 | 376 | required: |
375 | 377 | - path |
| 378 | + Nameserver: |
| 379 | + type: object |
| 380 | + properties: |
| 381 | + ip: |
| 382 | + description: Nameserver IP |
| 383 | + type: string |
| 384 | + ns_type: |
| 385 | + description: Nameserver Type |
| 386 | + type: string |
| 387 | + enum: ["udp"] |
| 388 | + port: |
| 389 | + description: Nameserver Port |
| 390 | + type: integer |
| 391 | + required: |
| 392 | + - ip |
| 393 | + - ns_type |
| 394 | + - port |
| 395 | + NameserverGroupRequest: |
| 396 | + type: object |
| 397 | + properties: |
| 398 | + name: |
| 399 | + description: Nameserver group name |
| 400 | + type: string |
| 401 | + maxLength: 40 |
| 402 | + minLength: 1 |
| 403 | + description: |
| 404 | + description: Nameserver group description |
| 405 | + type: string |
| 406 | + nameservers: |
| 407 | + description: Nameserver group |
| 408 | + minLength: 1 |
| 409 | + maxLength: 2 |
| 410 | + type: array |
| 411 | + items: |
| 412 | + $ref: '#/components/schemas/Nameserver' |
| 413 | + enabled: |
| 414 | + description: Nameserver group status |
| 415 | + type: boolean |
| 416 | + groups: |
| 417 | + description: Nameserver group tag groups |
| 418 | + type: array |
| 419 | + items: |
| 420 | + type: string |
| 421 | + required: |
| 422 | + - name |
| 423 | + - description |
| 424 | + - nameservers |
| 425 | + - enabled |
| 426 | + - groups |
| 427 | + NameserverGroup: |
| 428 | + allOf: |
| 429 | + - type: object |
| 430 | + properties: |
| 431 | + id: |
| 432 | + description: Nameserver group ID |
| 433 | + type: string |
| 434 | + required: |
| 435 | + - id |
| 436 | + - $ref: '#/components/schemas/NameserverGroupRequest' |
| 437 | + NameserverGroupPatchOperation: |
| 438 | + allOf: |
| 439 | + - $ref: '#/components/schemas/PatchMinimum' |
| 440 | + - type: object |
| 441 | + properties: |
| 442 | + path: |
| 443 | + description: Nameserver group field to update in form /<field> |
| 444 | + type: string |
| 445 | + enum: [ "name","description","enabled","groups","nameservers" ] |
| 446 | + required: |
| 447 | + - path |
376 | 448 |
|
377 | 449 | responses: |
378 | 450 | not_found: |
@@ -1238,6 +1310,176 @@ paths: |
1238 | 1310 | schema: |
1239 | 1311 | type: string |
1240 | 1312 | description: The Route ID |
| 1313 | + responses: |
| 1314 | + '200': |
| 1315 | + description: Delete status code |
| 1316 | + content: { } |
| 1317 | + '400': |
| 1318 | + "$ref": "#/components/responses/bad_request" |
| 1319 | + '401': |
| 1320 | + "$ref": "#/components/responses/requires_authentication" |
| 1321 | + '403': |
| 1322 | + "$ref": "#/components/responses/forbidden" |
| 1323 | + '500': |
| 1324 | + "$ref": "#/components/responses/internal_error" |
| 1325 | + /api/dns/nameservers: |
| 1326 | + get: |
| 1327 | + summary: Returns a list of all Nameserver Groups |
| 1328 | + tags: [ DNS ] |
| 1329 | + security: |
| 1330 | + - BearerAuth: [ ] |
| 1331 | + responses: |
| 1332 | + '200': |
| 1333 | + description: A JSON Array of Nameserver Groups |
| 1334 | + content: |
| 1335 | + application/json: |
| 1336 | + schema: |
| 1337 | + type: array |
| 1338 | + items: |
| 1339 | + $ref: '#/components/schemas/NameserverGroup' |
| 1340 | + '400': |
| 1341 | + "$ref": "#/components/responses/bad_request" |
| 1342 | + '401': |
| 1343 | + "$ref": "#/components/responses/requires_authentication" |
| 1344 | + '403': |
| 1345 | + "$ref": "#/components/responses/forbidden" |
| 1346 | + '500': |
| 1347 | + "$ref": "#/components/responses/internal_error" |
| 1348 | + post: |
| 1349 | + summary: Creates a Nameserver Group |
| 1350 | + tags: [ DNS ] |
| 1351 | + security: |
| 1352 | + - BearerAuth: [ ] |
| 1353 | + requestBody: |
| 1354 | + description: New Nameserver Groups request |
| 1355 | + content: |
| 1356 | + 'application/json': |
| 1357 | + schema: |
| 1358 | + $ref: '#/components/schemas/NameserverGroupRequest' |
| 1359 | + responses: |
| 1360 | + '200': |
| 1361 | + description: A Nameserver Groups Object |
| 1362 | + content: |
| 1363 | + application/json: |
| 1364 | + schema: |
| 1365 | + $ref: '#/components/schemas/NameserverGroup' |
| 1366 | + '400': |
| 1367 | + "$ref": "#/components/responses/bad_request" |
| 1368 | + '401': |
| 1369 | + "$ref": "#/components/responses/requires_authentication" |
| 1370 | + '403': |
| 1371 | + "$ref": "#/components/responses/forbidden" |
| 1372 | + '500': |
| 1373 | + "$ref": "#/components/responses/internal_error" |
| 1374 | + |
| 1375 | + /api/dns/nameservers/{id}: |
| 1376 | + get: |
| 1377 | + summary: Get information about a Nameserver Groups |
| 1378 | + tags: [ DNS ] |
| 1379 | + security: |
| 1380 | + - BearerAuth: [ ] |
| 1381 | + parameters: |
| 1382 | + - in: path |
| 1383 | + name: id |
| 1384 | + required: true |
| 1385 | + schema: |
| 1386 | + type: string |
| 1387 | + description: The Nameserver Group ID |
| 1388 | + responses: |
| 1389 | + '200': |
| 1390 | + description: A Nameserver Group object |
| 1391 | + content: |
| 1392 | + application/json: |
| 1393 | + schema: |
| 1394 | + $ref: '#/components/schemas/NameserverGroup' |
| 1395 | + '400': |
| 1396 | + "$ref": "#/components/responses/bad_request" |
| 1397 | + '401': |
| 1398 | + "$ref": "#/components/responses/requires_authentication" |
| 1399 | + '403': |
| 1400 | + "$ref": "#/components/responses/forbidden" |
| 1401 | + '500': |
| 1402 | + "$ref": "#/components/responses/internal_error" |
| 1403 | + put: |
| 1404 | + summary: Update/Replace a Nameserver Group |
| 1405 | + tags: [ DNS ] |
| 1406 | + security: |
| 1407 | + - BearerAuth: [ ] |
| 1408 | + parameters: |
| 1409 | + - in: path |
| 1410 | + name: id |
| 1411 | + required: true |
| 1412 | + schema: |
| 1413 | + type: string |
| 1414 | + description: The Nameserver Group ID |
| 1415 | + requestBody: |
| 1416 | + description: Update Nameserver Group request |
| 1417 | + content: |
| 1418 | + application/json: |
| 1419 | + schema: |
| 1420 | + $ref: '#/components/schemas/NameserverGroupRequest' |
| 1421 | + responses: |
| 1422 | + '200': |
| 1423 | + description: A Nameserver Group object |
| 1424 | + content: |
| 1425 | + application/json: |
| 1426 | + schema: |
| 1427 | + $ref: '#/components/schemas/NameserverGroup' |
| 1428 | + '400': |
| 1429 | + "$ref": "#/components/responses/bad_request" |
| 1430 | + '401': |
| 1431 | + "$ref": "#/components/responses/requires_authentication" |
| 1432 | + '403': |
| 1433 | + "$ref": "#/components/responses/forbidden" |
| 1434 | + '500': |
| 1435 | + "$ref": "#/components/responses/internal_error" |
| 1436 | + patch: |
| 1437 | + summary: Update information about a Nameserver Group |
| 1438 | + tags: [ DNS ] |
| 1439 | + security: |
| 1440 | + - BearerAuth: [ ] |
| 1441 | + parameters: |
| 1442 | + - in: path |
| 1443 | + name: id |
| 1444 | + required: true |
| 1445 | + schema: |
| 1446 | + type: string |
| 1447 | + description: The Nameserver Group ID |
| 1448 | + requestBody: |
| 1449 | + description: Update Nameserver Group request using a list of json patch objects |
| 1450 | + content: |
| 1451 | + 'application/json': |
| 1452 | + schema: |
| 1453 | + type: array |
| 1454 | + items: |
| 1455 | + $ref: '#/components/schemas/NameserverGroupPatchOperation' |
| 1456 | + responses: |
| 1457 | + '200': |
| 1458 | + description: A Nameserver Group object |
| 1459 | + content: |
| 1460 | + application/json: |
| 1461 | + schema: |
| 1462 | + $ref: '#/components/schemas/NameserverGroup' |
| 1463 | + '400': |
| 1464 | + "$ref": "#/components/responses/bad_request" |
| 1465 | + '401': |
| 1466 | + "$ref": "#/components/responses/requires_authentication" |
| 1467 | + '403': |
| 1468 | + "$ref": "#/components/responses/forbidden" |
| 1469 | + '500': |
| 1470 | + "$ref": "#/components/responses/internal_error" |
| 1471 | + delete: |
| 1472 | + summary: Delete a Nameserver Group |
| 1473 | + tags: [ DNS ] |
| 1474 | + security: |
| 1475 | + - BearerAuth: [ ] |
| 1476 | + parameters: |
| 1477 | + - in: path |
| 1478 | + name: id |
| 1479 | + required: true |
| 1480 | + schema: |
| 1481 | + type: string |
| 1482 | + description: The Nameserver Group ID |
1241 | 1483 | responses: |
1242 | 1484 | '200': |
1243 | 1485 | description: Delete status code |
|
0 commit comments