comparison yaml/nginx_api.yaml @ 2364:bb7e58ea3559

Updated yaml api spec for NGINX Plus release.
author Yaroslav Zhuravlev <yar@nginx.com>
date Thu, 11 Apr 2019 20:26:28 +0300
parents a89093ff86a3
children dd3ac7eefeed
comparison
equal deleted inserted replaced
2363:7952cd8af485 2364:bb7e58ea3559
1 swagger: '2.0' 1 swagger: '2.0'
2 info: 2 info:
3 version: '3.0' 3 version: '4.0'
4 title: NGINX Plus REST API 4 title: NGINX Plus REST API
5 description: NGINX Plus REST 5 description: NGINX Plus REST
6 [API](https://nginx.org/en/docs/http/ngx_http_api_module.html) 6 [API](https://nginx.org/en/docs/http/ngx_http_api_module.html)
7 provides access to NGINX Plus status information, 7 provides access to NGINX Plus status information,
8 on-the-fly configuration of upstream servers and 8 on-the-fly configuration of upstream servers and
9 key-value pairs management for 9 key-value pairs management for
10 [http](https://nginx.org/en/docs/http/ngx_http_keyval_module.html) and 10 [http](https://nginx.org/en/docs/http/ngx_http_keyval_module.html) and
11 [stream](https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html). 11 [stream](https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html).
12 basePath: /api/3 12 basePath: /api/4
13 tags: 13 tags:
14 - name: General Info 14 - name: General Info
15 - name: Processes 15 - name: Processes
16 - name: Connections 16 - name: Connections
17 - name: SSL 17 - name: SSL
834 - HTTP Keyvals 834 - HTTP Keyvals
835 - Method PATCH 835 - Method PATCH
836 summary: Modify a key-value or delete a key 836 summary: Modify a key-value or delete a key
837 description: Changes the value of the selected key in the key-value pair 837 description: Changes the value of the selected key in the key-value pair
838 or deletes a key by setting the key value to <literal>null</literal>. 838 or deletes a key by setting the key value to <literal>null</literal>.
839 If
840 <a href="https://nginx.org/en/docs/stream/ngx_stream_zone_sync_module.html#zone_sync">synchronization</a>
841 of keyval zones in a cluster is enabled,
842 deletes a key only on a target cluster node.
839 operationId: patchHttpKeyvalZoneKeyValue 843 operationId: patchHttpKeyvalZoneKeyValue
840 produces: 844 produces:
841 - application/json 845 - application/json
842 parameters: 846 parameters:
843 - in: body 847 - in: body
875 - HTTP Keyvals 879 - HTTP Keyvals
876 - Method DELETE 880 - Method DELETE
877 summary: Empty the HTTP keyval zone 881 summary: Empty the HTTP keyval zone
878 description: Deletes all key-value pairs from the HTTP keyval shared memory 882 description: Deletes all key-value pairs from the HTTP keyval shared memory
879 [zone](https://nginx.org/en/docs/http/ngx_http_keyval_module.html#keyval_zone). 883 [zone](https://nginx.org/en/docs/http/ngx_http_keyval_module.html#keyval_zone).
884 If
885 <a href="https://nginx.org/en/docs/stream/ngx_stream_zone_sync_module.html#zone_sync">synchronization</a>
886 of keyval zones in a cluster is enabled,
887 empties the keyval zone only on a target cluster node.
880 operationId: deleteHttpKeyvalZoneData 888 operationId: deleteHttpKeyvalZoneData
881 responses: 889 responses:
882 '204': 890 '204':
883 description: Success 891 description: Success
884 '404': 892 '404':
924 responses: 932 responses:
925 '200': 933 '200':
926 description: Success 934 description: Success
927 schema: 935 schema:
928 $ref: '#/definitions/NginxStreamServerZonesMap' 936 $ref: '#/definitions/NginxStreamServerZonesMap'
929 '404':
930 description: >
931 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream)
932 not configured (*StreamNotConfigured*)
933 schema:
934 $ref: '#/definitions/NginxError'
935 '/stream/server_zones/{streamServerZoneName}': 937 '/stream/server_zones/{streamServerZoneName}':
936 parameters: 938 parameters:
937 - name: streamServerZoneName 939 - name: streamServerZoneName
938 in: path 940 in: path
939 description: The name of a stream server zone. 941 description: The name of a stream server zone.
958 description: Success 960 description: Success
959 schema: 961 schema:
960 $ref: '#/definitions/NginxStreamServerZone' 962 $ref: '#/definitions/NginxStreamServerZone'
961 '404': 963 '404':
962 description: | 964 description: |
963 Server zone not found (*ServerZoneNotFound*), 965 Server zone not found (*ServerZoneNotFound*)
964 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
965 schema: 966 schema:
966 $ref: '#/definitions/NginxError' 967 $ref: '#/definitions/NginxError'
967 delete: 968 delete:
968 tags: 969 tags:
969 - Stream Server Zones 970 - Stream Server Zones
975 responses: 976 responses:
976 '204': 977 '204':
977 description: Success 978 description: Success
978 '404': 979 '404':
979 description: | 980 description: |
980 Server zone not found (*ServerZoneNotFound*), 981 Server zone not found (*ServerZoneNotFound*)
981 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
982 schema: 982 schema:
983 $ref: '#/definitions/NginxError' 983 $ref: '#/definitions/NginxError'
984 '405': 984 '405':
985 description: Method disabled (*MethodDisabled*) 985 description: Method disabled (*MethodDisabled*)
986 schema: 986 schema:
1006 responses: 1006 responses:
1007 '200': 1007 '200':
1008 description: Success 1008 description: Success
1009 schema: 1009 schema:
1010 $ref: '#/definitions/NginxStreamUpstreamMap' 1010 $ref: '#/definitions/NginxStreamUpstreamMap'
1011 '404':
1012 description: >
1013 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream)
1014 not configured (*StreamNotConfigured*)
1015 schema:
1016 $ref: '#/definitions/NginxError'
1017 '/stream/upstreams/{streamUpstreamName}/': 1011 '/stream/upstreams/{streamUpstreamName}/':
1018 parameters: 1012 parameters:
1019 - name: streamUpstreamName 1013 - name: streamUpstreamName
1020 in: path 1014 in: path
1021 description: The name of a stream upstream server group. 1015 description: The name of a stream upstream server group.
1045 description: Upstream is static (*UpstreamStatic*) 1039 description: Upstream is static (*UpstreamStatic*)
1046 schema: 1040 schema:
1047 $ref: '#/definitions/NginxError' 1041 $ref: '#/definitions/NginxError'
1048 '404': 1042 '404':
1049 description: | 1043 description: |
1050 Upstream not found (*UpstreamNotFound*), 1044 Upstream not found (*UpstreamNotFound*)
1051 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
1052 schema: 1045 schema:
1053 $ref: '#/definitions/NginxError' 1046 $ref: '#/definitions/NginxError'
1054 delete: 1047 delete:
1055 tags: 1048 tags:
1056 - Stream Upstreams 1049 - Stream Upstreams
1068 description: Upstream is static (*UpstreamStatic*) 1061 description: Upstream is static (*UpstreamStatic*)
1069 schema: 1062 schema:
1070 $ref: '#/definitions/NginxError' 1063 $ref: '#/definitions/NginxError'
1071 '404': 1064 '404':
1072 description: | 1065 description: |
1073 Upstream not found (*UpstreamNotFound*), 1066 Upstream not found (*UpstreamNotFound*)
1074 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
1075 schema: 1067 schema:
1076 $ref: '#/definitions/NginxError' 1068 $ref: '#/definitions/NginxError'
1077 '405': 1069 '405':
1078 description: Method disabled (*MethodDisabled*) 1070 description: Method disabled (*MethodDisabled*)
1079 schema: 1071 schema:
1104 description: Upstream is static (*UpstreamStatic*) 1096 description: Upstream is static (*UpstreamStatic*)
1105 schema: 1097 schema:
1106 $ref: '#/definitions/NginxError' 1098 $ref: '#/definitions/NginxError'
1107 '404': 1099 '404':
1108 description: | 1100 description: |
1109 Upstream not found (*UpstreamNotFound*), 1101 Upstream not found (*UpstreamNotFound*)
1110 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
1111 schema: 1102 schema:
1112 $ref: '#/definitions/NginxError' 1103 $ref: '#/definitions/NginxError'
1113 post: 1104 post:
1114 tags: 1105 tags:
1115 - Stream Upstreams 1106 - Stream Upstreams
1157 upstream “**name**” memory exhausted (*UpstreamOutOfMemory*) 1148 upstream “**name**” memory exhausted (*UpstreamOutOfMemory*)
1158 schema: 1149 schema:
1159 $ref: '#/definitions/NginxError' 1150 $ref: '#/definitions/NginxError'
1160 '404': 1151 '404':
1161 description: | 1152 description: |
1162 Upstream not found (*UpstreamNotFound*), 1153 Upstream not found (*UpstreamNotFound*)
1163 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
1164 schema: 1154 schema:
1165 $ref: '#/definitions/NginxError' 1155 $ref: '#/definitions/NginxError'
1166 '405': 1156 '405':
1167 description: Method disabled (*MethodDisabled*) 1157 description: Method disabled (*MethodDisabled*)
1168 schema: 1158 schema:
1205 schema: 1195 schema:
1206 $ref: '#/definitions/NginxError' 1196 $ref: '#/definitions/NginxError'
1207 '404': 1197 '404':
1208 description: | 1198 description: |
1209 Upstream not found (*UpstreamNotFound*), 1199 Upstream not found (*UpstreamNotFound*),
1210 server with ID “**id**” does not exist (*UpstreamServerNotFound*), 1200 server with ID “**id**” does not exist (*UpstreamServerNotFound*)
1211 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
1212 schema: 1201 schema:
1213 $ref: '#/definitions/NginxError' 1202 $ref: '#/definitions/NginxError'
1214 patch: 1203 patch:
1215 tags: 1204 tags:
1216 - Stream Upstreams 1205 - Stream Upstreams
1258 schema: 1247 schema:
1259 $ref: '#/definitions/NginxError' 1248 $ref: '#/definitions/NginxError'
1260 '404': 1249 '404':
1261 description: | 1250 description: |
1262 Upstream not found (*UpstreamNotFound*), 1251 Upstream not found (*UpstreamNotFound*),
1263 server with ID “**id**” does not exist (*UpstreamServerNotFound*), 1252 server with ID “**id**” does not exist (*UpstreamServerNotFound*)
1264 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
1265 schema: 1253 schema:
1266 $ref: '#/definitions/NginxError' 1254 $ref: '#/definitions/NginxError'
1267 '405': 1255 '405':
1268 description: Method disabled (*MethodDisabled*) 1256 description: Method disabled (*MethodDisabled*)
1269 schema: 1257 schema:
1294 schema: 1282 schema:
1295 $ref: '#/definitions/NginxError' 1283 $ref: '#/definitions/NginxError'
1296 '404': 1284 '404':
1297 description: | 1285 description: |
1298 Upstream not found (*UpstreamNotFound*), 1286 Upstream not found (*UpstreamNotFound*),
1299 server with ID “**id**” does not exist (*UpstreamServerNotFound*), 1287 server with ID “**id**” does not exist (*UpstreamServerNotFound*)
1300 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
1301 schema: 1288 schema:
1302 $ref: '#/definitions/NginxError' 1289 $ref: '#/definitions/NginxError'
1303 '405': 1290 '405':
1304 description: Method disabled (*MethodDisabled*) 1291 description: Method disabled (*MethodDisabled*)
1305 schema: 1292 schema:
1324 responses: 1311 responses:
1325 '200': 1312 '200':
1326 description: Success 1313 description: Success
1327 schema: 1314 schema:
1328 $ref: '#/definitions/NginxStreamKeyvalZonesMap' 1315 $ref: '#/definitions/NginxStreamKeyvalZonesMap'
1329 '404':
1330 description: |
1331 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
1332 schema:
1333 $ref: '#/definitions/NginxError'
1334 '/stream/keyvals/{streamKeyvalZoneName}': 1316 '/stream/keyvals/{streamKeyvalZoneName}':
1335 parameters: 1317 parameters:
1336 - name: streamKeyvalZoneName 1318 - name: streamKeyvalZoneName
1337 in: path 1319 in: path
1338 description: The name of a stream keyval shared memory zone. 1320 description: The name of a stream keyval shared memory zone.
1359 schema: 1341 schema:
1360 $ref: '#/definitions/NginxStreamKeyvalZone' 1342 $ref: '#/definitions/NginxStreamKeyvalZone'
1361 '404': 1343 '404':
1362 description: | 1344 description: |
1363 Keyval not found (*KeyvalNotFound*), 1345 Keyval not found (*KeyvalNotFound*),
1364 keyval key not found (*KeyvalKeyNotFound*), 1346 keyval key not found (*KeyvalKeyNotFound*)
1365 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
1366 schema: 1347 schema:
1367 $ref: '#/definitions/NginxError' 1348 $ref: '#/definitions/NginxError'
1368 post: 1349 post:
1369 tags: 1350 tags:
1370 - Stream Keyvals 1351 - Stream Keyvals
1396 nested object or list (*KeyvalFormatError*) 1377 nested object or list (*KeyvalFormatError*)
1397 schema: 1378 schema:
1398 $ref: '#/definitions/NginxError' 1379 $ref: '#/definitions/NginxError'
1399 '404': 1380 '404':
1400 description: | 1381 description: |
1401 Keyval not found (*KeyvalNotFound*), 1382 Keyval not found (*KeyvalNotFound*)
1402 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
1403 schema: 1383 schema:
1404 $ref: '#/definitions/NginxError' 1384 $ref: '#/definitions/NginxError'
1405 '405': 1385 '405':
1406 description: Method disabled (*MethodDisabled*) 1386 description: Method disabled (*MethodDisabled*)
1407 schema: 1387 schema:
1419 - Stream Keyvals 1399 - Stream Keyvals
1420 - Method PATCH 1400 - Method PATCH
1421 summary: Modify a key-value or delete a key 1401 summary: Modify a key-value or delete a key
1422 description: Changes the value of the selected key in the key-value pair 1402 description: Changes the value of the selected key in the key-value pair
1423 or deletes a key by setting the key value to <literal>null</literal>. 1403 or deletes a key by setting the key value to <literal>null</literal>.
1404 If
1405 <a href="https://nginx.org/en/docs/stream/ngx_stream_zone_sync_module.html#zone_sync">synchronization</a>
1406 of keyval zones in a cluster is enabled,
1407 deletes a key only on a target cluster node.
1424 operationId: patchStreamKeyvalZoneKeyValue 1408 operationId: patchStreamKeyvalZoneKeyValue
1425 produces: 1409 produces:
1426 - application/json 1410 - application/json
1427 parameters: 1411 parameters:
1428 - in: body 1412 - in: body
1442 schema: 1426 schema:
1443 $ref: '#/definitions/NginxError' 1427 $ref: '#/definitions/NginxError'
1444 '404': 1428 '404':
1445 description: | 1429 description: |
1446 Keyval not found (*KeyvalNotFound*), 1430 Keyval not found (*KeyvalNotFound*),
1447 keyval key not found (*KeyvalKeyNotFound*), 1431 keyval key not found (*KeyvalKeyNotFound*)
1448 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
1449 schema: 1432 schema:
1450 $ref: '#/definitions/NginxError' 1433 $ref: '#/definitions/NginxError'
1451 '405': 1434 '405':
1452 description: Method disabled (*MethodDisabled*) 1435 description: Method disabled (*MethodDisabled*)
1453 schema: 1436 schema:
1461 - Stream Keyvals 1444 - Stream Keyvals
1462 - Method DELETE 1445 - Method DELETE
1463 summary: Empty the stream keyval zone 1446 summary: Empty the stream keyval zone
1464 description: Deletes all key-value pairs from the stream keyval shared memory 1447 description: Deletes all key-value pairs from the stream keyval shared memory
1465 [zone](https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html#keyval_zone). 1448 [zone](https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html#keyval_zone).
1449 If
1450 <a href="https://nginx.org/en/docs/stream/ngx_stream_zone_sync_module.html#zone_sync">synchronization</a>
1451 of keyval zones in a cluster is enabled,
1452 empties the keyval zone only on a target cluster node.
1466 operationId: deleteStreamKeyvalZoneData 1453 operationId: deleteStreamKeyvalZoneData
1467 responses: 1454 responses:
1468 '204': 1455 '204':
1469 description: Success 1456 description: Success
1470 '404': 1457 '404':
1471 description: | 1458 description: |
1472 Keyval not found (*KeyvalNotFound*), 1459 Keyval not found (*KeyvalNotFound*)
1473 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
1474 schema: 1460 schema:
1475 $ref: '#/definitions/NginxError' 1461 $ref: '#/definitions/NginxError'
1476 '405': 1462 '405':
1477 description: Method disabled (*MethodDisabled*) 1463 description: Method disabled (*MethodDisabled*)
1478 schema: 1464 schema:
1490 responses: 1476 responses:
1491 '200': 1477 '200':
1492 description: Success 1478 description: Success
1493 schema: 1479 schema:
1494 $ref: '#/definitions/NginxStreamZoneSync' 1480 $ref: '#/definitions/NginxStreamZoneSync'
1495 '404':
1496 description: |
1497 Zone sync not configured (*ZoneSyncNotConfigured*),
1498 [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*)
1499 schema:
1500 $ref: '#/definitions/NginxError'
1501 ### 1481 ###
1502 ###DEFINITIONS 1482 ###DEFINITIONS
1503 ### 1483 ###
1504 definitions: 1484 definitions:
1505 ArrayOfStrings: 1485 ArrayOfStrings:
3224 title: Error 3204 title: Error
3225 description: | 3205 description: |
3226 nginx error object. 3206 nginx error object.
3227 type: object 3207 type: object
3228 properties: 3208 properties:
3229 path:
3230 type: string
3231 description: API path.
3232 method:
3233 type: string
3234 description: HTTP method.
3235 error: 3209 error:
3236 type: object 3210 type: object
3237 properties: 3211 properties:
3238 status: 3212 status:
3239 type: integer 3213 type: integer