1openapi: 3.0.0 2info: 3 title: "NGINX Unit 1.32.0" 4 description: "NGINX Unit is a lightweight and versatile application runtime 5 that provides the essential components for your web application as a 6 single open-source server: running application code, serving static assets, 7 handling TLS and request routing. 8 9 \n\n**Important**: Unit's API is designed to expose any part of its 10 configuration as an addressable endpoint. Suppose a JSON 11 object is stored at `/config/listeners/`:\n\n 12 13 ```json 14 { 15 \"*:8080\": { 16 \"pass\": \"applications/wp_emea_dev\" 17 } 18 } 19 ```\n 20 21 Here, `/config/listeners/*:8080` and `/config/listeners/*:8080/pass` 22 are also endpoints. Generally, object options are addressable by 23 their names, array items—by their indexes (`/array/0/`). 24 25 26 \n\n**Note**: By default, Unit is configured through a UNIX domain 27 socket. To use this specification with OpenAPI tools interactively, 28 [start](https://unit.nginx.org/howto/source/#source-startup) Unit 29 with a TCP port as the control socket." 30 31 contact: 32 name: "Unit project" 33 email: "unit-owner@nginx.org" 34 url: "https://unit.nginx.org/" 35 36 license: 37 name: "Apache 2.0" 38 url: "https://www.apache.org/licenses/LICENSE-2.0.html" 39 40 version: 0.2.0 41 42servers: 43 - url: http://{server}:{port} 44 variables: 45 server: 46 default: "localhost" 47 48 port: 49 default: "8080" 50 51# -- PATHS -- 52 53paths: 54 /certificates: 55 summary: "Endpoint for the `certificates` object" 56 get: 57 operationId: getCerts 58 summary: "Retrieve the certificates object" 59 description: "Retrieves the entire `/certificates` section that represents 60 Unit's [stored certificates](https://unit.nginx.org/certificates/)." 61 62 tags: 63 - certificates 64 65 responses: 66 "200": 67 description: "OK; the `certificates` object exists in 68 the configuration." 69 70 content: 71 application/json: 72 schema: 73 $ref: "#/components/schemas/cert" 74 75 examples: 76 example1: 77 $ref: "#/components/examples/cert" 78 79 "404": 80 $ref: "#/components/responses/responseNotFound" 81 82 /certificates/{bundleName}: 83 summary: "Endpoint for the certificate bundle object" 84 get: 85 operationId: getCertBundle 86 summary: "Retrieve the certificate bundle object" 87 description: "Retrieves the bundle description that represents 88 Unit's [stored certificate bundle] 89 (https://unit.nginx.org/certificates/)." 90 91 tags: 92 - certificates 93 94 parameters: 95 - $ref: "#/components/parameters/bundleName" 96 97 responses: 98 "200": 99 description: "OK; the certificate bundle object exists in 100 the configuration." 101 102 content: 103 application/json: 104 schema: 105 $ref: "#/components/schemas/certBundle" 106 107 examples: 108 example1: 109 $ref: "#/components/examples/certBundle" 110 111 "404": 112 $ref: "#/components/responses/responseNotFound" 113 114 put: 115 operationId: putCertBundle 116 summary: "Create or overwrite the actual certificate bundle" 117 description: "Creates or overwrites the [stored certificate bundle] 118 (https://unit.nginx.org/certificates/) in Unit." 119 120 tags: 121 - certificates 122 123 parameters: 124 - $ref: "#/components/parameters/bundleName" 125 126 requestBody: 127 required: true 128 content: 129 application/octet-stream: 130 schema: 131 type: string 132 format: binary 133 134 responses: 135 "200": 136 $ref: "#/components/responses/responseOkUpdated" 137 138 "400": 139 $ref: "#/components/responses/responseBadRequest" 140 141 "404": 142 $ref: "#/components/responses/responseNotFound" 143 144 "500": 145 $ref: "#/components/responses/responseInternalError" 146 147 /certificates/{bundleName}/key: 148 summary: "Endpoint for the certificate bundle key" 149 get: 150 operationId: getCertBundleKey 151 summary: "Retrieve the certificate bundle key type" 152 description: "Retrieves the bundle key type from a 153 [stored certificate bundle](https://unit.nginx.org/certificates/)." 154 155 tags: 156 - certificates 157 158 parameters: 159 - $ref: "#/components/parameters/bundleName" 160 161 responses: 162 "200": 163 description: "OK; the certificate bundle key type exists in 164 the configuration." 165 166 content: 167 application/json: 168 schema: 169 type: string 170 171 examples: 172 Key: 173 value: "RSA (4096 bits)" 174 175 "404": 176 $ref: "#/components/responses/responseNotFound" 177 178 /certificates/{bundleName}/chain: 179 summary: "Endpoint for the certificate bundle chain" 180 get: 181 operationId: getCertBundleChain 182 summary: "Retrieve the certificate bundle chain" 183 description: "Retrieves the bundle chain from a 184 [stored certificate bundle](https://unit.nginx.org/certificates/)." 185 186 tags: 187 - certificates 188 189 parameters: 190 - $ref: "#/components/parameters/bundleName" 191 192 responses: 193 "200": 194 description: "OK; the certificate bundle chain exists in 195 the configuration." 196 197 content: 198 application/json: 199 schema: 200 $ref: "#/components/schemas/certBundleChain" 201 202 examples: 203 example1: 204 $ref: "#/components/examples/certBundleChain" 205 206 "404": 207 $ref: "#/components/responses/responseNotFound" 208 209 /certificates/{bundleName}/chain/{arrayIndex}: 210 summary: "Endpoint for the certificate object in the chain array" 211 get: 212 operationId: getCertBundleChainCert 213 summary: "Retrieve certificate object from the chain array" 214 description: "Retrieves the individual certificate from a 215 [stored certificate bundle](https://unit.nginx.org/certificates/)." 216 217 tags: 218 - certificates 219 220 parameters: 221 - $ref: "#/components/parameters/arrayIndex" 222 - $ref: "#/components/parameters/bundleName" 223 224 responses: 225 "200": 226 description: "OK; the certificate exists in the configuration." 227 228 content: 229 application/json: 230 schema: 231 $ref: "#/components/schemas/certBundleChainCert" 232 233 examples: 234 example1: 235 $ref: "#/components/examples/certBundleChainCert" 236 237 "404": 238 $ref: "#/components/responses/responseNotFound" 239 240 /certificates/{bundleName}/chain/{arrayIndex}/subject: 241 summary: "Endpoint for the certificate subject object" 242 get: 243 operationId: getCertBundleChainCertSubj 244 summary: "Retrieve the subject from the certificate object" 245 description: "Retrieves the subject from a 246 [stored certificate](https://unit.nginx.org/certificates/)." 247 248 tags: 249 - certificates 250 251 parameters: 252 - $ref: "#/components/parameters/arrayIndex" 253 - $ref: "#/components/parameters/bundleName" 254 255 responses: 256 "200": 257 description: "OK; the certificate subject exists in 258 the configuration." 259 260 content: 261 application/json: 262 schema: 263 $ref: "#/components/schemas/certBundleChainCertSubj" 264 265 examples: 266 example1: 267 $ref: "#/components/examples/certBundleChainCertSubj" 268 269 "404": 270 $ref: "#/components/responses/responseNotFound" 271 272 /certificates/{bundleName}/chain/{arrayIndex}/subject/common_name: 273 summary: "Endpoint for the certificate's common name" 274 get: 275 operationId: getCertBundleChainCertSubjCN 276 summary: "Retrieve the common name from the certificate subject" 277 description: "Retrieves the common name from a 278 [stored certificate's subject](https://unit.nginx.org/certificates/)." 279 280 tags: 281 - certificates 282 283 parameters: 284 - $ref: "#/components/parameters/arrayIndex" 285 - $ref: "#/components/parameters/bundleName" 286 287 responses: 288 "200": 289 description: "OK; the certificate subject's common name exists in 290 the configuration." 291 292 content: 293 application/json: 294 schema: 295 type: string 296 297 examples: 298 CN: 299 value: "example.com" 300 301 "404": 302 $ref: "#/components/responses/responseNotFound" 303 304 /certificates/{bundleName}/chain/{arrayIndex}/subject/country: 305 summary: "Endpoint for the certificate's country of issue" 306 get: 307 operationId: getCertBundleChainCertSubjCountry 308 summary: "Retrieve the country code from the certificate subject" 309 description: "Retrieves the country code from a 310 [stored certificate's subject](https://unit.nginx.org/certificates/)." 311 312 tags: 313 - certificates 314 315 parameters: 316 - $ref: "#/components/parameters/arrayIndex" 317 - $ref: "#/components/parameters/bundleName" 318 319 responses: 320 "200": 321 description: "OK; the certificate subject's country code exists in 322 the configuration." 323 324 content: 325 application/json: 326 schema: 327 type: string 328 329 examples: 330 Country: 331 value: "US" 332 333 "404": 334 $ref: "#/components/responses/responseNotFound" 335 336 /certificates/{bundleName}/chain/{arrayIndex}/subject/state_or_province: 337 summary: "Endpoint for the certificate's state or province of issue" 338 get: 339 operationId: getCertBundleChainCertSubjState 340 summary: "Retrieve the state or province code from the 341 certificate subject" 342 343 description: "Retrieves the state or province code from a 344 [stored certificate's subject](https://unit.nginx.org/certificates/)." 345 346 tags: 347 - certificates 348 349 parameters: 350 - $ref: "#/components/parameters/arrayIndex" 351 - $ref: "#/components/parameters/bundleName" 352 353 responses: 354 "200": 355 description: "OK; the certificate subject's state or province code 356 exists in the configuration." 357 358 content: 359 application/json: 360 schema: 361 type: string 362 363 examples: 364 StateProvince: 365 value: "CA" 366 367 "404": 368 $ref: "#/components/responses/responseNotFound" 369 370 /certificates/{bundleName}/chain/{arrayIndex}/subject/organization: 371 summary: "Endpoint for the certificate's designated organization" 372 get: 373 operationId: getCertBundleChainCertSubjOrg 374 summary: "Retrieve the organization name from the certificate subject" 375 description: "Retrieves the organization name from a 376 [stored certificate's subject](https://unit.nginx.org/certificates/)." 377 378 tags: 379 - certificates 380 381 parameters: 382 - $ref: "#/components/parameters/arrayIndex" 383 - $ref: "#/components/parameters/bundleName" 384 385 responses: 386 "200": 387 description: "OK; the certificate subject's organization name exists 388 in the configuration." 389 390 content: 391 application/json: 392 schema: 393 type: string 394 395 examples: 396 Org: 397 value: "Acme, Inc." 398 399 "404": 400 $ref: "#/components/responses/responseNotFound" 401 402 /certificates/{bundleName}/chain/{arrayIndex}/subject/alt_names: 403 summary: "Endpoint for the certificate's alternative names" 404 get: 405 operationId: getCertBundleChainCertSubjAltArray 406 summary: "Retrieve the alternative names array from the 407 certificate subject" 408 409 description: "Retrieves the alternative names array from a 410 [stored certificate's subject](https://unit.nginx.org/certificates/)." 411 412 tags: 413 - certificates 414 415 parameters: 416 - $ref: "#/components/parameters/arrayIndex" 417 - $ref: "#/components/parameters/bundleName" 418 419 responses: 420 "200": 421 description: "OK; the certificate subject's alternative names array 422 exists in the configuration." 423 424 content: 425 application/json: 426 schema: 427 $ref: "#/components/schemas/stringArray" 428 429 examples: 430 AltNames: 431 value: 432 - "example.com" 433 - "www.example.com" 434 435 "404": 436 $ref: "#/components/responses/responseNotFound" 437 438 /certificates/{bundleName}/chain/{arrayIndex}/subject/alt_names/{arrayIndex2}: 439 summary: "Endpoint for the certificate's alternative name" 440 get: 441 operationId: getCertBundleChainCertSubjAlt 442 summary: "Retrieve an alternative name from the certificate subject" 443 description: "Retrieves an alternative name from a 444 [stored certificate's subject](https://unit.nginx.org/certificates/)." 445 446 tags: 447 - certificates 448 449 parameters: 450 - $ref: "#/components/parameters/arrayIndex" 451 - $ref: "#/components/parameters/arrayIndex2" 452 - $ref: "#/components/parameters/bundleName" 453 454 responses: 455 "200": 456 description: "OK; the certificate subject's alternative name exists 457 in the configuration." 458 459 content: 460 application/json: 461 schema: 462 type: string 463 464 examples: 465 AltName: 466 value: "example.com" 467 468 "404": 469 $ref: "#/components/responses/responseNotFound" 470 471 /certificates/{bundleName}/chain/{arrayIndex}/issuer: 472 summary: "Endpoint for the certificate issuer object" 473 get: 474 operationId: getCertBundleChainCertIssuer 475 summary: "Retrieve the issuer object from the certificate object" 476 description: "Retrieves the issuer object from a 477 [stored certificate](https://unit.nginx.org/certificates/)." 478 479 tags: 480 - certificates 481 482 parameters: 483 - $ref: "#/components/parameters/arrayIndex" 484 - $ref: "#/components/parameters/bundleName" 485 486 responses: 487 "200": 488 description: "OK; the certificate issuer object exists in 489 the configuration." 490 491 content: 492 application/json: 493 schema: 494 $ref: "#/components/schemas/certBundleChainCertIssuer" 495 496 examples: 497 example1: 498 $ref: "#/components/examples/certBundleChainCertIssuer" 499 500 "404": 501 $ref: "#/components/responses/responseNotFound" 502 503 /certificates/{bundleName}/chain/{arrayIndex}/issuer/common_name: 504 summary: "Endpoint for the certificate issuer's common name" 505 get: 506 operationId: getCertBundleChainCertIssuerCN 507 summary: "Retrieve the common name from the certificate issuer" 508 description: "Retrieves the common name from a 509 [stored certificate's issuer](https://unit.nginx.org/certificates/)." 510 511 tags: 512 - certificates 513 514 parameters: 515 - $ref: "#/components/parameters/arrayIndex" 516 - $ref: "#/components/parameters/bundleName" 517 518 responses: 519 "200": 520 description: "OK; the certificate issuer's common name exists in 521 the configuration." 522 523 content: 524 application/json: 525 schema: 526 type: string 527 528 examples: 529 CN: 530 value: "intermediate.ca.example.com" 531 532 "404": 533 $ref: "#/components/responses/responseNotFound" 534 535 /certificates/{bundleName}/chain/{arrayIndex}/issuer/country: 536 summary: "Endpoint for the certificate issuer's country of issue" 537 get: 538 operationId: getCertBundleChainCertissuerCountry 539 summary: "Retrieve the country code from the certificate issuer" 540 description: "Retrieves the country code from a 541 [stored certificate's issuer](https://unit.nginx.org/certificates/)." 542 tags: 543 - certificates 544 545 parameters: 546 - $ref: "#/components/parameters/arrayIndex" 547 - $ref: "#/components/parameters/bundleName" 548 549 responses: 550 "200": 551 description: "OK; the certificate issuer's country code exists in 552 the configuration." 553 554 content: 555 application/json: 556 schema: 557 type: string 558 559 examples: 560 Country: 561 value: "US" 562 563 "404": 564 $ref: "#/components/responses/responseNotFound" 565 566 /certificates/{bundleName}/chain/{arrayIndex}/issuer/state_or_province: 567 summary: "Endpoint for the certificate issuer's state or province of issue" 568 get: 569 operationId: getCertBundleChainCertIssuerState 570 summary: "Retrieve the state or province code from the certificate issuer" 571 description: "Retrieves the state or province code from a 572 [stored certificate's issuer](https://unit.nginx.org/certificates/)." 573 574 tags: 575 - certificates 576 577 parameters: 578 - $ref: "#/components/parameters/arrayIndex" 579 - $ref: "#/components/parameters/bundleName" 580 581 responses: 582 "200": 583 description: "OK; the certificate issuer's state or province code 584 exists in the configuration." 585 586 content: 587 application/json: 588 schema: 589 type: string 590 591 examples: 592 StateProvince: 593 value: "CA" 594 595 "404": 596 $ref: "#/components/responses/responseNotFound" 597 598 /certificates/{bundleName}/chain/{arrayIndex}/issuer/organization: 599 summary: "Endpoint for the certificate issuer's designated organization" 600 get: 601 operationId: getCertBundleChainCertIssuerOrg 602 summary: "Retrieve the organization name from the certificate issuer" 603 description: "Retrieves the organization name from a 604 [stored certificate's issuer](https://unit.nginx.org/certificates/)." 605 tags: 606 - certificates 607 608 parameters: 609 - $ref: "#/components/parameters/arrayIndex" 610 - $ref: "#/components/parameters/bundleName" 611 612 responses: 613 "200": 614 description: "OK; the certificate issuer's organization name exists in 615 the configuration." 616 617 content: 618 application/json: 619 schema: 620 type: string 621 622 examples: 623 Org: 624 value: "Acme Certification Authority" 625 626 "404": 627 $ref: "#/components/responses/responseNotFound" 628 629 /certificates/{bundleName}/chain/{arrayIndex}/validity: 630 summary: "Endpoint for the certificate validity object" 631 get: 632 operationId: getCertBundleChainCertValid 633 summary: "Retrieve the validity object from the certificate object" 634 description: "Retrieves the validity object from a 635 [stored certificate](https://unit.nginx.org/certificates/)." 636 637 tags: 638 - certificates 639 640 parameters: 641 - $ref: "#/components/parameters/arrayIndex" 642 - $ref: "#/components/parameters/bundleName" 643 644 responses: 645 "200": 646 description: "OK; the certificate validity object exists in 647 the configuration." 648 649 content: 650 application/json: 651 schema: 652 $ref: "#/components/schemas/certBundleChainCertValidity" 653 654 examples: 655 example1: 656 $ref: "#/components/examples/certBundleChainCertValidity" 657 658 "404": 659 $ref: "#/components/responses/responseNotFound" 660 661 /certificates/{bundleName}/chain/{arrayIndex}/validity/since: 662 summary: "Endpoint for the certificate validity's starting time" 663 get: 664 operationId: getCertBundleChainCertValidSince 665 summary: "Retrieve the starting time of certificate validity" 666 description: "Retrieves the starting time of a 667 [stored certificate's validity](https://unit.nginx.org/certificates/)." 668 669 tags: 670 - certificates 671 672 parameters: 673 - $ref: "#/components/parameters/arrayIndex" 674 - $ref: "#/components/parameters/bundleName" 675 676 responses: 677 "200": 678 description: "OK; the starting time of certificate validity exists 679 in the configuration." 680 681 content: 682 application/json: 683 schema: 684 type: string 685 686 examples: 687 DateTime: 688 value: "Sep 18 19:46:19 2022 GMT" 689 690 "404": 691 $ref: "#/components/responses/responseNotFound" 692 693 /certificates/{bundleName}/chain/{arrayIndex}/validity/until: 694 summary: "Endpoint for the certificate validity's ending time" 695 get: 696 operationId: getCertBundleChainCertValidUntil 697 summary: "Retrieve the ending time of certificate validity" 698 description: "Retrieves the ending time of a 699 [stored certificate's validity](https://unit.nginx.org/certificates/)." 700 701 tags: 702 - certificates 703 704 parameters: 705 - $ref: "#/components/parameters/arrayIndex" 706 - $ref: "#/components/parameters/bundleName" 707 708 responses: 709 "200": 710 description: "OK; the ending time of certificate validity exists 711 in the configuration." 712 713 content: 714 application/json: 715 schema: 716 type: string 717 718 examples: 719 DateTime: 720 value: "Sep 18 19:46:19 2022 GMT" 721 722 "404": 723 $ref: "#/components/responses/responseNotFound" 724 725 /config: 726 summary: "Endpoint for the `config` object" 727 get: 728 operationId: getConfig 729 summary: "Retrieve the config" 730 description: "Retrieves the `config` object that represents Unit's 731 [configuration](https://unit.nginx.org/configuration)." 732 733 tags: 734 - config 735 736 responses: 737 "200": 738 description: "OK; the `config` object exists in the 739 configuration." 740 741 content: 742 application/json: 743 schema: 744 $ref: "#/components/schemas/config" 745 746 examples: 747 example1: 748 $ref: "#/components/examples/config" 749 750 "404": 751 $ref: "#/components/responses/responseNotFound" 752 753 put: 754 operationId: updateConfig 755 summary: "Create or overwrite the config" 756 description: "Creates or overwrites the entire `config` object." 757 tags: 758 - config 759 760 requestBody: 761 required: true 762 content: 763 application/json: 764 schema: 765 $ref: "#/components/schemas/config" 766 767 examples: 768 example1: 769 $ref: "#/components/examples/config" 770 771 responses: 772 "200": 773 $ref: "#/components/responses/responseOkUpdated" 774 775 "400": 776 $ref: "#/components/responses/responseBadRequest" 777 778 "404": 779 $ref: "#/components/responses/responseNotFound" 780 781 "500": 782 $ref: "#/components/responses/responseInternalError" 783 784 delete: 785 operationId: deleteConfig 786 summary: "Delete the config object" 787 description: "Deletes the entire `config` object." 788 tags: 789 - config 790 791 responses: 792 "200": 793 $ref: "#/components/responses/responseOkDeleted" 794 795 "404": 796 $ref: "#/components/responses/responseNotFound" 797 798 /config/access_log: 799 summary: "Endpoint for the `access_log` object" 800 get: 801 operationId: getAccessLog 802 summary: "Retrieve the access log" 803 description: "Retrieves the `access_log` entity that represents Unit's 804 [access log](https://unit.nginx.org/configuration/#access-log)." 805 806 tags: 807 - access log 808 - config 809 810 responses: 811 "200": 812 description: "OK; the `access_log` entity exists in the 813 configuration." 814 815 content: 816 application/json: 817 schema: 818 $ref: "#/components/schemas/configAccessLog" 819 820 examples: 821 example1: 822 $ref: "#/components/examples/configAccessLogBasic" 823 824 example2: 825 $ref: "#/components/examples/configAccessLogComplex" 826 827 "404": 828 $ref: "#/components/responses/responseNotFound" 829 830 put: 831 operationId: updateAccessLog 832 summary: "Create or overwrite the access log" 833 description: "Creates or overwrites the entire `access_log` entity." 834 tags: 835 - access log 836 - config 837 838 requestBody: 839 required: true 840 content: 841 application/json: 842 schema: 843 $ref: "#/components/schemas/configAccessLog" 844 845 examples: 846 example1: 847 $ref: "#/components/examples/configAccessLogBasic" 848 849 example2: 850 $ref: "#/components/examples/configAccessLogComplex" 851 852 responses: 853 "200": 854 $ref: "#/components/responses/responseOkUpdated" 855 856 "400": 857 $ref: "#/components/responses/responseBadRequest" 858 859 "404": 860 $ref: "#/components/responses/responseNotFound" 861 862 "500": 863 $ref: "#/components/responses/responseInternalError" 864 865 delete: 866 operationId: deleteAccessLog 867 summary: "Delete the access log" 868 description: "Deletes the entire `access_log` section." 869 tags: 870 - access log 871 - config 872 873 responses: 874 "200": 875 $ref: "#/components/responses/responseOkDeleted" 876 877 "404": 878 $ref: "#/components/responses/responseNotFound" 879 880 /config/access_log/format: 881 summary: "Endpoint for the `format` access log option" 882 get: 883 operationId: getAccessLogFormat 884 summary: "Retrieve the access log format option" 885 description: "Retrieves the `format` option that represents Unit's 886 [access log format](https://unit.nginx.org/configuration/#access-log) 887 in the `access_log` object." 888 889 tags: 890 - access log 891 - config 892 893 responses: 894 "200": 895 description: "OK; the `format` option exists in the configuration." 896 897 content: 898 application/json: 899 schema: 900 type: string 901 902 examples: 903 format: 904 value: '$remote_addr - - [$time_local] "$request_line" $status 905 $body_bytes_sent "$header_referer" "$header_user_agent"' 906 907 "404": 908 $ref: "#/components/responses/responseNotFound" 909 910 put: 911 operationId: updateAccessLogFormat 912 summary: "Create or overwrite the access log format" 913 description: "Creates or overwrites the `format` option in the 914 `access_log` object." 915 916 tags: 917 - access log 918 - config 919 920 requestBody: 921 required: true 922 content: 923 application/json: 924 schema: 925 type: string 926 927 examples: 928 format: 929 value: '$remote_addr - - [$time_local] "$request_line" $status 930 $body_bytes_sent "$header_referer" "$header_user_agent"' 931 932 responses: 933 "200": 934 $ref: "#/components/responses/responseOkUpdated" 935 936 "400": 937 $ref: "#/components/responses/responseBadRequest" 938 939 "404": 940 $ref: "#/components/responses/responseNotFound" 941 942 "500": 943 $ref: "#/components/responses/responseInternalError" 944 945 delete: 946 operationId: deleteAccessLogFormat 947 summary: "Delete the access log format" 948 description: "Deletes the `format` option from the `access_log` object." 949 tags: 950 - access log 951 - config 952 953 responses: 954 "200": 955 $ref: "#/components/responses/responseOkDeleted" 956 957 "404": 958 $ref: "#/components/responses/responseNotFound" 959 960 /config/access_log/path: 961 summary: "Endpoint for the `path` access log option" 962 get: 963 operationId: getAccessLogPath 964 summary: "Retrieve the access log path option" 965 description: "Retrieves the `path` option that represents Unit's 966 [access log path](https://unit.nginx.org/configuration/#access-log) 967 in the `access_log` object." 968 969 tags: 970 - access log 971 - config 972 973 responses: 974 "200": 975 description: "OK; the `path` option exists in the configuration." 976 977 content: 978 application/json: 979 schema: 980 type: string 981 982 examples: 983 path: 984 value: "/var/log/unit/access.log" 985 986 "404": 987 $ref: "#/components/responses/responseNotFound" 988 989 put: 990 operationId: updateAccessLogPath 991 summary: "Create or overwrite the access log path" 992 description: "Creates or overwrites the `path` option in the `access_log` 993 object." 994 995 tags: 996 - access log 997 - config 998 999 requestBody: 1000 required: true 1001 content: 1002 application/json: 1003 schema: 1004 type: string 1005 1006 examples: 1007 path: 1008 value: "/var/log/unit/access.log" 1009 1010 responses: 1011 "200": 1012 $ref: "#/components/responses/responseOkUpdated" 1013 1014 "400": 1015 $ref: "#/components/responses/responseBadRequest" 1016 1017 "404": 1018 $ref: "#/components/responses/responseNotFound" 1019 1020 "500": 1021 $ref: "#/components/responses/responseInternalError" 1022 1023 delete: 1024 operationId: deleteAccessLogPath 1025 summary: "Delete the access log path" 1026 description: "Deletes the `path` option from the `access_log` object." 1027 tags: 1028 - access log 1029 - config 1030 1031 responses: 1032 "200": 1033 $ref: "#/components/responses/responseOkDeleted" 1034 1035 "404": 1036 $ref: "#/components/responses/responseNotFound" 1037 1038 /config/applications: 1039 summary: "Endpoint for the `applications` object in the configuration" 1040 get: 1041 operationId: getApplications 1042 summary: "Retrieve the applications object" 1043 description: "Retrieves the `applications` object that represents Unit's 1044 [applications](https://unit.nginx.org/configuration/#applications)." 1045 tags: 1046 - applications 1047 - config 1048 1049 responses: 1050 "200": 1051 description: "OK; the `applications` object exists in the 1052 configuration." 1053 1054 content: 1055 application/json: 1056 schema: 1057 $ref: "#/components/schemas/configApplications" 1058 1059 examples: 1060 example1: 1061 $ref: "#/components/examples/configApplications" 1062 1063 "404": 1064 $ref: "#/components/responses/responseNotFound" 1065 1066 put: 1067 operationId: updateApplications 1068 summary: "Overwrite the applications object" 1069 description: "Overwrites the `applications` object in the configuration." 1070 tags: 1071 - applications 1072 - config 1073 1074 requestBody: 1075 required: true 1076 content: 1077 application/json: 1078 schema: 1079 $ref: "#/components/schemas/configApplications" 1080 1081 examples: 1082 example1: 1083 $ref: "#/components/examples/configApplications" 1084 1085 responses: 1086 "200": 1087 $ref: "#/components/responses/responseOkUpdated" 1088 1089 "400": 1090 $ref: "#/components/responses/responseBadRequest" 1091 1092 "404": 1093 $ref: "#/components/responses/responseNotFound" 1094 1095 "500": 1096 $ref: "#/components/responses/responseInternalError" 1097 1098 delete: 1099 operationId: deleteApplications 1100 summary: "Delete the applications object" 1101 description: "Deletes the `applications` object from the configuration." 1102 tags: 1103 - applications 1104 - config 1105 1106 responses: 1107 "200": 1108 $ref: "#/components/responses/responseOkDeleted" 1109 1110 "404": 1111 $ref: "#/components/responses/responseNotFound" 1112 1113 /config/applications/{appName}: 1114 summary: "Endpoint for an application object in the configuration" 1115 1116 parameters: 1117 - $ref: "#/components/parameters/appName" 1118 1119 get: 1120 operationId: getApplication 1121 summary: "Retrieve an application object" 1122 description: "Retrieves the `{appName}` object that represents an 1123 [application](https://unit.nginx.org/configuration/#applications) 1124 in Unit's control API." 1125 1126 tags: 1127 - applications 1128 - config 1129 1130 responses: 1131 "200": 1132 description: "OK; the `{appName}` object exists in the configuration." 1133 1134 content: 1135 application/json: 1136 schema: 1137 $ref: "#/components/schemas/configApplication" 1138 1139 examples: 1140 example1: 1141 $ref: "#/components/examples/configApplication" 1142 1143 "404": 1144 $ref: "#/components/responses/responseNotFound" 1145 1146 put: 1147 operationId: updateApplication 1148 summary: "Create or overwrite the application object" 1149 description: "Creates or overwrites the `{appName}` object in the 1150 configuration." 1151 1152 tags: 1153 - applications 1154 - config 1155 1156 requestBody: 1157 required: true 1158 content: 1159 application/json: 1160 schema: 1161 $ref: "#/components/schemas/configApplication" 1162 1163 examples: 1164 example1: 1165 $ref: "#/components/examples/configApplication" 1166 1167 responses: 1168 "200": 1169 $ref: "#/components/responses/responseOkUpdated" 1170 1171 "400": 1172 $ref: "#/components/responses/responseBadRequest" 1173 1174 "404": 1175 $ref: "#/components/responses/responseNotFound" 1176 1177 "500": 1178 $ref: "#/components/responses/responseInternalError" 1179 1180 delete: 1181 operationId: deleteApplication 1182 summary: "Delete the application object" 1183 description: "Deletes the `{appName}` object from the configuration." 1184 tags: 1185 - applications 1186 - config 1187 1188 responses: 1189 "200": 1190 $ref: "#/components/responses/responseOkDeleted" 1191 1192 "404": 1193 $ref: "#/components/responses/responseNotFound" 1194 1195 /control/applications/{appName}/restart: 1196 summary: "Endpoint for the `applications/{appName}/restart` option" 1197 get: 1198 operationId: getAppRestart 1199 summary: "Restart the {appName} application" 1200 description: "Tells Unit to [restart] 1201 (https://unit.nginx.org/configuration/#process-management) 1202 the application identified by `{appName}`." 1203 1204 tags: 1205 - apps 1206 - control 1207 1208 parameters: 1209 - $ref: "#/components/parameters/appName" 1210 1211 responses: 1212 "200": 1213 description: "OK; the `{appName}` application was gracefully 1214 restarted." 1215 1216 content: 1217 application/json: 1218 schema: 1219 $ref: "#/components/schemas/jsonSuccessMessage" 1220 1221 example: 1222 success: "Ok" 1223 1224 "404": 1225 $ref: "#/components/responses/responseNotFound" 1226 1227 /config/listeners: 1228 summary: "Endpoint for the `listeners` object" 1229 get: 1230 operationId: getListeners 1231 summary: "Retrieve all the listeners" 1232 description: "Retrieves the `listeners` object whose options represent 1233 individual [listeners](https://unit.nginx.org/configuration/#listeners); 1234 each is a unique combination of a host IP address (or a `*` wildcard to 1235 match any host IP addresses) and a port." 1236 1237 tags: 1238 - listeners 1239 - config 1240 1241 responses: 1242 "200": 1243 description: "OK; the `listeners` object exists in the configuration." 1244 content: 1245 application/json: 1246 schema: 1247 $ref: "#/components/schemas/configListeners" 1248 1249 examples: 1250 example1: 1251 $ref: "#/components/examples/configListeners" 1252 1253 "404": 1254 $ref: "#/components/responses/responseNotFound" 1255 1256 put: 1257 operationId: updateListeners 1258 summary: "Create or overwrite all the listeners" 1259 description: "Creates or overwrites the entire `listeners` section with 1260 an object whose options represent individual listeners; each is a unique 1261 combination of a host IP address (or a `*` wildcard to match any host IP 1262 addresses) and a port." 1263 1264 tags: 1265 - listeners 1266 - config 1267 1268 requestBody: 1269 required: true 1270 content: 1271 application/json: 1272 schema: 1273 $ref: "#/components/schemas/configListeners" 1274 1275 examples: 1276 example1: 1277 $ref: "#/components/examples/configListenerSimple" 1278 1279 example2: 1280 $ref: "#/components/examples/configListeners" 1281 1282 responses: 1283 "200": 1284 $ref: "#/components/responses/responseOkUpdated" 1285 1286 "400": 1287 $ref: "#/components/responses/responseBadRequest" 1288 1289 "404": 1290 $ref: "#/components/responses/responseNotFound" 1291 1292 "500": 1293 $ref: "#/components/responses/responseInternalError" 1294 1295 delete: 1296 operationId: deleteListeners 1297 summary: "Delete all the listeners" 1298 description: "Deletes the entire `listeners` section." 1299 tags: 1300 - listeners 1301 - config 1302 1303 responses: 1304 "200": 1305 $ref: "#/components/responses/responseOkDeleted" 1306 1307 "404": 1308 $ref: "#/components/responses/responseNotFound" 1309 1310 /config/listeners/{listenerName}: 1311 summary: "Endpoint for a `listeners/{listenerName}` object that 1312 represents a listener" 1313 1314 get: 1315 operationId: getListener 1316 summary: "Retrieve a listener object" 1317 description: "Retrieves the `{listenerName}` object that configures a 1318 [listener](https://unit.nginx.org/configuration/#listeners)." 1319 1320 tags: 1321 - listeners 1322 - config 1323 1324 parameters: 1325 - $ref: "#/components/parameters/listenerName" 1326 1327 responses: 1328 "200": 1329 description: "OK; the `{listenerName}` object exists in 1330 the configuration." 1331 1332 content: 1333 application/json: 1334 schema: 1335 $ref: "#/components/schemas/configListener" 1336 1337 examples: 1338 example1: 1339 $ref: "#/components/examples/configListenerSimple" 1340 1341 example2: 1342 $ref: "#/components/examples/configListenerComplex" 1343 1344 "404": 1345 $ref: "#/components/responses/responseNotFound" 1346 1347 put: 1348 operationId: updateListener 1349 summary: "Create or overwrite a listener object" 1350 description: "Creates or overwrites the `{listenerName}` object." 1351 tags: 1352 - listeners 1353 - config 1354 1355 parameters: 1356 - $ref: "#/components/parameters/listenerName" 1357 1358 requestBody: 1359 required: true 1360 content: 1361 application/json: 1362 schema: 1363 $ref: "#/components/schemas/configListener" 1364 1365 examples: 1366 example1: 1367 $ref: "#/components/examples/configListenerSimple" 1368 1369 example2: 1370 $ref: "#/components/examples/configListenerComplex" 1371 1372 responses: 1373 "200": 1374 $ref: "#/components/responses/responseOkUpdated" 1375 1376 "400": 1377 $ref: "#/components/responses/responseBadRequest" 1378 1379 "404": 1380 $ref: "#/components/responses/responseNotFound" 1381 1382 "500": 1383 $ref: "#/components/responses/responseInternalError" 1384 1385 delete: 1386 operationId: deleteListener 1387 summary: "Delete a listener object" 1388 description: "Deletes the `{listenerName}` object." 1389 tags: 1390 - listeners 1391 - config 1392 1393 parameters: 1394 - $ref: "#/components/parameters/listenerName" 1395 1396 responses: 1397 "200": 1398 $ref: "#/components/responses/responseOkDeleted" 1399 1400 "404": 1401 $ref: "#/components/responses/responseNotFound" 1402 1403 /config/listeners/{listenerName}/pass: 1404 summary: "Endpoint for the `listeners/{listenerName}/pass` option" 1405 get: 1406 operationId: getListenerPass 1407 summary: "Retrieve the pass option in a listener" 1408 description: "Retrieves the `pass` option that configures the destination 1409 where the `{listenerName}` listener object 1410 [passes its requests](https://unit.nginx.org/configuration/#listeners)." 1411 1412 tags: 1413 - listeners 1414 - config 1415 1416 parameters: 1417 - $ref: "#/components/parameters/listenerName" 1418 1419 responses: 1420 "200": 1421 description: "OK; the `pass` option exists in the configuration." 1422 content: 1423 application/json: 1424 schema: 1425 type: string 1426 1427 examples: 1428 example1: 1429 $ref: "#/components/examples/configListenerPassApp" 1430 1431 example2: 1432 $ref: "#/components/examples/configListenerPassRoute" 1433 1434 example3: 1435 $ref: "#/components/examples/configListenerPassAppTarget" 1436 1437 "404": 1438 $ref: "#/components/responses/responseNotFound" 1439 1440 put: 1441 operationId: updateListenerPass 1442 summary: "Update the pass option in a listener" 1443 description: "Overwrites the `pass` option." 1444 tags: 1445 - listeners 1446 - config 1447 1448 parameters: 1449 - $ref: "#/components/parameters/listenerName" 1450 1451 requestBody: 1452 required: true 1453 content: 1454 application/json: 1455 schema: 1456 type: string 1457 1458 examples: 1459 example1: 1460 $ref: "#/components/examples/configListenerPassApp" 1461 1462 example2: 1463 $ref: "#/components/examples/configListenerPassRoute" 1464 1465 example3: 1466 $ref: "#/components/examples/configListenerPassAppTarget" 1467 1468 responses: 1469 "200": 1470 $ref: "#/components/responses/responseOkUpdated" 1471 1472 "400": 1473 $ref: "#/components/responses/responseBadRequest" 1474 1475 "404": 1476 $ref: "#/components/responses/responseNotFound" 1477 1478 "500": 1479 $ref: "#/components/responses/responseInternalError" 1480 1481 /config/listeners/{listenerName}/tls: 1482 summary: "Endpoint for the `listeners/{listenerName}/tls` object" 1483 get: 1484 operationId: getListenerTls 1485 summary: "Retrieve the tls object in a listener" 1486 description: "Retrieves the `tls` object that configures [TLS settings] 1487 (https://unit.nginx.org/configuration/#ssl-tls-configuration) 1488 for the `{listenerName}` listener." 1489 1490 tags: 1491 - listeners 1492 - config 1493 - tls 1494 1495 parameters: 1496 - $ref: "#/components/parameters/listenerName" 1497 1498 responses: 1499 "200": 1500 description: "OK; the `tls` object exists in the configuration." 1501 1502 content: 1503 application/json: 1504 schema: 1505 $ref: "#/components/schemas/configListenerTls" 1506 1507 examples: 1508 example1: 1509 $ref: "#/components/examples/configListenerTls" 1510 1511 "404": 1512 $ref: "#/components/responses/responseNotFound" 1513 1514 put: 1515 operationId: updateListenerTls 1516 summary: "Create or overwrite the tls object in a listener" 1517 description: "Creates or overwrites the entire `tls` object." 1518 tags: 1519 - listeners 1520 - config 1521 - tls 1522 1523 parameters: 1524 - $ref: "#/components/parameters/listenerName" 1525 1526 requestBody: 1527 required: true 1528 content: 1529 application/json: 1530 schema: 1531 $ref: "#/components/schemas/configListenerTls" 1532 1533 examples: 1534 example1: 1535 $ref: "#/components/examples/configListenerTls" 1536 1537 responses: 1538 "200": 1539 $ref: "#/components/responses/responseOkUpdated" 1540 1541 "400": 1542 $ref: "#/components/responses/responseBadRequest" 1543 1544 "404": 1545 $ref: "#/components/responses/responseNotFound" 1546 1547 "500": 1548 $ref: "#/components/responses/responseInternalError" 1549 1550 delete: 1551 operationId: deleteListenerTls 1552 summary: "Delete the tls object in a listener" 1553 description: "Deletes the `tls` object." 1554 tags: 1555 - listeners 1556 - config 1557 - tls 1558 1559 parameters: 1560 - $ref: "#/components/parameters/listenerName" 1561 1562 responses: 1563 "200": 1564 $ref: "#/components/responses/responseOkDeleted" 1565 1566 "404": 1567 $ref: "#/components/responses/responseNotFound" 1568 1569 /config/listeners/{listenerName}/tls/conf_commands: 1570 summary: "Endpoint for the `listeners/{listenerName}/tls/conf_commands` 1571 object" 1572 1573 get: 1574 operationId: listListenerTlsConfCommands 1575 summary: "Retrieve the conf_commands object in a listener" 1576 description: "Retrieves the `conf_commands` object that sets 1577 [TLS configuration commands] 1578 (https://unit.nginx.org/configuration/#ssl-tls-configuration) 1579 for the `{listenerName}` listener." 1580 1581 tags: 1582 - listeners 1583 - config 1584 - tls 1585 1586 parameters: 1587 - $ref: "#/components/parameters/listenerName" 1588 1589 responses: 1590 "200": 1591 description: "OK; the `conf_commands` object exists in the 1592 configuration." 1593 1594 content: 1595 application/json: 1596 schema: 1597 $ref: "#/components/schemas/configListenerTlsConfCommands" 1598 1599 examples: 1600 example1: 1601 $ref: "#/components/examples/configListenerTlsConfCommands" 1602 1603 "404": 1604 $ref: "#/components/responses/responseNotFound" 1605 1606 put: 1607 operationId: updateListenerTlsConfCommands 1608 summary: "Create or overwrite the conf_commands object in a listener" 1609 description: "Creates or overwrites the entire `conf_commands` object." 1610 tags: 1611 - listeners 1612 - config 1613 - tls 1614 1615 parameters: 1616 - $ref: "#/components/parameters/listenerName" 1617 1618 requestBody: 1619 required: true 1620 content: 1621 application/json: 1622 schema: 1623 $ref: "#/components/schemas/configListenerTlsConfCommands" 1624 1625 examples: 1626 example1: 1627 $ref: "#/components/examples/configListenerTlsConfCommands" 1628 1629 responses: 1630 "200": 1631 $ref: "#/components/responses/responseOkUpdated" 1632 1633 "400": 1634 $ref: "#/components/responses/responseBadRequest" 1635 1636 "404": 1637 $ref: "#/components/responses/responseNotFound" 1638 1639 "500": 1640 $ref: "#/components/responses/responseInternalError" 1641 1642 delete: 1643 operationId: deleteListenerTlsConfCommands 1644 summary: "Delete the conf_commands object in a listener" 1645 description: "Deletes the `conf_commands` object." 1646 tags: 1647 - listeners 1648 - config 1649 - tls 1650 1651 parameters: 1652 - $ref: "#/components/parameters/listenerName" 1653 1654 responses: 1655 "200": 1656 $ref: "#/components/responses/responseOkDeleted" 1657 1658 "404": 1659 $ref: "#/components/responses/responseNotFound" 1660 1661 /config/listeners/{listenerName}/tls/session: 1662 summary: "Endpoint for the `listeners/{listenerName}/tls/session` object" 1663 get: 1664 operationId: getListenerTlsSession 1665 summary: "Retrieve the session object in a listener" 1666 description: "Retrieves the `session` object that configures 1667 [TLS session settings] 1668 (https://unit.nginx.org/configuration/#ssl-tls-configuration) 1669 for the `{listenerName}` listener." 1670 1671 tags: 1672 - listeners 1673 - config 1674 - tls 1675 1676 parameters: 1677 - $ref: "#/components/parameters/listenerName" 1678 1679 responses: 1680 "200": 1681 description: "OK; the `session` object exists in the configuration." 1682 1683 content: 1684 application/json: 1685 schema: 1686 $ref: "#/components/schemas/configListenerTlsSession" 1687 1688 examples: 1689 example1: 1690 $ref: "#/components/examples/configListenerTlsSession" 1691 1692 "404": 1693 $ref: "#/components/responses/responseNotFound" 1694 1695 put: 1696 operationId: updateListenerTlsSession 1697 summary: "Create or overwrite the session object in a listener" 1698 description: "Creates or overwrites the entire `session` object." 1699 tags: 1700 - listeners 1701 - config 1702 - tls 1703 1704 parameters: 1705 - $ref: "#/components/parameters/listenerName" 1706 1707 requestBody: 1708 required: true 1709 content: 1710 application/json: 1711 schema: 1712 $ref: "#/components/schemas/configListenerTlsSession" 1713 1714 examples: 1715 example1: 1716 $ref: "#/components/examples/configListenerTlsSession" 1717 1718 responses: 1719 "200": 1720 $ref: "#/components/responses/responseOkUpdated" 1721 1722 "400": 1723 $ref: "#/components/responses/responseBadRequest" 1724 1725 "404": 1726 $ref: "#/components/responses/responseNotFound" 1727 1728 "500": 1729 $ref: "#/components/responses/responseInternalError" 1730 1731 delete: 1732 operationId: deleteListenerTlsSession 1733 summary: "Delete the session object in a listener" 1734 description: "Deletes the `session` object." 1735 tags: 1736 - listeners 1737 - config 1738 - tls 1739 1740 parameters: 1741 - $ref: "#/components/parameters/listenerName" 1742 1743 responses: 1744 "200": 1745 $ref: "#/components/responses/responseOkDeleted" 1746 1747 "404": 1748 $ref: "#/components/responses/responseNotFound" 1749 1750 /config/listeners/{listenerName}/tls/session/tickets: 1751 summary: "Endpoint for the `listeners/{listenerName}/session/tickets` 1752 object" 1753 1754 get: 1755 operationId: listListenerTlsSessionTickets 1756 summary: "Retrieve the tickets option in a listener" 1757 description: "Retrieves the `tickets` option that lists 1758 [TLS session ticket keys] 1759 (https://unit.nginx.org/configuration/#ssl-tls-configuration) 1760 used with the `{listenerName}` listener." 1761 1762 tags: 1763 - listeners 1764 - config 1765 - tls 1766 1767 parameters: 1768 - $ref: "#/components/parameters/listenerName" 1769 1770 responses: 1771 "200": 1772 description: "OK; the `tickets` option exists in the configuration." 1773 1774 content: 1775 application/jsons: 1776 schema: 1777 $ref: "#/components/schemas/configListenerTlsSessionTickets" 1778 1779 examples: 1780 example1: 1781 $ref: "#/components/examples/configListenerTlsSessionTicketsBool" 1782 1783 example2: 1784 $ref: "#/components/examples/configListenerTlsSessionTicketsString" 1785 1786 example3: 1787 $ref: "#/components/examples/configListenerTlsSessionTicketsArray" 1788 1789 "404": 1790 $ref: "#/components/responses/responseNotFound" 1791 1792 post: 1793 operationId: insertListenerTlsSessionTicket 1794 summary: "Add a new tickets array item in a listener" 1795 description: "Adds a new session ticket key to the end of the `tickets` 1796 string array that lists [session ticket keys] 1797 (https://unit.nginx.org/configuration/#ssl-tls-configuration) 1798 configured earlier." 1799 1800 tags: 1801 - listeners 1802 - config 1803 - tls 1804 1805 parameters: 1806 - $ref: "#/components/parameters/listenerName" 1807 1808 requestBody: 1809 required: true 1810 content: 1811 application/json: 1812 schema: 1813 type: string 1814 1815 examples: 1816 example1: 1817 $ref: "#/components/examples/configListenerTlsSessionTicketsString" 1818 1819 responses: 1820 "200": 1821 $ref: "#/components/responses/responseOkUpdated" 1822 1823 "400": 1824 $ref: "#/components/responses/responseBadRequest" 1825 1826 "404": 1827 $ref: "#/components/responses/responseNotFound" 1828 1829 "500": 1830 $ref: "#/components/responses/responseInternalError" 1831 1832 put: 1833 operationId: updateListenerTlsSessionTickets 1834 summary: "Create or overwrite the tickets option in a listener" 1835 description: "Creates or overwrites the entire `tickets` option with a 1836 boolean, string, or string array that configures [session ticket keys] 1837 (https://unit.nginx.org/configuration/#ssl-tls-configuration) 1838 used with the `{listenerName}` listener." 1839 1840 tags: 1841 - listeners 1842 - config 1843 - tls 1844 1845 parameters: 1846 - $ref: "#/components/parameters/listenerName" 1847 1848 requestBody: 1849 required: true 1850 content: 1851 application/json: 1852 schema: 1853 $ref: "#/components/schemas/configListenerTlsSessionTickets" 1854 1855 examples: 1856 example1: 1857 $ref: "#/components/examples/configListenerTlsSessionTicketsBool" 1858 1859 example2: 1860 $ref: "#/components/examples/configListenerTlsSessionTicketsString" 1861 1862 example3: 1863 $ref: "#/components/examples/configListenerTlsSessionTicketsArray" 1864 1865 responses: 1866 "200": 1867 $ref: "#/components/responses/responseOkUpdated" 1868 1869 "400": 1870 $ref: "#/components/responses/responseBadRequest" 1871 1872 "404": 1873 $ref: "#/components/responses/responseNotFound" 1874 1875 "500": 1876 $ref: "#/components/responses/responseInternalError" 1877 1878 delete: 1879 operationId: deleteListenerTlsSessionTickets 1880 summary: "Delete the tickets option in a listener" 1881 description: "Deletes the `tickets` option." 1882 tags: 1883 - listeners 1884 - config 1885 - tls 1886 1887 parameters: 1888 - $ref: "#/components/parameters/listenerName" 1889 1890 responses: 1891 "200": 1892 $ref: "#/components/responses/responseOkDeleted" 1893 1894 "404": 1895 $ref: "#/components/responses/responseNotFound" 1896 1897 /config/listeners/{listenerName}/tls/session/tickets/{arrayIndex}: 1898 summary: "Endpoint for the `listeners/{listenerName}/tls/certificate` 1899 object" 1900 1901 get: 1902 operationId: getListenerTlsSessionTicket 1903 summary: "Retrieve a ticket array item in a listener" 1904 description: "Retrieves the `{arrayIndex}`th item from the `tickets` 1905 string array." 1906 1907 tags: 1908 - listeners 1909 - config 1910 - tls 1911 1912 parameters: 1913 - $ref: "#/components/parameters/listenerName" 1914 - $ref: "#/components/parameters/arrayIndex" 1915 1916 responses: 1917 "200": 1918 description: "OK; the ticket key at `{arrayIndex}` exists in the 1919 configuration." 1920 1921 content: 1922 application/json: 1923 schema: 1924 type: string 1925 1926 examples: 1927 example1: 1928 $ref: "#/components/examples/configListenerTlsSessionTicketsString" 1929 1930 "404": 1931 $ref: "#/components/responses/responseNotFound" 1932 1933 put: 1934 operationId: updateListenerTlsSessionTicket 1935 summary: "Create or overwrite a ticket array item in a listener" 1936 description: "Overwrites a single `tickets` string array item identified 1937 by `{arrayIndex}`." 1938 1939 tags: 1940 - listeners 1941 - config 1942 - tls 1943 1944 parameters: 1945 - $ref: "#/components/parameters/listenerName" 1946 - $ref: "#/components/parameters/arrayIndex" 1947 1948 requestBody: 1949 required: true 1950 content: 1951 application/json: 1952 schema: 1953 type: string 1954 1955 examples: 1956 example1: 1957 $ref: "#/components/examples/configListenerTlsSessionTicketsString" 1958 1959 responses: 1960 "200": 1961 $ref: "#/components/responses/responseOkUpdated" 1962 1963 "400": 1964 $ref: "#/components/responses/responseBadRequest" 1965 1966 "404": 1967 $ref: "#/components/responses/responseNotFound" 1968 1969 "500": 1970 $ref: "#/components/responses/responseInternalError" 1971 1972 delete: 1973 operationId: deleteListenerTlsSessionTicket 1974 summary: "Delete a ticket array item in a listener" 1975 description: "Deletes an item from the `tickets` string array." 1976 tags: 1977 - listeners 1978 - config 1979 - tls 1980 1981 parameters: 1982 - $ref: "#/components/parameters/listenerName" 1983 - $ref: "#/components/parameters/arrayIndex" 1984 1985 responses: 1986 "200": 1987 $ref: "#/components/responses/responseOkDeleted" 1988 1989 "404": 1990 $ref: "#/components/responses/responseNotFound" 1991 1992 /config/listeners/{listenerName}/tls/certificate: 1993 summary: "Endpoint for the `listeners/{listenerName}/tls/certificate` 1994 object" 1995 1996 get: 1997 operationId: listListenerTlsCertificates 1998 summary: "Retrieve the certificate option in a listener" 1999 description: "Retrieves the `certificate` option that lists [certificate 2000 bundles](https://unit.nginx.org/configuration/#certificate-management) 2001 used with the `{listenerName}` listener." 2002 2003 tags: 2004 - listeners 2005 - config 2006 - tls 2007 2008 parameters: 2009 - $ref: "#/components/parameters/listenerName" 2010 2011 responses: 2012 "200": 2013 description: "OK; the `certificate` option exists in the 2014 configuration." 2015 2016 content: 2017 application/json: 2018 schema: 2019 $ref: "#/components/schemas/configListenerTlsCertificate" 2020 2021 examples: 2022 example1: 2023 $ref: "#/components/examples/configListenerTlsCertificateArray" 2024 2025 example2: 2026 $ref: "#/components/examples/configListenerTlsCertificateString" 2027 2028 "404": 2029 $ref: "#/components/responses/responseNotFound" 2030 2031 post: 2032 operationId: insertListenerTlsCertificate 2033 summary: "Add a new certificate array item in a listener" 2034 description: "Adds a new certificate bundle name to the end of the 2035 `certificate` string array." 2036 2037 tags: 2038 - listeners 2039 - config 2040 - tls 2041 2042 parameters: 2043 - $ref: "#/components/parameters/listenerName" 2044 2045 requestBody: 2046 required: true 2047 content: 2048 application/json: 2049 schema: 2050 type: string 2051 2052 examples: 2053 example1: 2054 $ref: "#/components/examples/configListenerTlsCertificateString" 2055 2056 responses: 2057 "200": 2058 $ref: "#/components/responses/responseOkUpdated" 2059 2060 "400": 2061 $ref: "#/components/responses/responseBadRequest" 2062 2063 "404": 2064 $ref: "#/components/responses/responseNotFound" 2065 2066 "500": 2067 $ref: "#/components/responses/responseInternalError" 2068 2069 put: 2070 operationId: updateListenerTlsCertificates 2071 summary: "Create or overwrite the certificate option in a listener" 2072 description: "Creates or overwrites the entire `certificate` option." 2073 tags: 2074 - listeners 2075 - config 2076 - tls 2077 2078 parameters: 2079 - $ref: "#/components/parameters/listenerName" 2080 2081 requestBody: 2082 required: true 2083 content: 2084 application/json: 2085 schema: 2086 $ref: "#/components/schemas/stringOrStringArray" 2087 2088 examples: 2089 example1: 2090 $ref: "#/components/examples/configListenerTlsCertificateArray" 2091 2092 example2: 2093 $ref: "#/components/examples/configListenerTlsCertificateString" 2094 2095 responses: 2096 "200": 2097 $ref: "#/components/responses/responseOkUpdated" 2098 2099 "400": 2100 $ref: "#/components/responses/responseBadRequest" 2101 2102 "404": 2103 $ref: "#/components/responses/responseNotFound" 2104 2105 "500": 2106 $ref: "#/components/responses/responseInternalError" 2107 2108 delete: 2109 operationId: deleteListenerTlsCertificates 2110 summary: "Delete the certificate option in a listener" 2111 description: "Deletes the `certificate` option." 2112 tags: 2113 - listeners 2114 - config 2115 - tls 2116 2117 parameters: 2118 - $ref: "#/components/parameters/listenerName" 2119 2120 responses: 2121 "200": 2122 $ref: "#/components/responses/responseOkDeleted" 2123 2124 "404": 2125 $ref: "#/components/responses/responseNotFound" 2126 2127 /config/listeners/{listenerName}/tls/certificate/{arrayIndex}: 2128 summary: "Endpoint for the `listeners/{listenerName}/tls/certificate` 2129 string array item" 2130 2131 get: 2132 operationId: getListenerTlsCertificate 2133 summary: "Retrieve a certificate array item in a listener" 2134 description: "Retrieves the `{arrayIndex}`th item from the `certificate` 2135 string array." 2136 2137 tags: 2138 - listeners 2139 - config 2140 - tls 2141 2142 parameters: 2143 - $ref: "#/components/parameters/listenerName" 2144 - $ref: "#/components/parameters/arrayIndex" 2145 2146 responses: 2147 "200": 2148 description: "OK; the certificate bundle at `{arrayIndex}` exists in 2149 the configuration." 2150 2151 content: 2152 application/json: 2153 schema: 2154 type: string 2155 2156 examples: 2157 example1: 2158 $ref: "#/components/examples/configListenerTlsCertificateString" 2159 2160 "404": 2161 $ref: "#/components/responses/responseNotFound" 2162 2163 put: 2164 operationId: updateListenerTlsCertificate 2165 summary: "Update a certificate array item in a listener" 2166 description: "Overwrites a single `certificate` string array item 2167 identified by `{arrayIndex}`." 2168 2169 tags: 2170 - listeners 2171 - config 2172 - tls 2173 2174 parameters: 2175 - $ref: "#/components/parameters/listenerName" 2176 - $ref: "#/components/parameters/arrayIndex" 2177 2178 requestBody: 2179 required: true 2180 content: 2181 application/json: 2182 schema: 2183 type: string 2184 2185 examples: 2186 example1: 2187 $ref: "#/components/examples/configListenerTlsCertificateString" 2188 2189 responses: 2190 "200": 2191 $ref: "#/components/responses/responseOkUpdated" 2192 2193 "400": 2194 $ref: "#/components/responses/responseBadRequest" 2195 2196 "404": 2197 $ref: "#/components/responses/responseNotFound" 2198 2199 "500": 2200 $ref: "#/components/responses/responseInternalError" 2201 2202 delete: 2203 operationId: deleteListenerTlsCertificate 2204 summary: "Delete a certificate array item in a listener" 2205 description: "Deletes an item from the `certificate` string array." 2206 tags: 2207 - listeners 2208 - config 2209 - tls 2210 2211 parameters: 2212 - $ref: "#/components/parameters/listenerName" 2213 - $ref: "#/components/parameters/arrayIndex" 2214 2215 responses: 2216 "200": 2217 $ref: "#/components/responses/responseOkDeleted" 2218 2219 "404": 2220 $ref: "#/components/responses/responseNotFound" 2221 2222 /config/listeners/{listenerName}/forwarded: 2223 summary: "Endpoint for the `listeners/{listenerName}/forwarded` object" 2224 get: 2225 operationId: getListenerForwarded 2226 summary: "Retrieve the forwarded object in a listener" 2227 description: "Retrieves the `forwarded` object that configures 2228 [originating IP identification] 2229 (https://unit.nginx.org/configuration/#ip-protocol-forwarding) 2230 for the `{listenerName}` listener." 2231 2232 tags: 2233 - listeners 2234 - config 2235 - xff 2236 2237 parameters: 2238 - $ref: "#/components/parameters/listenerName" 2239 2240 responses: 2241 "200": 2242 description: "OK; the `forwarded` object exists in the configuration." 2243 2244 content: 2245 application/json: 2246 schema: 2247 $ref: "#/components/schemas/configListenerForwarded" 2248 2249 examples: 2250 example1: 2251 $ref: "#/components/examples/configListenerForwarded" 2252 2253 "404": 2254 $ref: "#/components/responses/responseNotFound" 2255 2256 put: 2257 operationId: updateListenerForwarded 2258 summary: "Create or overwrite the forwarded object in a listener" 2259 description: "Creates or overwrites the entire `forwarded` object." 2260 tags: 2261 - listeners 2262 - config 2263 - xff 2264 2265 parameters: 2266 - $ref: "#/components/parameters/listenerName" 2267 2268 requestBody: 2269 required: true 2270 content: 2271 application/json: 2272 schema: 2273 $ref: "#/components/schemas/configListenerForwarded" 2274 2275 examples: 2276 example1: 2277 $ref: "#/components/examples/configListenerForwarded" 2278 2279 responses: 2280 "200": 2281 $ref: "#/components/responses/responseOkUpdated" 2282 2283 "400": 2284 $ref: "#/components/responses/responseBadRequest" 2285 2286 "404": 2287 $ref: "#/components/responses/responseNotFound" 2288 2289 "500": 2290 $ref: "#/components/responses/responseInternalError" 2291 2292 delete: 2293 operationId: deleteListenerForwared 2294 summary: "Delete the forwarded object in a listener" 2295 description: "Deletes the `forwarded` object." 2296 tags: 2297 - listeners 2298 - config 2299 - xff 2300 2301 parameters: 2302 - $ref: "#/components/parameters/listenerName" 2303 2304 responses: 2305 "200": 2306 $ref: "#/components/responses/responseOkDeleted" 2307 2308 "404": 2309 $ref: "#/components/responses/responseNotFound" 2310 2311 /config/listeners/{listenerName}/forwarded/client_ip: 2312 summary: "Endpoint for the `listeners/{listenerName}/forwarded/client_ip` 2313 option" 2314 2315 get: 2316 operationId: getListenerForwardedClientIp 2317 summary: "Retrieve the client_ip option in a listener" 2318 description: "Retrieves the `client_ip` option that configures the headers 2319 expected by the `{listenerName}` listener for 2320 [originating IP identification] 2321 (https://unit.nginx.org/configuration/#originating-ip-identification)." 2322 2323 tags: 2324 - listeners 2325 - config 2326 - xff 2327 2328 parameters: 2329 - $ref: "#/components/parameters/listenerName" 2330 2331 responses: 2332 "200": 2333 description: "OK; the `client_ip` option exists in the configuration." 2334 2335 content: 2336 application/json: 2337 schema: 2338 type: string 2339 2340 examples: 2341 example1: 2342 $ref: "#/components/examples/configListenerForwardedClientIp" 2343 2344 "404": 2345 $ref: "#/components/responses/responseNotFound" 2346 2347 put: 2348 operationId: updateListenerForwardedClientIp 2349 summary: "Create or overwrite the client_ip option in a listener" 2350 description: "Creates or overwrites the `client_ip` option." 2351 tags: 2352 - listeners 2353 - config 2354 - xff 2355 2356 parameters: 2357 - $ref: "#/components/parameters/listenerName" 2358 2359 requestBody: 2360 required: true 2361 content: 2362 application/json: 2363 schema: 2364 type: string 2365 2366 examples: 2367 example1: 2368 $ref: "#/components/examples/configListenerForwardedClientIp" 2369 2370 responses: 2371 "200": 2372 $ref: "#/components/responses/responseOkUpdated" 2373 2374 "400": 2375 $ref: "#/components/responses/responseBadRequest" 2376 2377 "404": 2378 $ref: "#/components/responses/responseNotFound" 2379 2380 "500": 2381 $ref: "#/components/responses/responseInternalError" 2382 2383 /config/listeners/{listenerName}/forwarded/protocol: 2384 summary: "Endpoint for the `listeners/{listenerName}/forwarded/protocol` 2385 option" 2386 2387 get: 2388 operationId: getListenerForwardedProtocol 2389 summary: "Retrieve the protocol option in a listener" 2390 description: "Retrieves the `protocol` option that configures the protocol 2391 expected by the `{listenerName}` listener for 2392 [originating IP identification] 2393 (https://unit.nginx.org/configuration/#originating-ip-identification)." 2394 2395 tags: 2396 - listeners 2397 - config 2398 - xff 2399 2400 parameters: 2401 - $ref: "#/components/parameters/listenerName" 2402 2403 responses: 2404 "200": 2405 description: "OK; the `protocol` option exists in the configuration." 2406 2407 content: 2408 application/json: 2409 schema: 2410 type: string 2411 enum: 2412 - "http" 2413 - "https" 2414 - "on" 2415 2416 examples: 2417 example1: 2418 $ref: "#/components/examples/configListenerForwardedProtocol" 2419 2420 "404": 2421 $ref: "#/components/responses/responseNotFound" 2422 2423 put: 2424 operationId: updateListenerForwardedProtocol 2425 summary: "Create or overwrite the protocol option in a listener" 2426 description: "Creates or overwrites the `protocol` option." 2427 tags: 2428 - listeners 2429 - config 2430 - xff 2431 2432 parameters: 2433 - $ref: "#/components/parameters/listenerName" 2434 2435 requestBody: 2436 required: true 2437 content: 2438 application/json: 2439 schema: 2440 type: string 2441 enum: 2442 - "http" 2443 - "https" 2444 - "on" 2445 2446 examples: 2447 example1: 2448 $ref: "#/components/examples/configListenerForwardedProtocol" 2449 2450 responses: 2451 "200": 2452 $ref: "#/components/responses/responseOkUpdated" 2453 2454 "400": 2455 $ref: "#/components/responses/responseBadRequest" 2456 2457 "404": 2458 $ref: "#/components/responses/responseNotFound" 2459 2460 "500": 2461 $ref: "#/components/responses/responseInternalError" 2462 2463 /config/listeners/{listenerName}/forwarded/recursive: 2464 summary: "Endpoint for the `listeners/{listenerName}/forwarded/recursive` 2465 option" 2466 2467 get: 2468 operationId: getListenerForwardedRecursive 2469 summary: "Retrieve the recursive option in a listener" 2470 description: "Retrieves the `recursive` option that controls how the 2471 `{listenerName}` listener uses [originating IP identification] 2472 (https://unit.nginx.org/configuration/#originating-ip-identification)." 2473 2474 tags: 2475 - listeners 2476 - config 2477 - xff 2478 2479 parameters: 2480 - $ref: "#/components/parameters/listenerName" 2481 2482 responses: 2483 "200": 2484 description: "OK; the `recursive` option exists in the configuration." 2485 2486 content: 2487 application/json: 2488 schema: 2489 type: boolean 2490 2491 examples: 2492 example1: 2493 summary: "Enables recursive header field traversal" 2494 value: true 2495 2496 example2: 2497 summary: "Disables recursive header field traversal" 2498 value: false 2499 2500 "404": 2501 $ref: "#/components/responses/responseNotFound" 2502 2503 put: 2504 operationId: updateListenerForwardedRecursive 2505 summary: "Create or overwrite the recursive option in a listener" 2506 description: "Creates or overwrites the `recursive` option." 2507 tags: 2508 - listeners 2509 - config 2510 - xff 2511 2512 parameters: 2513 - $ref: "#/components/parameters/listenerName" 2514 2515 requestBody: 2516 required: true 2517 content: 2518 application/json: 2519 schema: 2520 type: boolean 2521 2522 examples: 2523 example1: 2524 summary: "Enables recursive header field traversal" 2525 value: true 2526 2527 example2: 2528 summary: "Disables recursive header field traversal" 2529 value: false 2530 2531 responses: 2532 "200": 2533 $ref: "#/components/responses/responseOkUpdated" 2534 2535 "400": 2536 $ref: "#/components/responses/responseBadRequest" 2537 2538 "404": 2539 $ref: "#/components/responses/responseNotFound" 2540 2541 "500": 2542 $ref: "#/components/responses/responseInternalError" 2543 2544 delete: 2545 operationId: deleteListenerForwardedRecursive 2546 summary: "Delete the recursive object in a listener" 2547 description: "Deletes the `recursive` object." 2548 tags: 2549 - listeners 2550 - config 2551 - xff 2552 2553 parameters: 2554 - $ref: "#/components/parameters/listenerName" 2555 2556 responses: 2557 "200": 2558 $ref: "#/components/responses/responseOkDeleted" 2559 2560 "404": 2561 $ref: "#/components/responses/responseNotFound" 2562 2563 /config/listeners/{listenerName}/forwarded/source: 2564 summary: "Endpoint for the `listeners/{listenerName}/forwarded/source` 2565 object" 2566 2567 get: 2568 operationId: listListenerForwardedSources 2569 summary: "Retrieve the source option in a listener" 2570 description: "Retrieves the `source` option that defines address patterns 2571 for trusted addresses, used by the `{listenerName}` listener for 2572 [originating IP identification] 2573 (https://unit.nginx.org/configuration/#originating-ip-identification)." 2574 2575 tags: 2576 - listeners 2577 - config 2578 - xff 2579 2580 parameters: 2581 - $ref: "#/components/parameters/listenerName" 2582 2583 responses: 2584 "200": 2585 description: "OK; the `source` option exists in the configuration." 2586 content: 2587 application/json: 2588 schema: 2589 $ref: "#/components/schemas/stringOrStringArray" 2590 2591 examples: 2592 example1: 2593 $ref: "#/components/examples/configListenerForwardedSourceArray" 2594 2595 example2: 2596 $ref: "#/components/examples/configListenerForwardedSourceString" 2597 2598 "404": 2599 $ref: "#/components/responses/responseNotFound" 2600 2601 post: 2602 operationId: insertListenerForwardedSource 2603 summary: "Add a new source array item in a listener" 2604 description: "Adds a new source bundle name to the end of the `source` 2605 string array defines address patterns for trusted addresses, used by 2606 the `{listenerName}` listener for [originating IP identification] 2607 (https://unit.nginx.org/configuration/#originating-ip-identification)." 2608 2609 tags: 2610 - listeners 2611 - config 2612 - xff 2613 2614 parameters: 2615 - $ref: "#/components/parameters/listenerName" 2616 2617 requestBody: 2618 required: true 2619 content: 2620 application/json: 2621 schema: 2622 type: string 2623 2624 examples: 2625 example1: 2626 $ref: "#/components/examples/configListenerForwardedSourceString" 2627 2628 responses: 2629 "200": 2630 $ref: "#/components/responses/responseOkUpdated" 2631 2632 "400": 2633 $ref: "#/components/responses/responseBadRequest" 2634 2635 "404": 2636 $ref: "#/components/responses/responseNotFound" 2637 2638 "500": 2639 $ref: "#/components/responses/responseInternalError" 2640 2641 put: 2642 operationId: updateListenerForwardedSources 2643 summary: "Create or overwrite the source option in a listener" 2644 description: "Creates or overwrites the entire `source` option." 2645 tags: 2646 - listeners 2647 - config 2648 - xff 2649 2650 parameters: 2651 - $ref: "#/components/parameters/listenerName" 2652 2653 requestBody: 2654 required: true 2655 content: 2656 application/json: 2657 schema: 2658 $ref: "#/components/schemas/stringOrStringArray" 2659 2660 examples: 2661 example1: 2662 $ref: "#/components/examples/configListenerForwardedSourceArray" 2663 2664 example2: 2665 $ref: "#/components/examples/configListenerForwardedSourceString" 2666 2667 responses: 2668 "200": 2669 $ref: "#/components/responses/responseOkUpdated" 2670 2671 "400": 2672 $ref: "#/components/responses/responseBadRequest" 2673 2674 "404": 2675 $ref: "#/components/responses/responseNotFound" 2676 2677 "500": 2678 $ref: "#/components/responses/responseInternalError" 2679 2680 delete: 2681 operationId: deleteListenerForwardedSources 2682 summary: "Delete the source option in a listener" 2683 description: "Deletes the `source` option." 2684 tags: 2685 - listeners 2686 - config 2687 - xff 2688 2689 parameters: 2690 - $ref: "#/components/parameters/listenerName" 2691 2692 responses: 2693 "200": 2694 $ref: "#/components/responses/responseOkDeleted" 2695 2696 "404": 2697 $ref: "#/components/responses/responseNotFound" 2698 2699 /config/listeners/{listenerName}/forwarded/source/{arrayIndex}: 2700 summary: "Endpoint for the `listeners/{listenerName}/forwarded/source` 2701 string array item" 2702 2703 get: 2704 operationId: getListenerForwardedSource 2705 summary: "Retrieve a source array item in a listener" 2706 description: "Retrieves the `{arrayIndex}`th item from the `source` 2707 string array." 2708 2709 tags: 2710 - listeners 2711 - config 2712 - xff 2713 2714 parameters: 2715 - $ref: "#/components/parameters/listenerName" 2716 - $ref: "#/components/parameters/arrayIndex" 2717 2718 responses: 2719 "200": 2720 description: "OK; the address pattern at `{arrayIndex}` exists in the 2721 configuration." 2722 2723 content: 2724 application/json: 2725 schema: 2726 type: string 2727 2728 examples: 2729 example1: 2730 $ref: "#/components/examples/configListenerForwardedSourceString" 2731 2732 "404": 2733 $ref: "#/components/responses/responseNotFound" 2734 2735 put: 2736 operationId: updateListenerForwardedSource 2737 summary: "Update a source array item in a listener" 2738 description: "Overwrites a single `source` string array item identified 2739 by `{arrayIndex}`." 2740 2741 tags: 2742 - listeners 2743 - config 2744 - xff 2745 2746 parameters: 2747 - $ref: "#/components/parameters/listenerName" 2748 - $ref: "#/components/parameters/arrayIndex" 2749 2750 requestBody: 2751 required: true 2752 content: 2753 application/json: 2754 schema: 2755 type: string 2756 2757 examples: 2758 example1: 2759 $ref: "#/components/examples/configListenerForwardedSourceString" 2760 2761 responses: 2762 "200": 2763 $ref: "#/components/responses/responseOkUpdated" 2764 2765 "400": 2766 $ref: "#/components/responses/responseBadRequest" 2767 2768 "404": 2769 $ref: "#/components/responses/responseNotFound" 2770 2771 "500": 2772 $ref: "#/components/responses/responseInternalError" 2773 2774 delete: 2775 operationId: deleteListenerForwardedSource 2776 summary: "Delete a source array item in a listener" 2777 description: "Deletes an item from the `source` string array." 2778 tags: 2779 - listeners 2780 - config 2781 - xff 2782 2783 parameters: 2784 - $ref: "#/components/parameters/listenerName" 2785 - $ref: "#/components/parameters/arrayIndex" 2786 2787 responses: 2788 "200": 2789 $ref: "#/components/responses/responseOkDeleted" 2790 2791 "404": 2792 $ref: "#/components/responses/responseNotFound" 2793 2794 /config/routes: 2795 summary: "Endpoint for the `routes` entity in the configuration" 2796 get: 2797 operationId: getRoutes 2798 summary: "Retrieve the routes entity" 2799 description: "Retrieves the `routes` entity that represents Unit's 2800 [routes](https://unit.nginx.org/configuration/#routes)." 2801 2802 tags: 2803 - config 2804 - routes 2805 2806 responses: 2807 "200": 2808 description: "OK; the `routes` entity exists in the configuration." 2809 2810 content: 2811 application/json: 2812 schema: 2813 $ref: "#/components/schemas/configRoutes" 2814 2815 examples: 2816 example1: 2817 $ref: "#/components/examples/configRoutes" 2818 2819 "404": 2820 $ref: "#/components/responses/responseNotFound" 2821 2822 put: 2823 operationId: updateRoutes 2824 summary: "Overwrite the routes entity" 2825 description: "Overwrites the `routes` entity in the configuration." 2826 tags: 2827 - config 2828 - routes 2829 2830 requestBody: 2831 required: true 2832 content: 2833 application/json: 2834 schema: 2835 $ref: "#/components/schemas/configRoutes" 2836 2837 examples: 2838 example1: 2839 $ref: "#/components/examples/configRoutes" 2840 2841 responses: 2842 "200": 2843 $ref: "#/components/responses/responseOkUpdated" 2844 2845 "400": 2846 $ref: "#/components/responses/responseBadRequest" 2847 2848 "404": 2849 $ref: "#/components/responses/responseNotFound" 2850 2851 "500": 2852 $ref: "#/components/responses/responseInternalError" 2853 2854 delete: 2855 operationId: deleteRoutes 2856 summary: "Delete the routes entity" 2857 description: "Deletes the `routes` entity from the configuration." 2858 tags: 2859 - config 2860 - routes 2861 2862 responses: 2863 "200": 2864 $ref: "#/components/responses/responseOkDeleted" 2865 2866 "404": 2867 $ref: "#/components/responses/responseNotFound" 2868 2869 /config/settings: 2870 summary: "Endpoint for the `settings` object in the configuration" 2871 get: 2872 operationId: getSettings 2873 summary: "Retrieve the settings object" 2874 description: "Retrieves the `settings` object that represents Unit's 2875 [global settings](https://unit.nginx.org/configuration/#settings)." 2876 2877 tags: 2878 - settings 2879 - config 2880 2881 responses: 2882 "200": 2883 description: "OK; the `settings` object exists in the configuration." 2884 2885 content: 2886 application/json: 2887 schema: 2888 $ref: "#/components/schemas/configSettings" 2889 2890 examples: 2891 example1: 2892 $ref: "#/components/examples/configSettings" 2893 2894 "404": 2895 $ref: "#/components/responses/responseNotFound" 2896 2897 put: 2898 operationId: updateSettings 2899 summary: "Create or overwrite the settings object" 2900 description: "Creates or overwrites the `settings` object in the 2901 configuration." 2902 2903 tags: 2904 - settings 2905 - config 2906 2907 requestBody: 2908 required: true 2909 content: 2910 application/json: 2911 schema: 2912 $ref: "#/components/schemas/configSettings" 2913 2914 examples: 2915 example1: 2916 $ref: "#/components/examples/configSettings" 2917 2918 responses: 2919 "200": 2920 $ref: "#/components/responses/responseOkUpdated" 2921 2922 "400": 2923 $ref: "#/components/responses/responseBadRequest" 2924 2925 "404": 2926 $ref: "#/components/responses/responseNotFound" 2927 2928 "500": 2929 $ref: "#/components/responses/responseInternalError" 2930 2931 delete: 2932 operationId: deleteSettings 2933 summary: "Delete the settings object" 2934 description: "Deletes the `settings` object from the configuration." 2935 tags: 2936 - settings 2937 - config 2938 2939 responses: 2940 "200": 2941 $ref: "#/components/responses/responseOkDeleted" 2942 2943 "404": 2944 $ref: "#/components/responses/responseNotFound" 2945 2946 /config/settings/http: 2947 summary: "Endpoint for the `http` object in `settings`" 2948 2949 get: 2950 operationId: getSettingsHttp 2951 summary: "Retrieve the http object from settings" 2952 description: "Retrieves the `http` object that represents Unit's 2953 [HTTP settings](https://unit.nginx.org/configuration/#settings)." 2954 2955 tags: 2956 - settings 2957 - config 2958 2959 responses: 2960 "200": 2961 description: "OK; the `http` object exists in the configuration." 2962 2963 content: 2964 application/json: 2965 schema: 2966 $ref: "#/components/schemas/configSettingsHttp" 2967 2968 examples: 2969 example1: 2970 $ref: "#/components/examples/configSettingsHttp" 2971 2972 "404": 2973 $ref: "#/components/responses/responseNotFound" 2974 2975 put: 2976 operationId: updateSettingsHttp 2977 summary: "Create or overwrite the http object" 2978 description: "Creates or overwrites the `http` object in the 2979 configuration." 2980 2981 tags: 2982 - settings 2983 - config 2984 2985 requestBody: 2986 required: true 2987 content: 2988 application/json: 2989 schema: 2990 $ref: "#/components/schemas/configSettingsHttp" 2991 2992 examples: 2993 example1: 2994 $ref: "#/components/examples/configSettingsHttp" 2995 2996 responses: 2997 "200": 2998 $ref: "#/components/responses/responseOkUpdated" 2999 3000 "400": 3001 $ref: "#/components/responses/responseBadRequest" 3002 3003 "404": 3004 $ref: "#/components/responses/responseNotFound" 3005 3006 "500": 3007 $ref: "#/components/responses/responseInternalError" 3008 3009 delete: 3010 operationId: deleteSettingsHttp 3011 summary: "Delete the http object" 3012 description: "Deletes the `http` object from the configuration." 3013 tags: 3014 - settings 3015 - config 3016 3017 responses: 3018 "200": 3019 $ref: "#/components/responses/responseOkDeleted" 3020 3021 "404": 3022 $ref: "#/components/responses/responseNotFound" 3023 3024 /config/settings/http/body_read_timeout: 3025 summary: "Endpoint for the `body_read_timeout` option in `http`" 3026 get: 3027 operationId: getSettingsHttpBodyReadTimeout 3028 summary: "Retrieve the body_read_timeout option from http settings" 3029 description: "Retrieves the `body_read_timeout` option that represents 3030 Unit's [request body read timeout] 3031 (https://unit.nginx.org/configuration/#settings)." 3032 3033 tags: 3034 - settings 3035 - config 3036 3037 responses: 3038 "200": 3039 description: "OK; the `body_read_timeout` option exists in the 3040 configuration." 3041 3042 content: 3043 application/json: 3044 schema: 3045 type: integer 3046 3047 examples: 3048 BodyReadTimeout: 3049 value: 30 3050 3051 "404": 3052 $ref: "#/components/responses/responseNotFound" 3053 3054 put: 3055 operationId: updateSettingsHttpBodyReadTimeout 3056 summary: "Create or overwrite the body_read_timeout option" 3057 description: "Creates or overwrites the `body_read_timeout` option in 3058 the configuration." 3059 3060 tags: 3061 - settings 3062 - config 3063 3064 requestBody: 3065 required: true 3066 content: 3067 application/json: 3068 schema: 3069 type: integer 3070 3071 examples: 3072 BodyReadTimeout: 3073 value: 30 3074 3075 responses: 3076 "200": 3077 $ref: "#/components/responses/responseOkUpdated" 3078 3079 "400": 3080 $ref: "#/components/responses/responseBadRequest" 3081 3082 "404": 3083 $ref: "#/components/responses/responseNotFound" 3084 3085 "500": 3086 $ref: "#/components/responses/responseInternalError" 3087 3088 delete: 3089 operationId: deleteSettingsHttpBodyReadTimeout 3090 summary: "Delete the body_read_timeout option" 3091 description: "Deletes the `body_read_timeout` option from the 3092 configuration." 3093 3094 tags: 3095 - settings 3096 - config 3097 3098 responses: 3099 "200": 3100 $ref: "#/components/responses/responseOkDeleted" 3101 3102 "404": 3103 $ref: "#/components/responses/responseNotFound" 3104 3105 /config/settings/http/discard_unsafe_fields: 3106 summary: "Endpoint for the `discard_unsafe_fields` option in `http`" 3107 get: 3108 operationId: getSettingsDiscardUnsafeFields 3109 summary: "Retrieve the discard_unsafe_fields option from http settings" 3110 description: "Retrieves the `discard_unsafe_fields` option that represents 3111 Unit's [header processing behavior] 3112 (https://unit.nginx.org/configuration/#settings)." 3113 3114 tags: 3115 - settings 3116 - config 3117 3118 responses: 3119 "200": 3120 description: "OK; the `discard_unsafe_fields` option exists in 3121 the configuration." 3122 3123 content: 3124 application/json: 3125 schema: 3126 type: boolean 3127 3128 examples: 3129 DiscardUnsafeFields: 3130 value: true 3131 3132 "404": 3133 $ref: "#/components/responses/responseNotFound" 3134 3135 put: 3136 operationId: updateSettingsDiscardUnsafeFields 3137 summary: "Create or overwrite the discard_unsafe_fields option" 3138 description: "Creates or overwrites the `discard_unsafe_fields` option 3139 in the configuration." 3140 3141 tags: 3142 - settings 3143 - config 3144 3145 requestBody: 3146 required: true 3147 content: 3148 application/json: 3149 schema: 3150 type: boolean 3151 3152 examples: 3153 DiscardUnsafeFields: 3154 value: true 3155 3156 responses: 3157 "200": 3158 $ref: "#/components/responses/responseOkUpdated" 3159 3160 "400": 3161 $ref: "#/components/responses/responseBadRequest" 3162 3163 "404": 3164 $ref: "#/components/responses/responseNotFound" 3165 3166 "500": 3167 $ref: "#/components/responses/responseInternalError" 3168 3169 delete: 3170 operationId: deleteSettingsDiscardUnsafeFields 3171 summary: "Delete the discard_unsafe_fields option" 3172 description: "Deletes the `discard_unsafe_fields` option from 3173 the configuration." 3174 3175 tags: 3176 - settings 3177 - config 3178 3179 responses: 3180 "200": 3181 $ref: "#/components/responses/responseOkDeleted" 3182 3183 "404": 3184 $ref: "#/components/responses/responseNotFound" 3185 3186 /config/settings/http/header_read_timeout: 3187 summary: "Endpoint for the `header_read_timeout` option in `http`" 3188 get: 3189 operationId: getSettingsHttpHeaderReadTimeout 3190 summary: "Retrieve the header_read_timeout option from http settings" 3191 description: "Retrieves the `header_read_timeout` option that represents 3192 Unit's [request headers read timeout] 3193 (https://unit.nginx.org/configuration/#settings)." 3194 3195 tags: 3196 - settings 3197 - config 3198 3199 responses: 3200 "200": 3201 description: "OK; the `header_read_timeout` option exists in 3202 the configuration." 3203 3204 content: 3205 application/json: 3206 schema: 3207 type: integer 3208 3209 examples: 3210 HeaderReadTimeout: 3211 value: 30 3212 3213 "404": 3214 $ref: "#/components/responses/responseNotFound" 3215 3216 put: 3217 operationId: updateSettingsHttpHeaderReadTimeout 3218 summary: "Create or overwrite the header_read_timeout option" 3219 description: "Creates or overwrites the `header_read_timeout` option 3220 in the configuration." 3221 3222 tags: 3223 - settings 3224 - config 3225 3226 requestBody: 3227 required: true 3228 content: 3229 application/json: 3230 schema: 3231 type: integer 3232 3233 examples: 3234 HeaderReadTimeout: 3235 value: 30 3236 3237 responses: 3238 "200": 3239 $ref: "#/components/responses/responseOkUpdated" 3240 3241 "400": 3242 $ref: "#/components/responses/responseBadRequest" 3243 3244 "404": 3245 $ref: "#/components/responses/responseNotFound" 3246 3247 "500": 3248 $ref: "#/components/responses/responseInternalError" 3249 3250 delete: 3251 operationId: deleteSettingsHttpHeaderReadTimeout 3252 summary: "Delete the header_read_timeout option" 3253 description: "Deletes the `header_read_timeout` option from 3254 the configuration." 3255 3256 tags: 3257 - settings 3258 - config 3259 3260 responses: 3261 "200": 3262 $ref: "#/components/responses/responseOkDeleted" 3263 3264 "404": 3265 $ref: "#/components/responses/responseNotFound" 3266 3267 /config/settings/http/idle_timeout: 3268 summary: "Endpoint for the `idle_timeout` option in `http`" 3269 get: 3270 operationId: getSettingsHttpIdleTimeout 3271 summary: "Retrieve the idle_timeout option from http settings" 3272 description: "Retrieves the `idle_timeout` option that represents 3273 Unit's [keep-alive idling timeout] 3274 (https://unit.nginx.org/configuration/#settings)." 3275 3276 tags: 3277 - settings 3278 - config 3279 3280 responses: 3281 "200": 3282 description: "OK; the `idle_timeout` option exists in 3283 the configuration." 3284 3285 content: 3286 application/json: 3287 schema: 3288 type: integer 3289 3290 examples: 3291 IdleTimeout: 3292 value: 180 3293 3294 "404": 3295 $ref: "#/components/responses/responseNotFound" 3296 3297 put: 3298 operationId: updateSettingsHttpIdleTimeout 3299 summary: "Create or overwrite the idle_timeout option" 3300 description: "Creates or overwrites the `idle_timeout` option in 3301 the configuration." 3302 3303 tags: 3304 - settings 3305 - config 3306 3307 requestBody: 3308 required: true 3309 content: 3310 application/json: 3311 schema: 3312 type: integer 3313 3314 examples: 3315 IdleTimeout: 3316 value: 180 3317 3318 responses: 3319 "200": 3320 $ref: "#/components/responses/responseOkUpdated" 3321 3322 "400": 3323 $ref: "#/components/responses/responseBadRequest" 3324 3325 "404": 3326 $ref: "#/components/responses/responseNotFound" 3327 3328 "500": 3329 $ref: "#/components/responses/responseInternalError" 3330 3331 delete: 3332 operationId: deleteSettingsHttpIdleTimeout 3333 summary: "Delete the idle_timeout option" 3334 description: "Deletes the `idle_timeout` option from the configuration." 3335 tags: 3336 - settings 3337 - config 3338 3339 responses: 3340 "200": 3341 $ref: "#/components/responses/responseOkDeleted" 3342 3343 "404": 3344 $ref: "#/components/responses/responseNotFound" 3345 3346 /config/settings/http/log_route: 3347 summary: "Endpoint for the `log_route` option in `http`" 3348 get: 3349 operationId: getSettingsLogRoute 3350 summary: "Retrieve the log_route option from http settings" 3351 description: "Retrieves the `log_route` option that controls 3352 Unit's [router logging] 3353 (https://unit.nginx.org/troubleshooting/#router-log)." 3354 3355 tags: 3356 - settings 3357 - config 3358 3359 responses: 3360 "200": 3361 description: "OK; the `log_route` option exists in 3362 the configuration." 3363 3364 content: 3365 application/json: 3366 schema: 3367 type: boolean 3368 3369 examples: 3370 LogRoute: 3371 value: true 3372 3373 "404": 3374 $ref: "#/components/responses/responseNotFound" 3375 3376 put: 3377 operationId: updateSettingsLogRoute 3378 summary: "Create or overwrite the log_route option" 3379 description: "Creates or overwrites the `log_route` option 3380 in the configuration." 3381 3382 tags: 3383 - settings 3384 - config 3385 3386 requestBody: 3387 required: true 3388 content: 3389 application/json: 3390 schema: 3391 type: boolean 3392 3393 examples: 3394 LogRoute: 3395 value: true 3396 3397 responses: 3398 "200": 3399 $ref: "#/components/responses/responseOkUpdated" 3400 3401 "400": 3402 $ref: "#/components/responses/responseBadRequest" 3403 3404 "404": 3405 $ref: "#/components/responses/responseNotFound" 3406 3407 "500": 3408 $ref: "#/components/responses/responseInternalError" 3409 3410 delete: 3411 operationId: deleteSettingsLogRoute 3412 summary: "Delete the log_route option" 3413 description: "Deletes the `log_route` option from 3414 the configuration." 3415 3416 tags: 3417 - settings 3418 - config 3419 3420 responses: 3421 "200": 3422 $ref: "#/components/responses/responseOkDeleted" 3423 3424 "404": 3425 $ref: "#/components/responses/responseNotFound" 3426 3427 /config/settings/http/max_body_size: 3428 summary: "Endpoint for the `max_body_size` option in `http`" 3429 get: 3430 operationId: getSettingsHttpMaxBodySize 3431 summary: "Retrieve the max_body_size option from http settings" 3432 description: "Retrieves the `max_body_size` option that represents 3433 Unit's [request body size limit] 3434 (https://unit.nginx.org/configuration/#settings)." 3435 3436 tags: 3437 - settings 3438 - config 3439 3440 responses: 3441 "200": 3442 description: "OK; the `max_body_size` option exists in 3443 the configuration." 3444 3445 content: 3446 application/json: 3447 schema: 3448 type: integer 3449 3450 examples: 3451 MaxBodySize: 3452 value: 8388608 3453 3454 "404": 3455 $ref: "#/components/responses/responseNotFound" 3456 3457 put: 3458 operationId: updateSettingsHttpMaxBodySize 3459 summary: "Create or overwrite the max_body_size option" 3460 description: "Creates or overwrites the `max_body_size` option in 3461 the configuration." 3462 3463 tags: 3464 - settings 3465 - config 3466 3467 requestBody: 3468 required: true 3469 content: 3470 application/json: 3471 schema: 3472 type: integer 3473 3474 examples: 3475 MaxBodySize: 3476 value: 8388608 3477 3478 responses: 3479 "200": 3480 $ref: "#/components/responses/responseOkUpdated" 3481 3482 "400": 3483 $ref: "#/components/responses/responseBadRequest" 3484 3485 "404": 3486 $ref: "#/components/responses/responseNotFound" 3487 3488 "500": 3489 $ref: "#/components/responses/responseInternalError" 3490 3491 delete: 3492 operationId: deleteSettingsHttpMaxBodySize 3493 summary: "Delete the max_body_size option" 3494 description: "Deletes the `max_body_size` option from the configuration." 3495 tags: 3496 - settings 3497 - config 3498 3499 responses: 3500 "200": 3501 $ref: "#/components/responses/responseOkDeleted" 3502 3503 "404": 3504 $ref: "#/components/responses/responseNotFound" 3505 3506 /config/settings/http/send_timeout: 3507 summary: "Endpoint for the `send_timeout` option in `http`" 3508 get: 3509 operationId: getSettingsHttpSendTimeout 3510 summary: "Retrieve the send_timeout option from http settings" 3511 description: "Retrieves the `send_timeout` option that represents 3512 Unit's [response send timeout] 3513 (https://unit.nginx.org/configuration/#settings)." 3514 3515 tags: 3516 - settings 3517 - config 3518 3519 responses: 3520 "200": 3521 description: "OK; the `send_timeout` option exists in 3522 the configuration." 3523 3524 content: 3525 application/json: 3526 schema: 3527 type: integer 3528 3529 examples: 3530 SendTimeout: 3531 value: 30 3532 3533 "404": 3534 $ref: "#/components/responses/responseNotFound" 3535 3536 put: 3537 operationId: updateSettingsHttpSendTimeout 3538 summary: "Create or overwrite the send_timeout option" 3539 description: "Creates or overwrites the `send_timeout` option in 3540 the configuration." 3541 3542 tags: 3543 - settings 3544 - config 3545 3546 requestBody: 3547 required: true 3548 content: 3549 application/json: 3550 schema: 3551 type: integer 3552 3553 examples: 3554 SendTimeout: 3555 value: 30 3556 3557 responses: 3558 "200": 3559 $ref: "#/components/responses/responseOkUpdated" 3560 3561 "400": 3562 $ref: "#/components/responses/responseBadRequest" 3563 3564 "404": 3565 $ref: "#/components/responses/responseNotFound" 3566 3567 "500": 3568 $ref: "#/components/responses/responseInternalError" 3569 3570 delete: 3571 operationId: deleteSettingsHttpSendTimeout 3572 summary: "Delete the send_timeout option" 3573 description: "Deletes the `send_timeout` option from the configuration." 3574 tags: 3575 - settings 3576 - config 3577 3578 responses: 3579 "200": 3580 $ref: "#/components/responses/responseOkDeleted" 3581 3582 "404": 3583 $ref: "#/components/responses/responseNotFound" 3584 3585 /config/settings/http/server_version: 3586 summary: "Endpoint for the `server_version` option in `http`" 3587 get: 3588 operationId: getSettingsServerVersion 3589 summary: "Retrieve the server_version option from http settings" 3590 description: "Retrieves the `server_version` option that controls 3591 Unit's [Server header field versioning] 3592 (https://unit.nginx.org/configuration/#settings)." 3593 3594 tags: 3595 - settings 3596 - config 3597 3598 responses: 3599 "200": 3600 description: "OK; the `server_version` option exists in 3601 the configuration." 3602 3603 content: 3604 application/json: 3605 schema: 3606 type: boolean 3607 3608 examples: 3609 ServerVersion: 3610 value: true 3611 3612 "404": 3613 $ref: "#/components/responses/responseNotFound" 3614 3615 put: 3616 operationId: updateSettingsServerVersion 3617 summary: "Create or overwrite the server_version option" 3618 description: "Creates or overwrites the `server_version` option 3619 in the configuration." 3620 3621 tags: 3622 - settings 3623 - config 3624 3625 requestBody: 3626 required: true 3627 content: 3628 application/json: 3629 schema: 3630 type: boolean 3631 3632 examples: 3633 ServerVersion: 3634 value: true 3635 3636 responses: 3637 "200": 3638 $ref: "#/components/responses/responseOkUpdated" 3639 3640 "400": 3641 $ref: "#/components/responses/responseBadRequest" 3642 3643 "404": 3644 $ref: "#/components/responses/responseNotFound" 3645 3646 "500": 3647 $ref: "#/components/responses/responseInternalError" 3648 3649 delete: 3650 operationId: deleteSettingsServerVersion 3651 summary: "Delete the server_version option" 3652 description: "Deletes the `server_version` option from 3653 the configuration." 3654 3655 tags: 3656 - settings 3657 - config 3658 3659 responses: 3660 "200": 3661 $ref: "#/components/responses/responseOkDeleted" 3662 3663 "404": 3664 $ref: "#/components/responses/responseNotFound" 3665 3666 /config/settings/http/static: 3667 summary: "Endpoint for the `static` object in `http`" 3668 get: 3669 operationId: getSettingsHttpStatic 3670 summary: "Retrieve the static object from http settings" 3671 description: "Retrieves the `static` object that represents 3672 Unit's [static content settings] 3673 (https://unit.nginx.org/configuration/#settings)." 3674 3675 tags: 3676 - settings 3677 - config 3678 3679 responses: 3680 "200": 3681 description: "OK; the `static` object exists in the configuration." 3682 3683 content: 3684 application/json: 3685 schema: 3686 $ref: "#/components/schemas/configSettingsHttpStatic" 3687 3688 examples: 3689 example1: 3690 $ref: "#/components/examples/configSettingsHttpStatic" 3691 3692 "404": 3693 $ref: "#/components/responses/responseNotFound" 3694 3695 put: 3696 operationId: updateSettingsHttpStatic 3697 summary: "Create or overwrite the static object" 3698 description: "Creates or overwrites the `static` object in 3699 the configuration." 3700 3701 tags: 3702 - settings 3703 - config 3704 3705 requestBody: 3706 required: true 3707 content: 3708 application/json: 3709 schema: 3710 $ref: "#/components/schemas/configSettingsHttpStatic" 3711 3712 examples: 3713 example1: 3714 $ref: "#/components/examples/configSettingsHttpStatic" 3715 3716 responses: 3717 "200": 3718 $ref: "#/components/responses/responseOkUpdated" 3719 3720 "400": 3721 $ref: "#/components/responses/responseBadRequest" 3722 3723 "404": 3724 $ref: "#/components/responses/responseNotFound" 3725 3726 "500": 3727 $ref: "#/components/responses/responseInternalError" 3728 3729 delete: 3730 operationId: deleteSettingsHttpStatic 3731 summary: "Delete the static object" 3732 description: "Deletes the `static` object from the configuration." 3733 tags: 3734 - settings 3735 - config 3736 3737 responses: 3738 "200": 3739 $ref: "#/components/responses/responseOkDeleted" 3740 3741 "404": 3742 $ref: "#/components/responses/responseNotFound" 3743 3744 /config/settings/http/static/mime_types: 3745 summary: "Endpoint for the `mime_types` object in `static`" 3746 get: 3747 operationId: getSettingsHttpStaticMimeTypes 3748 summary: "Retrieve the mime_types object from static settings" 3749 description: "Retrieves the `mime_types` object that represents Unit's 3750 [MIME type settings](https://unit.nginx.org/configuration/#settings)." 3751 3752 tags: 3753 - settings 3754 - config 3755 3756 responses: 3757 "200": 3758 description: "OK; the `mime_types` object exists in 3759 the configuration." 3760 3761 content: 3762 application/json: 3763 schema: 3764 $ref: "#/components/schemas/configSettingsHttpStaticMimeTypes" 3765 3766 examples: 3767 example1: 3768 $ref: "#/components/examples/configSettingsHttpStaticMimeTypes" 3769 3770 "404": 3771 $ref: "#/components/responses/responseNotFound" 3772 3773 put: 3774 operationId: updateSettingsHttpStaticMimeTypes 3775 summary: "Create or overwrite the mime_types object" 3776 description: "Creates or overwrites the `mime_types` object in 3777 the configuration." 3778 3779 tags: 3780 - settings 3781 - config 3782 3783 requestBody: 3784 required: true 3785 content: 3786 application/json: 3787 schema: 3788 $ref: "#/components/schemas/configSettingsHttpStaticMimeTypes" 3789 3790 examples: 3791 example1: 3792 $ref: "#/components/examples/configSettingsHttpStaticMimeTypes" 3793 3794 responses: 3795 "200": 3796 $ref: "#/components/responses/responseOkUpdated" 3797 3798 "400": 3799 $ref: "#/components/responses/responseBadRequest" 3800 3801 "404": 3802 $ref: "#/components/responses/responseNotFound" 3803 3804 "500": 3805 $ref: "#/components/responses/responseInternalError" 3806 3807 delete: 3808 operationId: deleteSettingsHttpStaticMimeTypes 3809 summary: "Delete the mime_types object" 3810 description: "Deletes the `mime_types` object from the configuration." 3811 tags: 3812 - settings 3813 - config 3814 3815 responses: 3816 "200": 3817 $ref: "#/components/responses/responseOkDeleted" 3818 3819 "404": 3820 $ref: "#/components/responses/responseNotFound" 3821 3822 /config/settings/http/static/mime_types/{mimeType}: 3823 summary: "Endpoint for a MIME type option in `mime_types`" 3824 parameters: 3825 - $ref: "#/components/parameters/mimeType" 3826 3827 get: 3828 operationId: getSettingsHttpStaticMimeType 3829 summary: "Retrieve the MIME type option from MIME type settings" 3830 description: "Retrieves the MIME type option that represents a 3831 [MIME type](https://unit.nginx.org/configuration/#settings) 3832 supported by Unit." 3833 3834 tags: 3835 - settings 3836 - config 3837 3838 responses: 3839 "200": 3840 description: "OK; the MIME type option exists in the configuration." 3841 3842 content: 3843 application/json: 3844 schema: 3845 $ref: "#/components/schemas/configSettingsHttpStaticMimeType" 3846 3847 examples: 3848 example1: 3849 $ref: "#/components/examples/configSettingsHttpStaticMimeType" 3850 3851 "404": 3852 $ref: "#/components/responses/responseNotFound" 3853 3854 put: 3855 operationId: updateSettingsHttpStaticMimeType 3856 summary: "Create or overwrite the MIME type option" 3857 description: "Creates or overwrites the MIME type option in 3858 the configuration." 3859 3860 tags: 3861 - settings 3862 - config 3863 3864 requestBody: 3865 required: true 3866 content: 3867 application/json: 3868 schema: 3869 $ref: "#/components/schemas/configSettingsHttpStaticMimeType" 3870 3871 examples: 3872 example1: 3873 $ref: "#/components/examples/configSettingsHttpStaticMimeType" 3874 3875 responses: 3876 "200": 3877 $ref: "#/components/responses/responseOkUpdated" 3878 3879 "400": 3880 $ref: "#/components/responses/responseBadRequest" 3881 3882 "404": 3883 $ref: "#/components/responses/responseNotFound" 3884 3885 "500": 3886 $ref: "#/components/responses/responseInternalError" 3887 3888 delete: 3889 operationId: deleteSettingsHttpStaticMimeType 3890 summary: "Delete the MIME type option" 3891 description: "Deletes the MIME type option from the configuration." 3892 tags: 3893 - settings 3894 - config 3895 3896 responses: 3897 "200": 3898 $ref: "#/components/responses/responseOkDeleted" 3899 3900 "404": 3901 $ref: "#/components/responses/responseNotFound" 3902 3903 /status: 3904 summary: "Endpoint for the `status` object" 3905 get: 3906 operationId: getStatus 3907 summary: "Retrieve the status object" 3908 description: "Retrieves the entire `/status` section that represents 3909 Unit's [usage statistics](https://unit.nginx.org/usagestats/)." 3910 3911 tags: 3912 - status 3913 3914 responses: 3915 "200": 3916 description: "OK; the `status` object exists in the configuration." 3917 3918 content: 3919 application/json: 3920 schema: 3921 $ref: "#/components/schemas/status" 3922 3923 examples: 3924 example1: 3925 $ref: "#/components/examples/status" 3926 3927 /status/connections: 3928 summary: "Endpoint for the `connections` status object" 3929 get: 3930 operationId: getStatusConnections 3931 summary: "Retrieve the connections status object" 3932 description: "Retrieves the `connections` status object that represents 3933 Unit's [connection statistics](https://unit.nginx.org/usagestats/)." 3934 3935 tags: 3936 - status 3937 3938 responses: 3939 "200": 3940 description: "OK; the `connections` object exists in 3941 the configuration." 3942 3943 content: 3944 application/json: 3945 schema: 3946 $ref: "#/components/schemas/statusConnections" 3947 3948 examples: 3949 example1: 3950 $ref: "#/components/examples/statusConnections" 3951 3952 /status/connections/accepted: 3953 summary: "Endpoint for the `accepted` connections number" 3954 get: 3955 operationId: getStatusConnectionsAccepted 3956 summary: "Retrieve the accepted connections number" 3957 description: "Retrieves the `accepted` connections number that represents 3958 Unit's [connection statistics](https://unit.nginx.org/usagestats/)." 3959 3960 tags: 3961 - status 3962 3963 responses: 3964 "200": 3965 description: "OK; the `active` number exists in the configuration." 3966 3967 content: 3968 application/json: 3969 schema: 3970 type: integer 3971 3972 examples: 3973 Accepted: 3974 value: 1067 3975 3976 /status/connections/active: 3977 summary: "Endpoint for the `active` connections number" 3978 get: 3979 operationId: getStatusConnectionsActive 3980 summary: "Retrieve the active connections number" 3981 description: "Retrieves the `active` connections number that represents 3982 Unit's [connection statistics](https://unit.nginx.org/usagestats/)." 3983 3984 tags: 3985 - status 3986 3987 responses: 3988 "200": 3989 description: "OK; the `active` number exists in the configuration." 3990 3991 content: 3992 application/json: 3993 schema: 3994 type: integer 3995 3996 examples: 3997 Active: 3998 value: 13 3999 4000 /status/connections/idle: 4001 summary: "Endpoint for the `idle` connections number" 4002 get: 4003 operationId: getStatusConnectionsIdle 4004 summary: "Retrieve the idle connections number" 4005 description: "Retrieves the `idle` connections number that represents 4006 Unit's [connection statistics](https://unit.nginx.org/usagestats/)." 4007 tags: 4008 - status 4009 4010 responses: 4011 "200": 4012 description: "OK; the `idle` number exists in the configuration." 4013 4014 content: 4015 application/json: 4016 schema: 4017 type: integer 4018 4019 examples: 4020 Idle: 4021 value: 4 4022 4023 /status/connections/closed: 4024 summary: "Endpoint for the `closed` connections number" 4025 get: 4026 operationId: getStatusConnectionsClosed 4027 summary: "Retrieve the closed connections number" 4028 description: "Retrieves the `closed` connections number that represents 4029 Unit's [connection statistics](https://unit.nginx.org/usagestats/)." 4030 4031 tags: 4032 - status 4033 4034 responses: 4035 "200": 4036 description: "OK; the `closed` number exists in the configuration." 4037 4038 content: 4039 application/json: 4040 schema: 4041 type: integer 4042 4043 examples: 4044 Closed: 4045 value: 4 4046 4047 /status/requests: 4048 summary: "Endpoint for the `requests` status object" 4049 get: 4050 operationId: getStatusRequests 4051 summary: "Retrieve the requests status object" 4052 description: "Retrieves the `requests` status object that represents 4053 Unit's instance [request statistics] 4054 (https://unit.nginx.org/usagestats/)." 4055 4056 tags: 4057 - status 4058 4059 responses: 4060 "200": 4061 description: "OK; the `requests` object exists in the configuration." 4062 4063 content: 4064 application/json: 4065 schema: 4066 $ref: "#/components/schemas/statusRequests" 4067 4068 examples: 4069 example1: 4070 $ref: "#/components/examples/statusRequests" 4071 4072 /status/requests/total: 4073 summary: "Endpoint for the `total` requests number" 4074 get: 4075 operationId: getStatusRequestsTotal 4076 summary: "Retrieve the total requests number" 4077 description: "Retrieves the `total` requests number that represents Unit's 4078 instance [request statistics](https://unit.nginx.org/usagestats/)." 4079 4080 tags: 4081 - status 4082 4083 responses: 4084 "200": 4085 description: "OK; the `total` number exists in the configuration." 4086 4087 content: 4088 application/json: 4089 schema: 4090 type: integer 4091 4092 examples: 4093 Closed: 4094 value: 1307 4095 4096 /status/applications: 4097 summary: "Endpoint for the `applications` status object" 4098 get: 4099 operationId: getStatusApplications 4100 summary: "Retrieve the applications status object" 4101 description: "Retrieves the `applications` status object that represents 4102 Unit's per-app 4103 [process and request statistics](https://unit.nginx.org/usagestats/)." 4104 tags: 4105 - status 4106 4107 responses: 4108 "200": 4109 description: "OK; the `applications` object exists in 4110 the configuration." 4111 4112 content: 4113 application/json: 4114 schema: 4115 $ref: "#/components/schemas/statusApplications" 4116 4117 examples: 4118 example1: 4119 $ref: "#/components/examples/statusApplications" 4120 4121 /status/applications/{appName}: 4122 summary: "Endpoint for the app status object" 4123 get: 4124 operationId: getStatusApplicationsApp 4125 summary: "Retrieve the app status object" 4126 description: "Retrieves the app status object that represents 4127 Unit's per-app 4128 [process and request statistics](https://unit.nginx.org/usagestats/)." 4129 4130 tags: 4131 - status 4132 4133 parameters: 4134 - $ref: "#/components/parameters/appName" 4135 4136 responses: 4137 "200": 4138 description: "OK; the app object exists in the configuration." 4139 4140 content: 4141 application/json: 4142 schema: 4143 $ref: "#/components/schemas/statusApplicationsApp" 4144 4145 examples: 4146 example1: 4147 $ref: "#/components/examples/statusApplicationsApp" 4148 4149 "404": 4150 $ref: "#/components/responses/responseNotFound" 4151 4152 /status/applications/{appName}/processes: 4153 summary: "Endpoint for the `processes` app status object" 4154 get: 4155 operationId: getStatusApplicationsAppProcesses 4156 summary: "Retrieve the processes app status object" 4157 description: "Retrieves the `processes` app status object that represents 4158 Unit's per-app 4159 [process statistics](https://unit.nginx.org/usagestats/)." 4160 tags: 4161 - status 4162 4163 parameters: 4164 - $ref: "#/components/parameters/appName" 4165 4166 responses: 4167 "200": 4168 description: "OK; the `processes` object exists in the configuration." 4169 4170 content: 4171 application/json: 4172 schema: 4173 $ref: "#/components/schemas/statusApplicationsAppProcesses" 4174 4175 examples: 4176 example1: 4177 $ref: "#/components/examples/statusApplicationsAppProcesses" 4178 4179 "404": 4180 $ref: "#/components/responses/responseNotFound" 4181 4182 /status/applications/{appName}/processes/running: 4183 summary: "Endpoint for the `running` processes number" 4184 get: 4185 operationId: getStatusApplicationsAppProcessesRunning 4186 summary: "Retrieve the running processes app status number" 4187 description: "Retrieves the `running` processes number that represents 4188 Unit's per-app 4189 [process statistics](https://unit.nginx.org/usagestats/)." 4190 4191 tags: 4192 - status 4193 4194 parameters: 4195 - $ref: "#/components/parameters/appName" 4196 4197 responses: 4198 "200": 4199 description: "OK; the `running` number exists in the configuration." 4200 4201 content: 4202 application/json: 4203 schema: 4204 type: integer 4205 4206 examples: 4207 Running: 4208 value: 9 4209 4210 "404": 4211 $ref: "#/components/responses/responseNotFound" 4212 4213 /status/applications/{appName}/processes/starting: 4214 summary: "Endpoint for the `starting` processes number" 4215 get: 4216 operationId: getStatusApplicationsAppProcessesStarting 4217 summary: "Retrieve the starting processes app status number" 4218 description: "Retrieves the `starting` processes number that represents 4219 Unit's per-app 4220 [process statistics](https://unit.nginx.org/usagestats/)." 4221 4222 tags: 4223 - status 4224 4225 parameters: 4226 - $ref: "#/components/parameters/appName" 4227 4228 responses: 4229 "200": 4230 description: "OK; the `starting` number exists in the configuration." 4231 4232 content: 4233 application/json: 4234 schema: 4235 type: integer 4236 4237 examples: 4238 Starting: 4239 value: 1 4240 4241 "404": 4242 $ref: "#/components/responses/responseNotFound" 4243 4244 /status/applications/{appName}/processes/idle: 4245 summary: "Endpoint for the `idle` processes number" 4246 get: 4247 operationId: getStatusApplicationsAppProcessesIdle 4248 summary: "Retrieve the idle processes app status number" 4249 description: "Retrieves the `idle` processes number that represents 4250 Unit's per-app 4251 [process statistics](https://unit.nginx.org/usagestats/)." 4252 4253 tags: 4254 - status 4255 4256 parameters: 4257 - $ref: "#/components/parameters/appName" 4258 4259 responses: 4260 "200": 4261 description: "OK; the `idle` number exists in the configuration." 4262 content: 4263 application/json: 4264 schema: 4265 type: integer 4266 4267 examples: 4268 Idle: 4269 value: 0 4270 4271 "404": 4272 $ref: "#/components/responses/responseNotFound" 4273 4274 /status/applications/{appName}/requests: 4275 summary: "Endpoint for the `requests` app status object" 4276 get: 4277 operationId: getStatusApplicationsAppRequests 4278 summary: "Retrieve the requests app status object" 4279 description: "Retrieves the `requests` app status object that represents 4280 Unit's per-app 4281 [request statistics](https://unit.nginx.org/usagestats/)." 4282 4283 tags: 4284 - status 4285 4286 parameters: 4287 - $ref: "#/components/parameters/appName" 4288 4289 responses: 4290 "200": 4291 description: "OK; the `requests` object exists in the configuration." 4292 4293 content: 4294 application/json: 4295 schema: 4296 $ref: "#/components/schemas/statusApplicationsAppRequests" 4297 4298 examples: 4299 example1: 4300 $ref: "#/components/examples/statusApplicationsAppRequests" 4301 4302 /status/applications/{appName}/requests/active: 4303 summary: "Endpoint for the `active` requests number" 4304 get: 4305 operationId: getStatusApplicationsAppRequestsActive 4306 summary: "Retrieve the active requests app status number" 4307 description: "Retrieves the `active` requests number that represents 4308 Unit's per-app 4309 [request statistics](https://unit.nginx.org/usagestats/)." 4310 4311 tags: 4312 - status 4313 4314 parameters: 4315 - $ref: "#/components/parameters/appName" 4316 4317 responses: 4318 "200": 4319 description: "OK; the `active` number exists in the configuration." 4320 4321 content: 4322 application/json: 4323 schema: 4324 type: integer 4325 4326 examples: 4327 Idle: 4328 value: 15 4329 4330 "404": 4331 $ref: "#/components/responses/responseNotFound" 4332 4333components: 4334 # -- PARAMETERS -- 4335 4336 parameters: 4337 appName: 4338 in: path 4339 description: "An application's name in the configuration." 4340 name: appName 4341 required: true 4342 schema: 4343 type: string 4344 4345 arrayIndex: 4346 in: path 4347 description: "A zero-based index in a configuration array." 4348 name: arrayIndex 4349 required: true 4350 schema: 4351 type: integer 4352 4353 arrayIndex2: 4354 in: path 4355 description: "A zero-based index in a configuration array." 4356 name: arrayIndex2 4357 required: true 4358 schema: 4359 type: integer 4360 4361 bundleName: 4362 in: path 4363 description: "A certificate bundle's name" 4364 name: bundleName 4365 required: true 4366 schema: 4367 type: string 4368 4369 listenerName: 4370 in: path 4371 description: "Listener name; a unique combination of a host IP address 4372 (or a `*` wildcard to match any host IP addresses), followed by a colon 4373 and a port number, such as `127.0.0.1:80` or `*:443`." 4374 4375 name: listenerName 4376 required: true 4377 schema: 4378 type: string 4379 4380 mimeType: 4381 in: path 4382 description: "A MIME type name, such as `text/x-code` or 4383 `application/json`." 4384 name: mimeType 4385 required: true 4386 schema: 4387 type: string 4388 4389 # -- EXAMPLES -- 4390 4391 examples: 4392 # -- RESPONSE EXAMPLES -- 4393 4394 errorInvalidJson: 4395 summary: "400 error response" 4396 value: 4397 error: "Invalid JSON." 4398 detail: 'A valid JSON value is expected here. It must be either a 4399 literal (null, true, or false), a number, a string (in double quotes 4400 ""), an array (with brackets []), or an object (with braces {}).' 4401 4402 location: 4403 offset: 0 4404 line: 1 4405 column: 0 4406 4407 errorValueDoesntExist: 4408 summary: "404 error response" 4409 value: 4410 error: "Value doesn't exist." 4411 4412 errorInternalError: 4413 summary: "500 error response" 4414 value: 4415 error: "Failed to apply new configuration." 4416 4417 successReconfigurationDone: 4418 summary: "Success response" 4419 value: 4420 success: "Reconfiguration done." 4421 4422 # -- CONFIGURATION EXAMPLES -- 4423 4424 # /certificates 4425 cert: 4426 summary: "Certificate bundle or bundles" 4427 value: 4428 bundle: 4429 key: "RSA (4096 bits)" 4430 chain: 4431 - subject: 4432 common_name: "example.com" 4433 country: "US" 4434 state_or_province: "CA" 4435 organization: "Acme, Inc." 4436 alt_names: 4437 - "example.com" 4438 - "www.example.com" 4439 4440 issuer: 4441 common_name: "intermediate.ca.example.com" 4442 country: "US" 4443 state_or_province: "CA" 4444 organization: "Acme, Inc." 4445 4446 validity: 4447 since: "Feb 22 22:45:55 2023 GMT" 4448 until: "Feb 21 22:45:55 2016 GMT" 4449 4450 - subject: 4451 common_name: "intermediate.ca.example.com" 4452 country: "US" 4453 state_or_province: "CA" 4454 organization: "Acme Certification Authority" 4455 4456 issuer: 4457 common_name: "root.ca.example.com" 4458 country: "US" 4459 state_or_province: "CA" 4460 organization: "Acme Certification Authority" 4461 4462 validity: 4463 since: "Sep 18 19:46:19 2022 GMT" 4464 until: "Jun 15 19:46:19 2025 GMT" 4465 4466 # /certificates/{bundleName} 4467 certBundle: 4468 summary: "Single certificate bundle" 4469 value: 4470 key: "RSA (4096 bits)" 4471 chain: 4472 - subject: 4473 common_name: "example.com" 4474 country: "US" 4475 state_or_province: "CA" 4476 organization: "Acme, Inc." 4477 alt_names: 4478 - "example.com" 4479 - "www.example.com" 4480 4481 issuer: 4482 common_name: "intermediate.ca.example.com" 4483 country: "US" 4484 state_or_province: "CA" 4485 organization: "Acme, Inc." 4486 4487 validity: 4488 since: "Feb 22 22:45:55 2023 GMT" 4489 until: "Feb 21 22:45:55 2016 GMT" 4490 4491 - subject: 4492 common_name: "intermediate.ca.example.com" 4493 country: "US" 4494 state_or_province: "CA" 4495 organization: "Acme Certification Authority" 4496 4497 issuer: 4498 common_name: "root.ca.example.com" 4499 country: "US" 4500 state_or_province: "CA" 4501 organization: "Acme Certification Authority" 4502 4503 validity: 4504 since: "Sep 18 19:46:19 2022 GMT" 4505 until: "Jun 15 19:46:19 2025 GMT" 4506 4507 # /certificates/{bundleName}/chain 4508 certBundleChain: 4509 summary: "Certificate chain" 4510 value: 4511 - subject: 4512 common_name: "example.com" 4513 country: "US" 4514 state_or_province: "CA" 4515 organization: "Acme, Inc." 4516 alt_names: 4517 - "example.com" 4518 - "www.example.com" 4519 4520 issuer: 4521 common_name: "intermediate.ca.example.com" 4522 country: "US" 4523 state_or_province: "CA" 4524 organization: "Acme, Inc." 4525 4526 validity: 4527 since: "Feb 22 22:45:55 2023 GMT" 4528 until: "Feb 21 22:45:55 2016 GMT" 4529 4530 - subject: 4531 common_name: "intermediate.ca.example.com" 4532 country: "US" 4533 state_or_province: "CA" 4534 organization: "Acme Certification Authority" 4535 4536 issuer: 4537 common_name: "root.ca.example.com" 4538 country: "US" 4539 state_or_province: "CA" 4540 organization: "Acme Certification Authority" 4541 4542 validity: 4543 since: "Sep 18 19:46:19 2022 GMT" 4544 until: "Jun 15 19:46:19 2025 GMT" 4545 4546 # /certificates/{bundleName}/chain/{arrayIndex} 4547 certBundleChainCert: 4548 summary: "Single certificate" 4549 value: 4550 subject: 4551 common_name: "example.com" 4552 country: "US" 4553 state_or_province: "CA" 4554 organization: "Acme, Inc." 4555 alt_names: 4556 - "example.com" 4557 - "www.example.com" 4558 4559 issuer: 4560 common_name: "intermediate.ca.example.com" 4561 country: "US" 4562 state_or_province: "CA" 4563 organization: "Acme, Inc." 4564 4565 validity: 4566 since: "Feb 22 22:45:55 2023 GMT" 4567 until: "Feb 21 22:45:55 2016 GMT" 4568 4569 # /certificates/{bundleName}/chain/{arrayIndex}/issuer 4570 certBundleChainCertIssuer: 4571 summary: "Certificate's issuer" 4572 value: 4573 common_name: "intermediate.ca.example.com" 4574 country: "US" 4575 state_or_province: "CA" 4576 organization: "Acme, Inc." 4577 4578 # /certificates/{bundleName}/chain/{arrayIndex}/subject 4579 certBundleChainCertSubj: 4580 summary: "Certificate's subject" 4581 value: 4582 common_name: "example.com" 4583 country: "US" 4584 state_or_province: "CA" 4585 organization: "Acme, Inc." 4586 alt_names: 4587 - "example.com" 4588 - "www.example.com" 4589 4590 # /certificates/{bundleName}/chain/{arrayIndex}/validity 4591 certBundleChainCertValidity: 4592 summary: "Certificate's validity" 4593 value: 4594 since: "Feb 22 22:45:55 2023 GMT" 4595 until: "Feb 21 22:45:55 2016 GMT" 4596 4597 # /config 4598 config: 4599 summary: "The entire /config section of the API" 4600 value: 4601 access_log: "/var/log/unit/access.log" 4602 4603 applications: 4604 nodejsapp: 4605 type: "external" 4606 working_directory: "/www/app/node-app/" 4607 executable: "app.js" 4608 user: "www" 4609 group: "www" 4610 arguments: 4611 - "--tmp-files" 4612 - "/tmp/node-cache" 4613 4614 pythonapp: 4615 type: "python 3.11" 4616 processes: 16 4617 working_directory: "/www/app/python-app/" 4618 path: "blog" 4619 module: "blog.wsgi" 4620 user: "www" 4621 group: "www" 4622 stderr: "stderr.log" 4623 isolation: 4624 rootfs: "/www/" 4625 4626 routes: 4627 local: 4628 - action: 4629 share: "/www/local/" 4630 4631 global: 4632 - match: 4633 host: "backend.example.com" 4634 4635 action: 4636 pass: "applications/pythonapp" 4637 4638 - action: 4639 pass: "applications/nodejsapp" 4640 4641 listeners: 4642 127.0.0.1:8080: 4643 pass: "routes/local" 4644 4645 "*:443": 4646 pass: "routes/global" 4647 tls: 4648 certificate: "bundle" 4649 conf_commands: 4650 ciphersuites: "TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256" 4651 minprotocol: "TLSv1.3" 4652 4653 session: 4654 cache_size: 10240 4655 timeout: 60 4656 tickets: 4657 - "IAMkP16P8OBuqsijSDGKTpmxrzfFNPP4EdRovXH2mqstXsodPC6MqIce5NlMzHLP" 4658 - "Ax4bv/JvMWoQG+BfH0feeM9Qb32wSaVVKOj1+1hmyU8ORMPHnf3Tio8gLkqm2ifC" 4659 4660 forwarded: 4661 client_ip: "X-Forwarded-For" 4662 recursive: false 4663 source: 4664 - "192.0.2.0/24" 4665 - "198.51.100.0/24" 4666 4667 settings: 4668 http: 4669 body_read_timeout: 30 4670 discard_unsafe_fields: true 4671 header_read_timeout: 30 4672 idle_timeout: 180 4673 log_route: true 4674 max_body_size: 8388608 4675 send_timeout: 30 4676 server_version: false 4677 4678 # /config/access_log 4679 configAccessLogBasic: 4680 summary: "Basic access_log string" 4681 value: "/var/log/unit/access.log" 4682 4683 # /config/access_log 4684 configAccessLogComplex: 4685 summary: "Complex access_log object" 4686 value: 4687 path: "/var/log/unit/access.log" 4688 format: '$remote_addr - - [$time_local] "$request_line" $status 4689 $body_bytes_sent "$header_referer" "$header_user_agent"' 4690 4691 # /config/applications/{appName} 4692 configApplication: 4693 summary: "Individual Unit application" 4694 value: 4695 type: "python 3.11" 4696 processes: 16 4697 working_directory: "/www/app/python-app/" 4698 path: "blog" 4699 module: "blog.wsgi" 4700 user: "www" 4701 group: "www" 4702 stderr: "stderr.log" 4703 stdout: "stdout.log" 4704 isolation: 4705 rootfs: "/www/" 4706 4707 # /config/applications 4708 configApplications: 4709 summary: "Entire Unit applications section" 4710 value: 4711 nodejsapp: 4712 type: "external" 4713 working_directory: "/www/app/node-app/" 4714 executable: "app.js" 4715 user: "www" 4716 group: "www" 4717 arguments: 4718 - "--tmp-files" 4719 - "/tmp/node-cache" 4720 4721 pythonapp: 4722 type: "python 3.11" 4723 processes: 16 4724 working_directory: "/www/app/python-app/" 4725 path: "blog" 4726 module: "blog.wsgi" 4727 user: "www" 4728 group: "www" 4729 stderr: "stderr.log" 4730 isolation: 4731 rootfs: "/www/" 4732 4733 # /config/listeners 4734 configListeners: 4735 summary: "Multiple listeners" 4736 value: 4737 127.0.0.1:8080: 4738 pass: "applications/wp_emea_dev" 4739 "*:443": 4740 pass: "applications/php_app/target" 4741 tls: 4742 certificate: "bundle" 4743 conf_commands: 4744 ciphersuites: "TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256" 4745 minprotocol: "TLSv1.3" 4746 session: 4747 cache_size: 10240 4748 timeout: 60 4749 tickets: 4750 - "IAMkP16P8OBuqsijSDGKTpmxrzfFNPP4EdRovXH2mqstXsodPC6MqIce5NlMzHLP" 4751 - "Ax4bv/JvMWoQG+BfH0feeM9Qb32wSaVVKOj1+1hmyU8ORMPHnf3Tio8gLkqm2ifC" 4752 forwarded: 4753 client_ip: "X-Forwarded-For" 4754 recursive: false 4755 source: 4756 - "192.0.2.0/24" 4757 - "198.51.100.0/24" 4758 4759 # /config/listeners/{listenerName} 4760 configListenerSimple: 4761 summary: "Simple listener object" 4762 value: 4763 pass: "applications/wp_emea_dev" 4764 4765 # /config/listeners/{listenerName} 4766 configListenerComplex: 4767 summary: "Elaborate listener object" 4768 value: 4769 pass: "applications/php_app/target" 4770 tls: 4771 certificate: "bundle" 4772 conf_commands: 4773 ciphersuites: "TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256" 4774 minprotocol: "TLSv1.3" 4775 session: 4776 cache_size: 10240 4777 timeout: 60 4778 tickets: 4779 - "IAMkP16P8OBuqsijSDGKTpmxrzfFNPP4EdRovXH2mqstXsodPC6MqIce5NlMzHLP" 4780 - "Ax4bv/JvMWoQG+BfH0feeM9Qb32wSaVVKOj1+1hmyU8ORMPHnf3Tio8gLkqm2ifC" 4781 forwarded: 4782 client_ip: "X-Forwarded-For" 4783 recursive: false 4784 protocol: "http" 4785 source: 4786 - "192.0.2.0/24" 4787 - "198.51.100.0/24" 4788 4789 # /config/listeners/{listenerName}/forwarded 4790 configListenerForwarded: 4791 summary: "Originating IP identification configuration object" 4792 value: 4793 client_ip: "X-Forwarded-For" 4794 recursive: false 4795 source: 4796 - "192.0.2.0/24" 4797 - "198.51.100.0/24" 4798 4799 # /config/listeners/{listenerName}/forwarded/source 4800 configListenerForwardedSourceArray: 4801 summary: "Array of source address patterns" 4802 value: 4803 - "192.0.2.0/24" 4804 - "198.51.100.0/24" 4805 4806 # /config/listeners/{listenerName}/forwarded/source 4807 configListenerForwardedSourceString: 4808 summary: "Single source address pattern" 4809 value: "192.0.2.0/24" 4810 4811 # /config/listeners/{listenerName}/forwarded/client_ip 4812 configListenerForwardedClientIp: 4813 summary: "Client IP headers expected by a listener" 4814 value: "X-Forwarded-For" 4815 4816 # /config/listeners/{listenerName}/forwarded/protocol 4817 configListenerForwardedProtocol: 4818 summary: "Protocol header expected by a listener" 4819 value: "http" 4820 4821 # /config/listeners/{listenerName}/pass 4822 configListenerPassApp: 4823 summary: "Application destination in a listener" 4824 value: "applications/wp_emea_dev" 4825 4826 # /config/listeners/{listenerName}/pass 4827 configListenerPassRoute: 4828 summary: "Route destination in a listener" 4829 value: "routes/staticsite" 4830 4831 # /config/listeners/{listenerName}/pass 4832 configListenerPassAppTarget: 4833 summary: "App target destination in a listener" 4834 value: "applications/php_app/index_target" 4835 4836 # /config/listeners/{listenerName}/tls 4837 configListenerTls: 4838 summary: "TLS object in a listener" 4839 value: 4840 certificate: "bundle" 4841 conf_commands: 4842 ciphersuites: "TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256" 4843 minprotocol: "TLSv1.3" 4844 session: 4845 cache_size: 10240 4846 timeout: 60 4847 tickets: 4848 - "IAMkP16P8OBuqsijSDGKTpmxrzfFNPP4EdRovXH2mqstXsodPC6MqIce5NlMzHLP" 4849 - "Ax4bv/JvMWoQG+BfH0feeM9Qb32wSaVVKOj1+1hmyU8ORMPHnf3Tio8gLkqm2ifC" 4850 4851 # /config/listeners/{listenerName}/tls/certificate 4852 configListenerTlsCertificateArray: 4853 summary: "Array of certificate bundle names" 4854 value: 4855 - bundle_old 4856 - bundle_new 4857 4858 # /config/listeners/{listenerName}/tls/certificate 4859 configListenerTlsCertificateString: 4860 summary: "Single certificate bundle name" 4861 value: bundle 4862 4863 # /config/listeners/{listenerName}/tls/conf_commands 4864 configListenerTlsConfCommands: 4865 summary: "TLS configuration commands in an object" 4866 value: 4867 ciphersuites: "TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256" 4868 minprotocol: "TLSv1.3" 4869 4870 # /config/listeners/{listenerName}/tls/session 4871 configListenerTlsSession: 4872 summary: "Session settings object" 4873 value: 4874 cache_size: 10240 4875 timeout: 60 4876 tickets: 4877 - "IAMkP16P8OBuqsijSDGKTpmxrzfFNPP4EdRovXH2mqstXsodPC6MqIce5NlMzHLP" 4878 - "Ax4bv/JvMWoQG+BfH0feeM9Qb32wSaVVKOj1+1hmyU8ORMPHnf3Tio8gLkqm2ifC" 4879 4880 # /config/listeners/{listenerName}/tls/session/tickets 4881 configListenerTlsSessionTicketsBool: 4882 summary: "Boolean value that enables or disables random tickets" 4883 value: true 4884 4885 # /config/listeners/{listenerName}/tls/session/tickets 4886 configListenerTlsSessionTicketsString: 4887 summary: "Single session ticket key" 4888 value: "IAMkP16P8OBuqsijSDGKTpmxrzfFNPP4EdRovXH2mqstXsodPC6MqIce5NlMzHLP" 4889 4890 # /config/listeners/{listenerName}/tls/session/tickets 4891 configListenerTlsSessionTicketsArray: 4892 summary: "Multiple session ticket keys" 4893 value: 4894 - "IAMkP16P8OBuqsijSDGKTpmxrzfFNPP4EdRovXH2mqstXsodPC6MqIce5NlMzHLP" 4895 - "Ax4bv/JvMWoQG+BfH0feeM9Qb32wSaVVKOj1+1hmyU8ORMPHnf3Tio8gLkqm2ifC" 4896 4897 # /config/routes 4898 configRoutes: 4899 summary: "Routes array" 4900 value: 4901 - action: 4902 pass: "applications/${host}_php_handler" 4903 4904 match: 4905 arguments: 4906 mode: "strict" 4907 fullAccess: "true" 4908 4909 uri: "~^/data/www/.*\\.php(/.*)?$" 4910 4911 - action: 4912 share: "/www/data$uri" 4913 4914 match: 4915 headers: 4916 - User-Agent: "curl*" 4917 4918 source: 4919 - "!192.168.1.1" 4920 - "!10.1.1.0/16" 4921 - "192.168.1.0/24" 4922 - "2001:0db8::/32" 4923 4924 - action: 4925 return: 301 4926 location: "https://www.example.com" 4927 4928 # /config/settings 4929 configSettings: 4930 summary: "Global settings" 4931 value: 4932 http: 4933 body_read_timeout: 30 4934 discard_unsafe_fields: true 4935 header_read_timeout: 30 4936 idle_timeout: 180 4937 log_route: true 4938 max_body_size: 8388608 4939 send_timeout: 30 4940 server_version: false 4941 static: 4942 mime_types: 4943 "text/x-code": 4944 - ".c" 4945 - ".h" 4946 4947 # /config/settings/http 4948 configSettingsHttp: 4949 summary: "HTTP settings" 4950 value: 4951 body_read_timeout: 30 4952 discard_unsafe_fields: true 4953 header_read_timeout: 30 4954 idle_timeout: 180 4955 log_route: true 4956 max_body_size: 8388608 4957 send_timeout: 30 4958 server_version: false 4959 static: 4960 mime_types: 4961 "text/x-code": 4962 - ".c" 4963 - ".h" 4964 4965 # /config/settings/http/static 4966 configSettingsHttpStatic: 4967 summary: "Static content settings" 4968 value: 4969 mime_types: 4970 "text/x-code": 4971 - ".c" 4972 - ".h" 4973 4974 # /config/settings/http/static/mime_types/{optionName} 4975 configSettingsHttpStaticMimeType: 4976 summary: "Individual MIME type" 4977 value: 4978 - ".c" 4979 - ".h" 4980 4981 # /config/settings/http/static/mime_types 4982 configSettingsHttpStaticMimeTypes: 4983 summary: "MIME types recognized by Unit" 4984 value: 4985 "text/x-code": 4986 - ".c" 4987 - ".h" 4988 4989 # /status 4990 status: 4991 summary: "Regular status object" 4992 value: 4993 connections: 4994 accepted: 1067 4995 active: 13 4996 idle: 4 4997 closed: 1050 4998 requests: 4999 total: 1307 5000 applications: 5001 wp: 5002 processes: 5003 running: 9 5004 starting: 1 5005 idle: 0 5006 requests: 5007 active: 15 5008 5009 # /status/connections 5010 statusConnections: 5011 summary: "Regular connections status object" 5012 value: 5013 accepted: 1067 5014 active: 13 5015 idle: 4 5016 closed: 1050 5017 5018 # /status/applications 5019 statusApplications: 5020 summary: "Regular applications status object" 5021 value: 5022 wp: 5023 processes: 5024 running: 9 5025 starting: 1 5026 idle: 0 5027 requests: 5028 active: 15 5029 5030 # /status/applications/{appName} 5031 statusApplicationsApp: 5032 summary: "Regular app status object" 5033 value: 5034 processes: 5035 running: 9 5036 starting: 1 5037 idle: 0 5038 requests: 5039 active: 15 5040 5041 # /status/applications/{appName}/processes 5042 statusApplicationsAppProcesses: 5043 summary: "Regular app processes status object" 5044 value: 5045 running: 9 5046 starting: 1 5047 idle: 0 5048 5049 # /status/applications/{appName}/requests 5050 statusApplicationsAppRequests: 5051 summary: "Regular app requests status object" 5052 value: 5053 active: 15 5054 5055 # /status/requests 5056 statusRequests: 5057 summary: "Regular requests status object" 5058 value: 5059 total: 1307 5060 5061 # -- RESPONSES -- 5062 5063 responses: 5064 responseOkDeleted: 5065 description: "OK; the value was deleted." 5066 content: 5067 application/json: 5068 schema: 5069 $ref: "#/components/schemas/jsonSuccessMessage" 5070 5071 examples: 5072 example1: 5073 $ref: "#/components/examples/successReconfigurationDone" 5074 5075 responseOkUpdated: 5076 description: "OK; the value was updated." 5077 content: 5078 application/json: 5079 schema: 5080 $ref: "#/components/schemas/jsonSuccessMessage" 5081 5082 examples: 5083 example1: 5084 $ref: "#/components/examples/successReconfigurationDone" 5085 5086 responseBadRequest: 5087 description: "Bad Request; invalid JSON payload was provided. 5088 This may occur if the payload supplied doesn't match the JSON schema for 5089 the respective configuration section." 5090 5091 content: 5092 application/json: 5093 schema: 5094 $ref: "#/components/schemas/jsonErrorMessage" 5095 5096 examples: 5097 example1: 5098 $ref: "#/components/examples/errorInvalidJson" 5099 5100 responseNotFound: 5101 description: "Not Found; the value does not exist in the configuration. 5102 This may occur if any part of the path is non-existent." 5103 5104 content: 5105 application/json: 5106 schema: 5107 $ref: "#/components/schemas/jsonErrorMessage" 5108 5109 examples: 5110 example1: 5111 $ref: "#/components/examples/errorValueDoesntExist" 5112 5113 responseInternalError: 5114 description: "Internal server error; the configuration wasn't applied. 5115 This may occur with misconfigured paths, wrong permissions, etc." 5116 5117 content: 5118 application/json: 5119 schema: 5120 $ref: "#/components/schemas/jsonErrorMessage" 5121 5122 examples: 5123 example1: 5124 $ref: "#/components/examples/errorInternalError" 5125 5126 # -- SCHEMAS -- 5127 5128 schemas: 5129 # -- GENERIC REUSABLE OBJECTS -- 5130 5131 stringArray: 5132 type: array 5133 description: "An array of strings." 5134 items: 5135 type: string 5136 5137 stringOrStringArray: 5138 description: "A string or an array of strings." 5139 oneOf: 5140 - type: string 5141 - $ref: "#/components/schemas/stringArray" 5142 5143 jsonSuccessMessage: 5144 type: object 5145 description: "JSON message on success." 5146 additionalProperties: 5147 type: string 5148 5149 jsonErrorMessage: 5150 type: object 5151 description: "JSON message on error." 5152 additionalProperties: 5153 type: string 5154 5155 # Configuration sections as data types; hugely reliant on each other 5156 5157 # /certificates 5158 cert: 5159 type: object 5160 description: "An object whose options represent certificate bundles." 5161 additionalProperties: 5162 $ref: "#/components/schemas/certBundle" 5163 5164 # /certificates/{bundleName} 5165 certBundle: 5166 type: object 5167 description: "An object whose options represent a certificate bundle." 5168 properties: 5169 key: 5170 type: string 5171 description: "Certificate bundle's key type, i. e. RSA, ECDSA, etc." 5172 5173 chain: 5174 $ref: "#/components/schemas/certBundleChain" 5175 5176 # /certificates/{bundleName}/chain 5177 certBundleChain: 5178 type: array 5179 description: "An array whose items represent certificates in a bundle." 5180 items: 5181 $ref: "#/components/schemas/certBundleChainCert" 5182 5183 # /certificates/{bundleName}/chain/{certIndex} 5184 certBundleChainCert: 5185 type: object 5186 description: "An object that represents an individual certificate." 5187 properties: 5188 subject: 5189 $ref: "#/components/schemas/certBundleChainCertSubj" 5190 5191 issuer: 5192 $ref: "#/components/schemas/certBundleChainCertIssuer" 5193 5194 validity: 5195 $ref: "#/components/schemas/certBundleChainCertValidity" 5196 5197 # /certificates/{bundleName}/chain/{certIndex}/subject 5198 certBundleChainCertSubj: 5199 type: object 5200 description: "An object that represents a certificate's subject." 5201 properties: 5202 common_name: 5203 type: string 5204 5205 country: 5206 type: string 5207 5208 state_or_province: 5209 type: string 5210 5211 organization: 5212 type: string 5213 5214 alt_names: 5215 $ref: "#/components/schemas/stringArray" 5216 5217 # /certificates/{bundleName}/chain/{certIndex}/issuer 5218 certBundleChainCertIssuer: 5219 type: object 5220 description: "An object that represents a certificate's issuer." 5221 properties: 5222 common_name: 5223 type: string 5224 5225 country: 5226 type: string 5227 5228 state_or_province: 5229 type: string 5230 5231 organization: 5232 type: string 5233 5234 # /certificates/{bundleName}/chain/{certIndex}/validity 5235 certBundleChainCertValidity: 5236 type: object 5237 description: "An object that represents the validity of a certificate." 5238 properties: 5239 since: 5240 type: string 5241 5242 until: 5243 type: string 5244 5245 # /config 5246 config: 5247 type: object 5248 description: "The entire /config section of the API." 5249 properties: 5250 access_log: 5251 $ref: "#/components/schemas/configAccessLog" 5252 5253 applications: 5254 $ref: "#/components/schemas/configApplications" 5255 5256 routes: 5257 $ref: "#/components/schemas/configRoutes" 5258 5259 listeners: 5260 $ref: "#/components/schemas/configListeners" 5261 5262 settings: 5263 $ref: "#/components/schemas/configSettings" 5264 5265 # /config/access_log 5266 configAccessLog: 5267 description: "Configures the access log." 5268 anyOf: 5269 - type: string 5270 - $ref: "#/components/schemas/configAccessLogObject" 5271 5272 # /config/access_log 5273 configAccessLogObject: 5274 description: "Configures the access log." 5275 type: object 5276 properties: 5277 format: 5278 type: string 5279 description: "Sets the log format. Besides arbitrary text, can contain 5280 any variables Unit supports." 5281 5282 default: '$remote_addr - - [$time_local] "$request_line" $status 5283 $body_bytes_sent "$header_referer" "$header_user_agent"' 5284 5285 path: 5286 type: string 5287 description: "Pathname of the access log file." 5288 5289 # /config/applications 5290 configApplications: 5291 type: object 5292 description: "An object whose options define individual applications." 5293 additionalProperties: 5294 $ref: "#/components/schemas/configApplication" 5295 5296 # /config/applications/{appName} 5297 configApplication: 5298 type: object 5299 description: "An object that defines an individual application." 5300 anyOf: 5301 - $ref: "#/components/schemas/configApplicationExternal" 5302 - $ref: "#/components/schemas/configApplicationJava" 5303 - $ref: "#/components/schemas/configApplicationPerl" 5304 - $ref: "#/components/schemas/configApplicationPHP" 5305 - $ref: "#/components/schemas/configApplicationPython" 5306 - $ref: "#/components/schemas/configApplicationRuby" 5307 5308 discriminator: 5309 propertyName: type 5310 mapping: 5311 external: "#/components/schemas/configApplicationExternal" 5312 java: "#/components/schemas/configApplicationJava" 5313 perl: "#/components/schemas/configApplicationPerl" 5314 php: "#/components/schemas/configApplicationPHP" 5315 python: "#/components/schemas/configApplicationPython" 5316 ruby: "#/components/schemas/configApplicationRuby" 5317 5318 # ABSTRACT BASE SCHEMA, NOT PRESENT IN THE CONFIGURATION; STORES COMMON OPTIONS 5319 configApplicationCommon: 5320 type: object 5321 description: "Common application object options." 5322 required: 5323 - type 5324 5325 properties: 5326 type: 5327 type: string 5328 description: "Application type and language version." 5329 enum: [external, java, perl, php, python, ruby] 5330 5331 environment: 5332 type: object 5333 description: "Environment variables to be passed to the app." 5334 additionalProperties: 5335 type: string 5336 5337 group: 5338 type: string 5339 description: "Group name that runs the app process." 5340 5341 isolation: 5342 type: object 5343 description: "Manages the isolation of an application process." 5344 properties: 5345 automount: 5346 type: object 5347 description: "Controls mount behavior if rootfs is enabled." 5348 properties: 5349 language_deps: 5350 type: boolean 5351 description: "Controls whether the language runtime 5352 dependencies are automounted." 5353 5354 default: true 5355 5356 procfs: 5357 type: boolean 5358 description: "Controls whether the procfs is automounted." 5359 default: true 5360 5361 tmpfs: 5362 type: boolean 5363 description: "Controls whether the tmpfs is automounted." 5364 default: true 5365 5366 cgroup: 5367 type: object 5368 description: "Defines the app’s cgroup." 5369 required: 5370 - path 5371 5372 properties: 5373 path: 5374 type: string 5375 description: "Configures absolute or relative path of the app 5376 in the cgroups v2 hierarchy." 5377 5378 gidmap: 5379 type: array 5380 description: "Array of group ID mapping objects." 5381 items: 5382 type: object 5383 description: "Group ID mapping object." 5384 required: 5385 - container 5386 - host 5387 - size 5388 5389 properties: 5390 container: 5391 type: integer 5392 description: "Starts the group ID mapping range in the 5393 app’s namespace." 5394 5395 host: 5396 type: integer 5397 description: "Starts the group ID mapping range in the 5398 OS namespace." 5399 5400 size: 5401 type: integer 5402 description: "Size of the ID range in both namespaces." 5403 5404 namespaces: 5405 type: object 5406 properties: 5407 cgroup: 5408 type: boolean 5409 description: "Creates a new cgroup namespace for the app." 5410 default: false 5411 5412 credential: 5413 type: boolean 5414 description: "Creates a new user namespace for the app." 5415 default: false 5416 5417 mount: 5418 type: boolean 5419 description: "Creates a new mount namespace for the app." 5420 default: false 5421 5422 network: 5423 type: boolean 5424 description: "Creates a new network namespace for the app." 5425 default: false 5426 5427 pid: 5428 type: boolean 5429 description: "Creates a new PID namespace for the app." 5430 default: false 5431 5432 uname: 5433 type: boolean 5434 description: "Creates a new UTS namespace for the app." 5435 default: false 5436 5437 rootfs: 5438 type: string 5439 description: "pathname of the directory to be used as the new 5440 file system root for the app." 5441 5442 uidmap: 5443 type: array 5444 description: "Array of user ID mapping objects." 5445 items: 5446 type: object 5447 description: "User ID mapping object." 5448 required: 5449 - container 5450 - host 5451 - size 5452 5453 properties: 5454 container: 5455 type: integer 5456 description: "Starts the user ID mapping range in the 5457 app’s namespace." 5458 5459 host: 5460 type: integer 5461 description: "Starts the user ID mapping range in the 5462 OS namespace." 5463 5464 size: 5465 type: integer 5466 description: "Size of the ID range in both namespaces." 5467 5468 limits: 5469 type: object 5470 description: "Governs the life cycle of an application process." 5471 properties: 5472 requests: 5473 type: integer 5474 description: "Maximum number of requests an app process 5475 can serve." 5476 5477 timeout: 5478 type: integer 5479 description: "Request timeout in seconds." 5480 5481 processes: 5482 description: "Governs the behavior of app processes." 5483 anyOf: 5484 - type: integer 5485 - type: object 5486 properties: 5487 idle_timeout: 5488 type: integer 5489 description: "Number of seconds Unit waits for before 5490 terminating an idle process that exceeds `spare`." 5491 5492 max: 5493 type: integer 5494 description: "Maximum number of application processes that 5495 Unit maintains (busy and idle)." 5496 5497 default: 1 5498 5499 idle: 5500 type: integer 5501 description: "Minimum number of idle processes that Unit tries 5502 to maintain for an app." 5503 5504 default: 1 5505 5506 user: 5507 type: string 5508 description: "Username that runs the app process." 5509 5510 stderr: 5511 type: string 5512 description: "Filename where Unit redirects the app's stderr stream." 5513 5514 stdout: 5515 type: string 5516 description: "Filename where Unit redirects the app's stdout stream." 5517 5518 working_directory: 5519 type: string 5520 description: "The app’s working directory." 5521 5522 configApplicationExternal: 5523 description: "Go or Node.js application on Unit." 5524 allOf: 5525 - $ref: "#/components/schemas/configApplicationCommon" 5526 - type: object 5527 required: 5528 - executable 5529 5530 properties: 5531 executable: 5532 type: string 5533 description: "Pathname of the app, absolute or relative 5534 to `working_directory`." 5535 5536 arguments: 5537 description: "Command-line arguments to be passed to the app." 5538 $ref: "#/components/schemas/stringArray" 5539 5540 configApplicationJava: 5541 description: "Java application on Unit." 5542 allOf: 5543 - $ref: "#/components/schemas/configApplicationCommon" 5544 - type: object 5545 required: 5546 - webapp 5547 5548 properties: 5549 webapp: 5550 type: string 5551 description: "Pathname of the application’s .war file 5552 (packaged or unpackaged)." 5553 5554 classpath: 5555 description: "Paths to your app’s required libraries 5556 (may point to directories or individual .jar files)." 5557 5558 $ref: "#/components/schemas/stringArray" 5559 5560 options: 5561 desription: "JVM runtime options." 5562 $ref: "#/components/schemas/stringArray" 5563 5564 thread_stack_size: 5565 type: integer 5566 description: "Stack size of a worker thread in bytes." 5567 5568 threads: 5569 type: integer 5570 description: "Number of worker threads per app process." 5571 default: 1 5572 5573 configApplicationPerl: 5574 description: "Perl application on Unit." 5575 allOf: 5576 - $ref: "#/components/schemas/configApplicationCommon" 5577 - type: object 5578 required: 5579 - script 5580 5581 properties: 5582 script: 5583 type: string 5584 description: "PSGI script path." 5585 5586 thread_stack_size: 5587 type: integer 5588 description: "Stack size of a worker thread in bytes." 5589 5590 threads: 5591 type: integer 5592 description: "Number of worker threads per app process." 5593 default: 1 5594 5595 configApplicationPHP: 5596 description: "PHP application on Unit." 5597 allOf: 5598 - $ref: "#/components/schemas/configApplicationCommon" 5599 - type: object 5600 required: 5601 - root 5602 5603 properties: 5604 root: 5605 type: string 5606 description: "Base directory of the app’s file structure." 5607 5608 index: 5609 type: string 5610 description: "Filename added to URI paths that point to 5611 directories if no `script` is set." 5612 5613 default: "index.php" 5614 5615 options: 5616 type: object 5617 description: "Defines the php.ini location and options." 5618 properties: 5619 admin: 5620 type: object 5621 description: "Extra directives set in PHP_INI_SYSTEM mode." 5622 5623 additionalProperties: 5624 type: string 5625 5626 file: 5627 type: string 5628 description: "Pathname of the php.ini file." 5629 5630 user: 5631 type: object 5632 description: "Extra directives set in PHP_INI_USER mode." 5633 additionalProperties: 5634 type: string 5635 5636 script: 5637 type: string 5638 description: "Filename of a `root`-based PHP script that serves 5639 all requests to the app." 5640 5641 targets: 5642 type: object 5643 description: "Application sections with custom `root`, `script`, 5644 and `index` values." 5645 5646 additionalProperties: 5647 type: object 5648 required: 5649 - root 5650 5651 properties: 5652 root: 5653 type: string 5654 description: "Base directory of the target’s 5655 file structure." 5656 5657 index: 5658 type: string 5659 description: "Filename added to URI paths that point to 5660 directories if no `script` is set." 5661 5662 default: "index.php" 5663 5664 script: 5665 type: string 5666 description: "Filename of a `root`-based PHP script that 5667 serves all requests to the target." 5668 5669 configApplicationPython: 5670 description: "Python application on Unit." 5671 allOf: 5672 - $ref: "#/components/schemas/configApplicationCommon" 5673 - type: object 5674 required: 5675 - module 5676 5677 properties: 5678 module: 5679 type: string 5680 description: "App’s module name." 5681 5682 callable: 5683 type: string 5684 description: "Name of the `module`-based callable that Unit runs 5685 as the app." 5686 5687 default: "application" 5688 5689 home: 5690 type: string 5691 description: "Path to the app’s virtual environment, absolute or 5692 relative to `working_directory`." 5693 5694 path: 5695 description: "Additional Python module lookup paths." 5696 anyOf: 5697 - type: string 5698 - $ref: "#/components/schemas/stringArray" 5699 5700 prefix: 5701 type: string 5702 description: "SCRIPT_NAME context value for WSGI or the 5703 root_path context value for ASGI." 5704 5705 protocol: 5706 description: "Hints Unit that the app uses a certain interface." 5707 enum: 5708 - "asgi" 5709 - "wsgi" 5710 5711 targets: 5712 type: object 5713 description: "App sections with custom `module` and 5714 `callable` values." 5715 5716 additionalProperties: 5717 type: object 5718 required: 5719 - module 5720 5721 properties: 5722 module: 5723 type: string 5724 description: "Target's module name." 5725 5726 callable: 5727 type: string 5728 description: "Name of the `module`-based callable that Unit 5729 runs as the target." 5730 5731 default: "application" 5732 5733 prefix: 5734 type: string 5735 description: "SCRIPT_NAME context value for WSGI or the 5736 root_path context value for ASGI." 5737 5738 thread_stack_size: 5739 type: integer 5740 description: "Stack size of a worker thread in bytes." 5741 5742 threads: 5743 type: integer 5744 description: "Number of worker threads per app process." 5745 default: 1 5746 5747 configApplicationRuby: 5748 description: "Ruby application on Unit." 5749 allOf: 5750 - $ref: "#/components/schemas/configApplicationCommon" 5751 - type: object 5752 required: 5753 - script 5754 5755 properties: 5756 script: 5757 type: string 5758 description: "Rack script pathname, including the .ru extension." 5759 5760 hooks: 5761 type: string 5762 description: "Pathname of the .rb file setting the event hooks 5763 invoked during the app’s lifecycle." 5764 5765 threads: 5766 type: integer 5767 description: "Number of worker threads per app process." 5768 default: 1 5769 5770 #/config/routes 5771 configRoutes: 5772 description: "Configures the routes." 5773 anyOf: 5774 - $ref: "#/components/schemas/configRouteArray" 5775 - $ref: "#/components/schemas/configRoutesObject" 5776 5777 #/config/routes/{routeName} or /config/routes 5778 configRouteArray: 5779 type: array 5780 description: "An array whose items define individual route steps." 5781 items: 5782 $ref: "#/components/schemas/configRouteStep" 5783 5784 #/config/routes 5785 configRoutesObject: 5786 type: object 5787 description: "An object whose options define individual routes." 5788 additionalProperties: 5789 description: "Individual route arrays." 5790 $ref: "#/components/schemas/configRouteArray" 5791 5792 #/config/routes/{stepIndex} 5793 #/config/routes/{routeName}/{stepIndex} 5794 configRouteStep: 5795 type: object 5796 description: "An object whose options define a step's 5797 conditions and action." 5798 5799 required: 5800 - action 5801 5802 properties: 5803 action: 5804 description: "Defines how matching requests are handled." 5805 $ref: "#/components/schemas/configRouteStepAction" 5806 5807 match: 5808 description: "Defines the step’s conditions to be matched." 5809 $ref: "#/components/schemas/configRouteStepMatch" 5810 5811 #/config/routes/{stepIndex}/match 5812 #/config/routes/{routeName}/{stepIndex}/match 5813 configRouteStepMatch: 5814 type: object 5815 description: "An object whose options define a step's conditions." 5816 properties: 5817 arguments: 5818 description: "Arguments supplied with the request’s query string." 5819 anyOf: 5820 - $ref: "#/components/schemas/configRouteStepMatchObject" 5821 - $ref: "#/components/schemas/configRouteStepMatchObjectArray" 5822 5823 cookies: 5824 description: "Cookies supplied with the request." 5825 anyOf: 5826 - $ref: "#/components/schemas/configRouteStepMatchObject" 5827 - $ref: "#/components/schemas/configRouteStepMatchObjectArray" 5828 5829 destination: 5830 description: "Target IP address and optional port of the request." 5831 $ref: "#/components/schemas/stringOrStringArray" 5832 5833 headers: 5834 description: "Header fields supplied with the request." 5835 anyOf: 5836 - $ref: "#/components/schemas/configRouteStepMatchObject" 5837 - $ref: "#/components/schemas/configRouteStepMatchObjectArray" 5838 5839 host: 5840 description: "Host header field." 5841 $ref: "#/components/schemas/stringOrStringArray" 5842 5843 method: 5844 description: "Method from the request line." 5845 $ref: "#/components/schemas/stringOrStringArray" 5846 5847 query: 5848 description: "Query string." 5849 $ref: "#/components/schemas/stringOrStringArray" 5850 5851 scheme: 5852 description: "URI scheme. Accepts only two patterns, 5853 either `http` or `https`." 5854 5855 enum: 5856 - "http" 5857 - "https" 5858 5859 source: 5860 description: "Source IP address and optional port of the request." 5861 $ref: "#/components/schemas/stringOrStringArray" 5862 5863 uri: 5864 description: "Request target." 5865 $ref: "#/components/schemas/stringOrStringArray" 5866 5867 #/config/routes/{stepIndex}/match/[arguments|cookies|headers] 5868 #/config/routes/{routeName}/{stepIndex}/match/[arguments|cookies|headers] 5869 configRouteStepMatchObject: 5870 type: object 5871 description: "An object whose options define a set of conditions." 5872 additionalProperties: 5873 $ref: "#/components/schemas/stringOrStringArray" 5874 5875 #/config/routes/{stepIndex}/match/[arguments|cookies|headers] 5876 #/config/routes/{routeName}/{stepIndex}/match/[arguments|cookies|headers] 5877 configRouteStepMatchObjectArray: 5878 type: array 5879 description: "An array whose items define sets of conditions." 5880 items: 5881 $ref: "#/components/schemas/configRouteStepMatchObject" 5882 5883 #/config/routes/{stepIndex}/action 5884 #/config/routes/{routeName}/{stepIndex}/action 5885 configRouteStepAction: 5886 type: object 5887 description: "An object whose options define a step's action." 5888 oneOf: 5889 - $ref: "#/components/schemas/configRouteStepActionPass" 5890 - $ref: "#/components/schemas/configRouteStepActionProxy" 5891 - $ref: "#/components/schemas/configRouteStepActionReturn" 5892 - $ref: "#/components/schemas/configRouteStepActionShare" 5893 5894 #/config/routes/{stepIndex}/action/pass 5895 #/config/routes/{routeName}/{stepIndex}/action/pass 5896 configRouteStepActionPass: 5897 type: object 5898 description: "An object whose single option defines a step's pass action." 5899 required: 5900 - pass 5901 properties: 5902 pass: 5903 type: string 5904 description: "Destination to which the action passes 5905 incoming requests." 5906 5907 rewrite: 5908 $ref: "#/components/schemas/configRouteStepActionRewrite" 5909 5910 response_headers: 5911 $ref: "#/components/schemas/configRouteStepActionResponseHeaders" 5912 5913 #/config/routes/{stepIndex}/action/proxy 5914 #/config/routes/{routeName}/{stepIndex}/action/proxy 5915 configRouteStepActionProxy: 5916 type: object 5917 description: "An object whose single option defines a step's proxy 5918 action." 5919 required: 5920 - proxy 5921 properties: 5922 proxy: 5923 type: string 5924 description: "Socket address of an HTTP server to where the request 5925 is proxied." 5926 5927 rewrite: 5928 $ref: "#/components/schemas/configRouteStepActionRewrite" 5929 5930 response_headers: 5931 $ref: "#/components/schemas/configRouteStepActionResponseHeaders" 5932 5933 #/config/routes/{stepIndex}/action/return 5934 #/config/routes/{routeName}/{stepIndex}/action/return 5935 configRouteStepActionReturn: 5936 type: object 5937 description: "An object whose single option defines a step's 5938 return action." 5939 5940 required: 5941 - return 5942 5943 properties: 5944 return: 5945 type: integer 5946 description: "Defines the HTTP response status code to be returned." 5947 5948 location: 5949 type: string 5950 description: "URI; used if the return value implies redirection." 5951 5952 rewrite: 5953 $ref: "#/components/schemas/configRouteStepActionRewrite" 5954 5955 response_headers: 5956 $ref: "#/components/schemas/configRouteStepActionResponseHeaders" 5957 5958 #/config/routes/{stepIndex}/action/share 5959 #/config/routes/{routeName}/{stepIndex}/action/share 5960 configRouteStepActionShare: 5961 type: object 5962 description: "An object whose single option defines a step's 5963 share action." 5964 5965 required: 5966 - share 5967 5968 properties: 5969 share: 5970 description: "Lists file paths that are tried until a file is found." 5971 $ref: "#/components/schemas/stringOrStringArray" 5972 5973 index: 5974 type: string 5975 description: "Filename; tried if share is a directory." 5976 default: "index.html" 5977 5978 fallback: 5979 description: "Used if the request can’t be served by share or index." 5980 $ref: "#/components/schemas/configRouteStepAction" 5981 5982 types: 5983 description: "Used to filter the shared files." 5984 $ref: "#/components/schemas/stringArray" 5985 5986 chroot: 5987 type: string 5988 description: "Directory pathname that restricts the shareable paths." 5989 5990 follow_symlinks: 5991 type: boolean 5992 description: "Turns on and off symbolic link resolution." 5993 default: true 5994 5995 traverse_mounts: 5996 type: boolean 5997 description: "Turns on and off mount point resolution." 5998 default: true 5999 6000 rewrite: 6001 $ref: "#/components/schemas/configRouteStepActionRewrite" 6002 6003 response_headers: 6004 $ref: "#/components/schemas/configRouteStepActionResponseHeaders" 6005 6006 #/config/routes/{stepIndex}/action/rewrite 6007 #/config/routes/{routeName}/{stepIndex}/action/rewrite 6008 configRouteStepActionRewrite: 6009 type: string 6010 description: "Updates the URI of the incoming request before the action 6011 is applied." 6012 6013 #/config/routes/{stepIndex}/action/response_headers 6014 #/config/routes/{routeName}/{stepIndex}/action/response_headers 6015 configRouteStepActionResponseHeaders: 6016 type: object 6017 description: "Updates the header fields of Unit’s response before the 6018 action is taken." 6019 additionalProperties: 6020 type: string 6021 6022 # /config/listeners/ 6023 configListeners: 6024 type: object 6025 description: "An object whose options are listeners." 6026 additionalProperties: 6027 $ref: "#/components/schemas/configListener" 6028 6029 # /config/listeners/{listenerName} 6030 configListener: 6031 type: object 6032 description: "An individual listener." 6033 properties: 6034 tls: 6035 $ref: "#/components/schemas/configListenerTls" 6036 forwarded: 6037 $ref: "#/components/schemas/configListenerForwarded" 6038 pass: 6039 type: string 6040 description: "Destination to which the listener passes 6041 incoming requests." 6042 6043 # /config/listeners/{listenerName}/tls/certificate 6044 configListenerTlsCertificate: 6045 description: "Refers to one or more certificate bundles uploaded earlier." 6046 anyOf: 6047 - type: string 6048 - $ref: "#/components/schemas/stringArray" 6049 6050 # /config/listeners/{listenerName}/tls/conf_commands 6051 configListenerTlsConfCommands: 6052 type: object 6053 description: "Defines the SSL configuration commands to be set for 6054 the listener." 6055 additionalProperties: 6056 type: string 6057 6058 # /config/listeners/{listenerName}/tls 6059 configListenerTls: 6060 type: object 6061 description: "Defines SSL/TLS settings for the listener." 6062 required: 6063 - certificate 6064 6065 properties: 6066 conf_commands: 6067 $ref: "#/components/schemas/configListenerTlsConfCommands" 6068 6069 session: 6070 $ref: "#/components/schemas/configListenerTlsSession" 6071 6072 certificate: 6073 $ref: "#/components/schemas/configListenerTlsCertificate" 6074 6075 # /config/listeners/{listenerName}/tls/session 6076 configListenerTlsSession: 6077 type: object 6078 description: "Configures the TLS session cache and tickets for 6079 the listener." 6080 6081 properties: 6082 cache_size: 6083 type: integer 6084 description: "Number of sessions in the TLS session cache." 6085 default: 0 6086 6087 timeout: 6088 type: integer 6089 description: "Session timeout for the TLS session cache in seconds." 6090 default: 300 6091 6092 tickets: 6093 $ref: "#/components/schemas/configListenerTlsSessionTickets" 6094 6095 # /config/listeners/{listenerName}/tls/session/tickets 6096 configListenerTlsSessionTickets: 6097 description: "Configures TLS session tickets." 6098 anyOf: 6099 - type: boolean 6100 - type: string 6101 - $ref: "#/components/schemas/stringArray" 6102 6103 default: false 6104 6105 # /config/listeners/{listenerName}/forwarded 6106 configListenerForwarded: 6107 type: object 6108 description: "Configures client IP address and protocol replacement." 6109 required: 6110 - source 6111 6112 properties: 6113 client_ip: 6114 type: string 6115 description: "Defines the HTTP header fields to expect in the request; 6116 uses the `X-Forwarded-For` format." 6117 6118 source: 6119 description: "Defines address-based patterns for trusted addresses." 6120 anyOf: 6121 - type: string 6122 - $ref: "#/components/schemas/stringArray" 6123 6124 recursive: 6125 type: boolean 6126 description: "Controls how the `client_ip` fields are traversed." 6127 default: false 6128 6129 protocol: 6130 description: "Defines the relevant HTTP header field to expect in the 6131 request; uses the `X-Forwarded-Proto` format." 6132 6133 enum: 6134 - "http" 6135 - "https" 6136 - "on" 6137 6138 # /config/settings 6139 configSettings: 6140 type: object 6141 description: "An object whose single option represents global 6142 Unit settings." 6143 6144 properties: 6145 http: 6146 description: "Represents global HTTP settings in Unit." 6147 $ref: "#/components/schemas/configSettingsHttp" 6148 6149 # /config/settings/http 6150 configSettingsHttp: 6151 type: object 6152 description: "An object whose options represent global HTTP settings 6153 in Unit." 6154 6155 properties: 6156 body_read_timeout: 6157 type: integer 6158 description: "Maximum number of seconds to read data from the body of 6159 a client’s request." 6160 6161 default: 30 6162 6163 discard_unsafe_fields: 6164 type: boolean 6165 description: "If `true`, Unit only processes header names made of 6166 alphanumerics and hyphens." 6167 6168 default: true 6169 6170 header_read_timeout: 6171 type: integer 6172 description: "Maximum number of seconds to read the header of a 6173 client’s request." 6174 6175 default: 30 6176 6177 idle_timeout: 6178 type: integer 6179 description: "Maximum number of seconds between requests in a 6180 keep-alive connection." 6181 6182 default: 180 6183 6184 log_route: 6185 type: boolean 6186 description: "Enables or disables router logging." 6187 default: false 6188 6189 max_body_size: 6190 type: integer 6191 description: "Maximum number of bytes in the body of a 6192 client’s request." 6193 6194 default: 8388608 6195 6196 send_timeout: 6197 type: integer 6198 description: "Maximum number of seconds to transmit data as a 6199 response to the client." 6200 default: 30 6201 6202 server_version: 6203 type: boolean 6204 description: "Enables or disables version numbers in Unit's `Server` 6205 header fields." 6206 6207 default: true 6208 6209 static: 6210 description: "Configures static asset handling." 6211 $ref: "#/components/schemas/configSettingsHttpStatic" 6212 6213 # /config/settings/http/static 6214 configSettingsHttpStatic: 6215 type: object 6216 description: "An object whose single option defines specific MIME types." 6217 properties: 6218 mime_types: 6219 $ref: "#/components/schemas/configSettingsHttpStaticMimeTypes" 6220 6221 # /config/settings/http/static/mime_types 6222 configSettingsHttpStaticMimeTypes: 6223 type: object 6224 description: "An object whose options define individual MIME types." 6225 additionalProperties: 6226 $ref: "#/components/schemas/configSettingsHttpStaticMimeType" 6227 6228 # /config/settings/http/static/mime_types/{mimeType} 6229 configSettingsHttpStaticMimeType: 6230 description: "An entity that defines an individual MIME type by 6231 listing file extensions." 6232 6233 anyOf: 6234 - type: string 6235 - $ref: "#/components/schemas/stringArray" 6236 6237 # /status 6238 status: 6239 description: "Represents Unit's usage statistics." 6240 type: object 6241 properties: 6242 connections: 6243 $ref: "#/components/schemas/statusConnections" 6244 6245 requests: 6246 $ref: "#/components/schemas/statusRequests" 6247 6248 applications: 6249 $ref: "#/components/schemas/statusApplications" 6250 6251 # /status/applications 6252 statusApplications: 6253 description: "Lists Unit's application process and request statistics." 6254 type: object 6255 additionalProperties: 6256 $ref: "#/components/schemas/statusApplicationsApp" 6257 6258 # /status/applications/{appName} 6259 statusApplicationsApp: 6260 description: "Represents Unit's per-app process and request statistics." 6261 type: object 6262 properties: 6263 processes: 6264 $ref: "#/components/schemas/statusApplicationsAppProcesses" 6265 6266 requests: 6267 $ref: "#/components/schemas/statusApplicationsAppRequests" 6268 6269 # /status/applications/{appName}/processes 6270 statusApplicationsAppProcesses: 6271 description: "Represents Unit's per-app process statistics." 6272 type: object 6273 properties: 6274 running: 6275 type: integer 6276 description: "Current running app processes." 6277 6278 starting: 6279 type: integer 6280 description: "Current starting app processes." 6281 6282 idle: 6283 type: integer 6284 description: "Current idle app processes." 6285 6286 # /status/applications/{appName}/requests 6287 statusApplicationsAppRequests: 6288 description: "Represents Unit's per-app request statistics." 6289 type: object 6290 properties: 6291 active: 6292 type: integer 6293 description: "Active app requests." 6294 6295 # /status/requests 6296 statusRequests: 6297 description: "Represents Unit's per-instance request statistics." 6298 type: object 6299 properties: 6300 total: 6301 type: integer 6302 description: "Total non-API requests during the instance’s lifetime." 6303 6304 # /status/connections 6305 statusConnections: 6306 description: "Represents Unit's per-instance connection statistics." 6307 type: object 6308 properties: 6309 accepted: 6310 type: integer 6311 description: "Total accepted connections during the 6312 instance’s lifetime." 6313 6314 active: 6315 type: integer 6316 description: "Current active connections for the instance." 6317 6318 idle: 6319 type: integer 6320 description: "Current idle connections for the instance." 6321 6322 closed: 6323 type: integer 6324 description: "Total closed connections during 6325 the instance’s lifetime." 6326 6327# -- TAGS -- 6328 6329tags: 6330 - name: access log 6331 description: Everything about the access log in the /config section 6332 externalDocs: 6333 url: https://unit.nginx.org/configuration/#access-log 6334 6335 - name: apps 6336 description: Everything about applications 6337 externalDocs: 6338 url: https://unit.nginx.org/configuration/#applications 6339 6340 - name: certificates 6341 description: 6342 Everything about the /certificates section in Unit's control API 6343 in Unit's control API 6344 externalDocs: 6345 url: https://unit.nginx.org/certificates/ 6346 6347 - name: config 6348 description: Everything about the /config section in Unit's control API 6349 externalDocs: 6350 url: https://unit.nginx.org/configuration/ 6351 6352 - name: control 6353 description: Everything about the /control section in Unit's control API 6354 externalDocs: 6355 url: https://unit.nginx.org/controlapi/ 6356 6357 - name: listeners 6358 description: Everything about listeners in the /config section 6359 externalDocs: 6360 url: https://unit.nginx.org/configuration/#listeners 6361 6362 - name: routes 6363 description: Everything about routes in the /config section 6364 externalDocs: 6365 url: https://unit.nginx.org/configuration/#routes 6366 6367 - name: settings 6368 description: Everything about the global settings in the /config section 6369 externalDocs: 6370 url: https://unit.nginx.org/configuration/#settings 6371 6372 - name: status 6373 description: Everything about the /status section in Unit's control API 6374 externalDocs: 6375 url: https://unit.nginx.org/usagestats/ 6376 6377 - name: tls 6378 description: Everything about SSL/TLS in Unit's control API 6379 externalDocs: 6380 url: https://unit.nginx.org/certificates/ 6381 6382 - name: xff 6383 description: Everything about X-Forwarded-* handling in Unit's control API 6384 externalDocs: 6385 url: https://unit.nginx.org/configuration/#ip-protocol-forwarding 6386 6387externalDocs: 6388 description: "Find us on GitHub" 6389 url: "https://github.com/nginx/unit" 6390