# HG changeset patch # User Ruslan Ermilov # Date 1567422740 -10800 # Node ID dd3ac7eefeed1e769a2bf42698cb52b1c04ee8f4 # Parent 21f1376238b000c9f13282bad384c8112a3764de Updated docs for the upcoming NGINX Plus release. diff -r 21f1376238b0 -r dd3ac7eefeed xml/en/docs/http/ngx_http_api_module.xml --- a/xml/en/docs/http/ngx_http_api_module.xml Thu Aug 22 23:00:31 2019 +0300 +++ b/xml/en/docs/http/ngx_http_api_module.xml Mon Sep 02 14:12:20 2019 +0300 @@ -101,21 +101,21 @@ a supported API version in the URI. Examples of API requests with this configuration: -http://127.0.0.1/api/4/ -http://127.0.0.1/api/4/nginx -http://127.0.0.1/api/4/connections -http://127.0.0.1/api/4/http/requests -http://127.0.0.1/api/4/http/server_zones/server_backend -http://127.0.0.1/api/4/http/caches/cache_backend -http://127.0.0.1/api/4/http/upstreams/backend -http://127.0.0.1/api/4/http/upstreams/backend/servers/ -http://127.0.0.1/api/4/http/upstreams/backend/servers/1 -http://127.0.0.1/api/4/http/keyvals/one?key=arg1 -http://127.0.0.1/api/4/stream/ -http://127.0.0.1/api/4/stream/server_zones/server_backend -http://127.0.0.1/api/4/stream/upstreams/ -http://127.0.0.1/api/4/stream/upstreams/backend -http://127.0.0.1/api/4/stream/upstreams/backend/servers/1 +http://127.0.0.1/api/5/ +http://127.0.0.1/api/5/nginx +http://127.0.0.1/api/5/connections +http://127.0.0.1/api/5/http/requests +http://127.0.0.1/api/5/http/server_zones/server_backend +http://127.0.0.1/api/5/http/caches/cache_backend +http://127.0.0.1/api/5/http/upstreams/backend +http://127.0.0.1/api/5/http/upstreams/backend/servers/ +http://127.0.0.1/api/5/http/upstreams/backend/servers/1 +http://127.0.0.1/api/5/http/keyvals/one?key=arg1 +http://127.0.0.1/api/5/stream/ +http://127.0.0.1/api/5/stream/server_zones/server_backend +http://127.0.0.1/api/5/stream/upstreams/ +http://127.0.0.1/api/5/stream/upstreams/backend +http://127.0.0.1/api/5/stream/upstreams/backend/servers/1 @@ -146,14 +146,14 @@ All API requests should contain a supported API version in the URI. If the request URI equals the location prefix, the list of supported API versions is returned. -The current API version is “4”. +The current API version is “5”. The optional “fields” argument in the request line specifies which fields of the requested objects will be output: -http://127.0.0.1/api/4/nginx?fields=version,build +http://127.0.0.1/api/5/nginx?fields=version,build @@ -164,6 +164,8 @@ zone server +location +if in location 1.13.12 @@ -175,6 +177,18 @@ Several servers may share the same zone. + +Starting from 1.17.0, status information can be collected +per . +The special value off disables statistics collection +in nested location blocks. +Note that the statistics is collected +in the context of a location where processing ends. +It may be different from the original location, if an +internal +redirect happens during request processing. + + @@ -185,6 +199,24 @@ +The “expire” parameter of a +key-value pair can be +set or +changed +since version 5. + + + +The /resolvers/ data +were added in version 5. + + + +The /http/location_zones/ data +were added in version 5. + + + The path and method fields of nginx error object were removed in version 4. @@ -324,43 +356,6 @@ - -/ssl - - -Supported methods: - - -GET - Return SSL statistics -Returns SSL statistics. - -Request parameters: - -fields -(string, optional) - -Limits which fields of SSL statistics will be output. - - - -Possible responses: - - -200 - Success, returns SSL - - - -DELETE - Reset SSL statistics -Resets counters of SSL handshakes and session reuses. - -Possible responses: - - -204 - Success - - - - /slabs/ @@ -376,14 +371,14 @@ fields (string, optional) -Limits which fields of slab zones will be output. If the “fields” value is empty, then only zone names are output. +Limits which fields of slab zones will be output. If the “fields” value is empty, then only zone names will be output. Possible responses: -200 - Success, returns a collection of "Shared memory zone with slab allocator" objects for all slabs +200 - Success, returns a collection of "Shared memory zone with slab allocator" objects for all slabs @@ -506,14 +501,14 @@ fields (string, optional) -Limits which fields of server zones will be output. If the “fields” value is empty, then only server zone names are output. +Limits which fields of server zones will be output. If the “fields” value is empty, then only server zone names will be output. Possible responses: -200 - Success, returns a collection of "HTTP Server Zone" objects for all http server zones +200 - Success, returns a collection of "HTTP Server Zone" objects for all HTTP server zones @@ -565,6 +560,80 @@ + +/http/location_zones/ + + +Supported methods: + + +GET - Return status of all HTTP location zones +Returns status information for each HTTP location zone. + +Request parameters: + +fields +(string, optional) + +Limits which fields of location zones will be output. If the “fields” value is empty, then only zone names will be output. + + + +Possible responses: + + +200 - Success, returns a collection of "HTTP Location Zone" objects for all HTTP location zones + + + + + +/http/location_zones/{httpLocationZoneName} + + +Parameters common for all methods: + +httpLocationZoneName +(string, required) + +The name of an HTTP location zone. + +Supported methods: + + +GET - Return status of an HTTP location zone +Returns status of a particular HTTP location zone. + +Request parameters: + +fields +(string, optional) + +Limits which fields of the location zone will be output. + + + +Possible responses: + + +200 - Success, returns HTTP Location Zone +404 - Location zone not found (LocationZoneNotFound), returns Error + + + +DELETE - Reset statistics for a location zone. +Resets statistics of accepted and discarded requests, responses, received and sent bytes in a particular location zone. + +Possible responses: + + +204 - Success +404 - Location zone not found (LocationZoneNotFound), returns Error +405 - Method disabled (MethodDisabled), returns Error + + + + /http/caches/ @@ -580,14 +649,14 @@ fields (string, optional) -Limits which fields of cache zones will be output. If the “fields” value is empty, then only names of cache zones are output. +Limits which fields of cache zones will be output. If the “fields” value is empty, then only names of cache zones will be output. Possible responses: -200 - Success, returns a collection of "HTTP Cache" objects for all http caches +200 - Success, returns a collection of "HTTP Cache" objects for all HTTP caches @@ -654,14 +723,14 @@ fields (string, optional) -Limits which fields of upstream server groups will be output. If the “fields” value is empty, only names of upstreams are output. +Limits which fields of upstream server groups will be output. If the “fields” value is empty, only names of upstreams will be output. Possible responses: -200 - Success, returns a collection of "HTTP Upstream" objects for all http upstreams +200 - Success, returns a collection of "HTTP Upstream" objects for all HTTP upstreams @@ -886,14 +955,14 @@ fields (string, optional) -If the “fields” value is empty, then only HTTP keyval zone names are output. +If the “fields” value is empty, then only HTTP keyval zone names will be output. Possible responses: -200 - Success, returns a collection of "HTTP Keyval Shared Memory Zone" objects for all http keyvals +200 - Success, returns a collection of "HTTP Keyval Shared Memory Zone" objects for all HTTP keyvals @@ -939,9 +1008,9 @@ Request parameters: Key-value -(HTTP Keyval Shared Memory Zone, required) - -A key-value pair is specified in the JSON format. Several key-value pairs can be entered if the HTTP keyval shared memory zone is empty. +(HTTP Keyval Shared Memory Zone, required) + +A key-value pair is specified in the JSON format. Several key-value pairs can be entered if the HTTP keyval shared memory zone is empty. Expiration time in milliseconds can be specified for a key-value pair with the expire parameter which overrides the timeout parameter of the keyval_zone directive. @@ -949,9 +1018,11 @@ 201 - Created -400 - Key required (KeyvalFormatError), -only one key can be added (KeyvalFormatError), -nested object or list (KeyvalFormatError), returns Error +400 - Invalid JSON (KeyvalFormatError), +invalid key format (KeyvalFormatError), +key required (KeyvalFormatError), +keyval timeout is not enabled (KeyvalFormatError), +only one key can be added (KeyvalFormatError), returns Error 404 - Keyval not found (KeyvalNotFound), returns Error 405 - Method disabled (MethodDisabled), returns Error 409 - Key already exists (KeyvalKeyExists), returns Error @@ -960,12 +1031,12 @@ PATCH - Modify a key-value or delete a key -Changes the value of the selected key in the key-value pair or deletes a key by setting the key value to null. If synchronization of keyval zones in a cluster is enabled, deletes a key only on a target cluster node. +Changes the value of the selected key in the key-value pair, deletes a key by setting the key value to null, changes expiration time of a key-value pair. If synchronization of keyval zones in a cluster is enabled, deletes a key only on a target cluster node. Expiration time in milliseconds can be specified for a key-value pair with the expire parameter which overrides the timeout parameter of the keyval_zone directive. Request parameters: httpKeyvalZoneKeyValue -(HTTP Keyval Shared Memory Zone, required) +(HTTP Keyval Shared Memory Zone, required) A new value for the key is specified in the JSON format. @@ -975,9 +1046,10 @@ 204 - Success -400 - Key required (KeyvalFormatError), -only one key can be updated (KeyvalFormatError), -nested object or list (KeyvalFormatError), returns Error +400 - Invalid JSON (KeyvalFormatError), +key required (KeyvalFormatError), +keyval timeout is not enabled (KeyvalFormatError), +only one key can be updated (KeyvalFormatError), returns Error 404 - Keyval not found (KeyvalNotFound), keyval key not found (KeyvalKeyNotFound), returns Error 405 - Method disabled (MethodDisabled), returns Error @@ -1031,14 +1103,14 @@ fields (string, optional) -Limits which fields of server zones will be output. If the “fields” value is empty, then only server zone names are output. +Limits which fields of server zones will be output. If the “fields” value is empty, then only server zone names will be output. Possible responses: -200 - Success, returns a collection of "Stream Server Zone" objects for all stream server zones +200 - Success, returns a collection of "Stream Server Zone" objects for all stream server zones @@ -1105,14 +1177,14 @@ fields (string, optional) -Limits which fields of upstream server groups will be output. If the “fields” value is empty, only names of upstreams are output. +Limits which fields of upstream server groups will be output. If the “fields” value is empty, only names of upstreams will be output. Possible responses: -200 - Success, returns a collection of "Stream Upstream" objects for all stream upstreams +200 - Success, returns a collection of "Stream Upstream" objects for all stream upstreams @@ -1337,14 +1409,14 @@ fields (string, optional) -If the “fields” value is empty, then only stream keyval zone names are output. +If the “fields” value is empty, then only stream keyval zone names will be output. Possible responses: -200 - Success, returns a collection of "Stream Keyval Shared Memory Zone" objects for all stream keyvals +200 - Success, returns a collection of "Stream Keyval Shared Memory Zone" objects for all stream keyvals @@ -1390,9 +1462,9 @@ Request parameters: Key-value -(Stream Keyval Shared Memory Zone, required) - -A key-value pair is specified in the JSON format. Several key-value pairs can be entered if the stream keyval shared memory zone is empty. +(Stream Keyval Shared Memory Zone, required) + +A key-value pair is specified in the JSON format. Several key-value pairs can be entered if the stream keyval shared memory zone is empty. Expiration time in milliseconds can be specified for a key-value pair with the expire parameter which overrides the timeout parameter of the keyval_zone directive. @@ -1400,9 +1472,11 @@ 201 - Created -400 - Key required (KeyvalFormatError), -only one key can be added (KeyvalFormatError), -nested object or list (KeyvalFormatError), returns Error +400 - Invalid JSON (KeyvalFormatError), +invalid key format (KeyvalFormatError), +key required (KeyvalFormatError), +keyval timeout is not enabled (KeyvalFormatError), +only one key can be added (KeyvalFormatError), returns Error 404 - Keyval not found (KeyvalNotFound), returns Error 405 - Method disabled (MethodDisabled), returns Error 409 - Key already exists (KeyvalKeyExists), returns Error @@ -1411,12 +1485,12 @@ PATCH - Modify a key-value or delete a key -Changes the value of the selected key in the key-value pair or deletes a key by setting the key value to null. If synchronization of keyval zones in a cluster is enabled, deletes a key only on a target cluster node. +Changes the value of the selected key in the key-value pair, deletes a key by setting the key value to null, changes expiration time of a key-value pair. If synchronization of keyval zones in a cluster is enabled, deletes a key only on a target cluster node. Expiration time is specified in milliseconds with the expire parameter which overrides the timeout parameter of the keyval_zone directive. Request parameters: streamKeyvalZoneKeyValue -(Stream Keyval Shared Memory Zone, required) +(Stream Keyval Shared Memory Zone, required) A new value for the key is specified in the JSON format. @@ -1426,9 +1500,10 @@ 204 - Success -400 - Key required (KeyvalFormatError), -only one key can be updated (KeyvalFormatError), -nested object or list (KeyvalFormatError), returns Error +400 - Invalid JSON (KeyvalFormatError), +key required (KeyvalFormatError), +keyval timeout is not enabled (KeyvalFormatError), +only one key can be updated (KeyvalFormatError), returns Error 404 - Keyval not found (KeyvalNotFound), keyval key not found (KeyvalKeyNotFound), returns Error 405 - Method disabled (MethodDisabled), returns Error @@ -1467,6 +1542,117 @@ + +/resolvers/ + + +Supported methods: + + +GET - Return status for all resolver zones +Returns status information for each resolver zone. + +Request parameters: + +fields +(string, optional) + +Limits which fields of resolvers statistics will be output. + + + +Possible responses: + + +200 - Success, returns a collection of "Resolver Zone" objects for all resolvers + + + + + +/resolvers/{resolverZoneName} + + +Parameters common for all methods: + +resolverZoneName +(string, required) + +The name of a resolver zone. + +Supported methods: + + +GET - Return statistics of a resolver zone +Returns statistics stored in a particular resolver zone. + +Request parameters: + +fields +(string, optional) + +Limits which fields of the resolver zone will be output (requests, responses, or both). + + + +Possible responses: + + +200 - Success, returns Resolver Zone +404 - Resolver zone not found (ResolverZoneNotFound), returns Error + + + +DELETE - Reset statistics for a resolver zone. +Resets statistics in a particular resolver zone. + +Possible responses: + + +204 - Success +404 - Resolver zone not found (ResolverZoneNotFound), returns Error +405 - Method disabled (MethodDisabled), returns Error + + + + + +/ssl + + +Supported methods: + + +GET - Return SSL statistics +Returns SSL statistics. + +Request parameters: + +fields +(string, optional) + +Limits which fields of SSL statistics will be output. + + + +Possible responses: + + +200 - Success, returns SSL + + + +DELETE - Reset SSL statistics +Resets counters of SSL handshakes and session reuses. + +Possible responses: + + +204 - Success + + + + @@ -1843,6 +2029,93 @@ "sent" : 19415530115 } + +HTTP Location Zone: + + +requests (integer) + + +The total number of client requests received from clients. + + +responses + +The total number of responses sent to clients and the number of responses with status codes “1xx”, “2xx”, “3xx”, “4xx”, and “5xx”. + +1xx (integer) + + +The number of responses with “1xx” status codes. + + +2xx (integer) + + +The number of responses with “2xx” status codes. + + +3xx (integer) + + +The number of responses with “3xx” status codes. + + +4xx (integer) + + +The number of responses with “4xx” status codes. + + +5xx (integer) + + +The number of responses with “5xx” status codes. + + +total (integer) + + +The total number of responses sent to clients. + + + + +discarded (integer) + + +The total number of requests completed without sending a response. + + +received (integer) + + +The total number of bytes received from clients. + + +sent (integer) + + +The total number of bytes sent to clients. + + +Example: + +{ + "requests" : 706690, + "responses" : { + "1xx" : 0, + "2xx" : 699482, + "3xx" : 4522, + "4xx" : 907, + "5xx" : 266, + "total" : 705177 + }, + "discarded" : 1513, + "received" : 172711587, + "sent" : 19415530115 +} + HTTP Cache: @@ -2489,7 +2762,8 @@ HTTP Keyval Shared Memory Zone: -Contents of an HTTP keyval shared memory zone.Example: +Contents of an HTTP keyval shared memory zone +when using the GET method.Example: { "key1" : "value1", @@ -2497,6 +2771,20 @@ "key3" : "value3" } + +HTTP Keyval Shared Memory Zone: +Contents of an HTTP keyval shared memory zone +when using the POST or PATCH methods.Example: + +{ + "key1" : "value1", + "key2" : "value2", + "key3" : { + "value" : "value3", + "expire" : 30000 + } +} + Stream Server Zone: @@ -2903,7 +3191,7 @@ Stream Keyval Shared Memory Zone: -Contents of a stream keyval shared memory zone.Example: +Contents of a stream keyval shared memory zone when using the GET method.Example: { "key1" : "value1", @@ -2911,6 +3199,20 @@ "key3" : "value3" } + +Stream Keyval Shared Memory Zone: +Contents of a stream keyval shared memory zone +when using the POST or PATCH methods.Example: + +{ + "key1" : "value1", + "key2" : "value2", + "key3" : { + "value" : "value3", + "expire" : 30000 + } +} + Stream Zone Sync Node: @@ -2995,6 +3297,111 @@ + +Resolver Zone: +Statistics of DNS requests and responses per particular +resolver zone. + +requests + + + +name (integer) + + +The total number of requests to resolve names to addresses. + + +srv (integer) + + +The total number of requests to resolve SRV records. + + +addr (integer) + + +The total number of requests to resolve addresses to names. + + + + +responses + + + +noerror (integer) + + +The total number of successful responses. + + +formerr (integer) + + +The total number of FORMERR (Format error) responses. + + +servfail (integer) + + +The total number of SERVFAIL (Server failure) responses. + + +nxdomain (integer) + + +The total number of NXDOMAIN (Host not found) responses. + + +notimp (integer) + + +The total number of NOTIMP (Unimplemented) responses. + + +refused (integer) + + +The total number of REFUSED (Operation refused) responses. + + +timedout (integer) + + +The total number of timed out requests. + + +unknown (integer) + + +The total number of requests completed with an unknown error. + + + + +Example: + +{ + "resolver_zone1" : { + "requests" : { + "name" : 25460, + "srv" : 130, + "addr" : 2580 + }, + "responses" : { + "noerror" : 26499, + "formerr" : 0, + "servfail" : 3, + "nxdomain" : 0, + "notimp" : 0, + "refused" : 0, + "timedout" : 243, + "unknown" : 478 + } + } +} + Error: nginx error object. diff -r 21f1376238b0 -r dd3ac7eefeed xml/en/docs/http/ngx_http_api_module_head.xml --- a/xml/en/docs/http/ngx_http_api_module_head.xml Thu Aug 22 23:00:31 2019 +0300 +++ b/xml/en/docs/http/ngx_http_api_module_head.xml Mon Sep 02 14:12:20 2019 +0300 @@ -101,21 +101,21 @@ a supported API version in the URI. Examples of API requests with this configuration: -http://127.0.0.1/api/4/ -http://127.0.0.1/api/4/nginx -http://127.0.0.1/api/4/connections -http://127.0.0.1/api/4/http/requests -http://127.0.0.1/api/4/http/server_zones/server_backend -http://127.0.0.1/api/4/http/caches/cache_backend -http://127.0.0.1/api/4/http/upstreams/backend -http://127.0.0.1/api/4/http/upstreams/backend/servers/ -http://127.0.0.1/api/4/http/upstreams/backend/servers/1 -http://127.0.0.1/api/4/http/keyvals/one?key=arg1 -http://127.0.0.1/api/4/stream/ -http://127.0.0.1/api/4/stream/server_zones/server_backend -http://127.0.0.1/api/4/stream/upstreams/ -http://127.0.0.1/api/4/stream/upstreams/backend -http://127.0.0.1/api/4/stream/upstreams/backend/servers/1 +http://127.0.0.1/api/5/ +http://127.0.0.1/api/5/nginx +http://127.0.0.1/api/5/connections +http://127.0.0.1/api/5/http/requests +http://127.0.0.1/api/5/http/server_zones/server_backend +http://127.0.0.1/api/5/http/caches/cache_backend +http://127.0.0.1/api/5/http/upstreams/backend +http://127.0.0.1/api/5/http/upstreams/backend/servers/ +http://127.0.0.1/api/5/http/upstreams/backend/servers/1 +http://127.0.0.1/api/5/http/keyvals/one?key=arg1 +http://127.0.0.1/api/5/stream/ +http://127.0.0.1/api/5/stream/server_zones/server_backend +http://127.0.0.1/api/5/stream/upstreams/ +http://127.0.0.1/api/5/stream/upstreams/backend +http://127.0.0.1/api/5/stream/upstreams/backend/servers/1 @@ -146,14 +146,14 @@ All API requests should contain a supported API version in the URI. If the request URI equals the location prefix, the list of supported API versions is returned. -The current API version is “4”. +The current API version is “5”. The optional “fields” argument in the request line specifies which fields of the requested objects will be output: -http://127.0.0.1/api/4/nginx?fields=version,build +http://127.0.0.1/api/5/nginx?fields=version,build @@ -164,6 +164,8 @@ zone server +location +if in location 1.13.12 @@ -175,6 +177,18 @@ Several servers may share the same zone. + +Starting from 1.17.0, status information can be collected +per . +The special value off disables statistics collection +in nested location blocks. +Note that the statistics is collected +in the context of a location where processing ends. +It may be different from the original location, if an +internal +redirect happens during request processing. + + @@ -185,6 +199,24 @@ +The “expire” parameter of a +key-value pair can be +set or +changed +since version 5. + + + +The /resolvers/ data +were added in version 5. + + + +The /http/location_zones/ data +were added in version 5. + + + The path and method fields of nginx error object were removed in version 4. diff -r 21f1376238b0 -r dd3ac7eefeed xml/en/docs/http/ngx_http_auth_jwt_module.xml --- a/xml/en/docs/http/ngx_http_auth_jwt_module.xml Thu Aug 22 23:00:31 2019 +0300 +++ b/xml/en/docs/http/ngx_http_auth_jwt_module.xml Mon Sep 02 14:12:20 2019 +0300 @@ -9,7 +9,7 @@ + rev="10">
@@ -140,12 +140,8 @@ Name matching starts from the top level of the JSON tree. For arrays, the variable keeps a list of array elements separated by commas. -location / { - auth_jwt "closed site"; - auth_jwt_key_file conf/keys.json; - auth_jwt_claim_set $email info e-mail; - auth_jwt_claim_set $job info "job title"; -} +auth_jwt_claim_set $email info e-mail; +auth_jwt_claim_set $job info "job title"; Prior to version 1.13.7, only one key name could be specified, diff -r 21f1376238b0 -r dd3ac7eefeed xml/en/docs/http/ngx_http_core_module.xml --- a/xml/en/docs/http/ngx_http_core_module.xml Thu Aug 22 23:00:31 2019 +0300 +++ b/xml/en/docs/http/ngx_http_core_module.xml Mon Sep 02 14:12:20 2019 +0300 @@ -10,7 +10,7 @@ + rev="85">
@@ -2108,7 +2108,8 @@ address ... [valid=time] - [ipv6=on|off] + [ipv6=on|off] + [status_zone=zone] http server @@ -2151,6 +2152,16 @@ + +The optional status_zone parameter (1.17.1) +enables +collection +of DNS server statistics of requests and responses +in the specified zone. +The parameter is available as part of our +commercial subscription. + + diff -r 21f1376238b0 -r dd3ac7eefeed xml/en/docs/http/ngx_http_keyval_module.xml --- a/xml/en/docs/http/ngx_http_keyval_module.xml Thu Aug 22 23:00:31 2019 +0300 +++ b/xml/en/docs/http/ngx_http_keyval_module.xml Mon Sep 02 14:12:20 2019 +0300 @@ -9,7 +9,7 @@ + rev="5">
@@ -81,6 +81,7 @@ zone=name:size [state=file] [timeout=time] + [type=string|ip] [sync] http @@ -103,6 +104,18 @@ the time after which key-value pairs are removed from the zone. + +The optional type parameter (1.17.1) specifies +the type of the key: +a string (default) or ip. +For the ip type, +the key must be the textual representation of an IP address +specified in CIDR notation. +In this case, +an additional index optimized for matching IP addresses and networks is used +in evaluating a variable. + + The optional sync parameter (1.15.0) enables synchronization diff -r 21f1376238b0 -r dd3ac7eefeed xml/en/docs/stream/ngx_stream_keyval_module.xml --- a/xml/en/docs/stream/ngx_stream_keyval_module.xml Thu Aug 22 23:00:31 2019 +0300 +++ b/xml/en/docs/stream/ngx_stream_keyval_module.xml Mon Sep 02 14:12:20 2019 +0300 @@ -9,7 +9,7 @@ + rev="5">
@@ -87,6 +87,7 @@ zone=name:size [state=file] [timeout=time] + [type=string|ip] [sync] stream @@ -109,6 +110,18 @@ the time after which key-value pairs are removed from the zone. + +The optional type parameter (1.17.1) specifies +the type of the key: +a string (default) or ip. +For the ip type, +the key must be the textual representation of an IP address +specified in CIDR notation. +In this case, +an additional index optimized for matching IP addresses and networks is used +in evaluating a variable. + + The optional sync parameter (1.15.0) enables synchronization diff -r 21f1376238b0 -r dd3ac7eefeed xml/ru/docs/http/ngx_http_auth_jwt_module.xml --- a/xml/ru/docs/http/ngx_http_auth_jwt_module.xml Thu Aug 22 23:00:31 2019 +0300 +++ b/xml/ru/docs/http/ngx_http_auth_jwt_module.xml Mon Sep 02 14:12:20 2019 +0300 @@ -9,7 +9,7 @@ + rev="10">
@@ -138,12 +138,8 @@ Сопоставление имён начинается с верхнего уровня дерева JSON. Для массива переменная хранит список его элементов, разделяемых запятыми. -location / { - auth_jwt "closed site"; - auth_jwt_key_file conf/keys.json; - auth_jwt_claim_set $email info e-mail; - auth_jwt_claim_set $job info "job title"; -} +auth_jwt_claim_set $email info e-mail; +auth_jwt_claim_set $job info "job title"; До версии 1.13.7 можно было указать лишь одно имя, diff -r 21f1376238b0 -r dd3ac7eefeed xml/ru/docs/http/ngx_http_core_module.xml --- a/xml/ru/docs/http/ngx_http_core_module.xml Thu Aug 22 23:00:31 2019 +0300 +++ b/xml/ru/docs/http/ngx_http_core_module.xml Mon Sep 02 14:12:20 2019 +0300 @@ -10,7 +10,7 @@ + rev="85">
@@ -2106,7 +2106,8 @@ адрес ... [valid=время] - [ipv6=on|off] + [ipv6=on|off] + [status_zone=зона] http server @@ -2151,6 +2152,16 @@ + +Необязательный параметр status_zone (1.17.1) +включает +сбор информации +о запросах и ответах сервера DNS +в указанной зоне. +Параметр доступен как часть +коммерческой подписки. + + diff -r 21f1376238b0 -r dd3ac7eefeed yaml/nginx_api.yaml --- a/yaml/nginx_api.yaml Thu Aug 22 23:00:31 2019 +0300 +++ b/yaml/nginx_api.yaml Mon Sep 02 14:12:20 2019 +0300 @@ -1,6 +1,6 @@ swagger: '2.0' info: - version: '4.0' + version: '5.0' title: NGINX Plus REST API description: NGINX Plus REST [API](https://nginx.org/en/docs/http/ngx_http_api_module.html) @@ -9,23 +9,25 @@ key-value pairs management for [http](https://nginx.org/en/docs/http/ngx_http_keyval_module.html) and [stream](https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html). -basePath: /api/4 +basePath: /api/5 tags: - name: General Info - name: Processes - name: Connections + - name: Slabs + - name: Resolvers - name: SSL - - name: Slabs - name: HTTP - name: HTTP Requests + - name: HTTP Server Zones + - name: HTTP Location Zones - name: HTTP Caches - - name: HTTP Server Zones + - name: HTTP Keyvals - name: HTTP Upstreams - - name: HTTP Keyvals - name: Stream - name: Stream Server Zones + - name: Stream Keyvals - name: Stream Upstreams - - name: Stream Keyvals - name: Stream Zone Sync - name: Method GET - name: Method POST @@ -128,36 +130,6 @@ responses: '204': description: Success - /ssl: - get: - tags: - - SSL - - Method GET - summary: Return SSL statistics - description: Returns SSL statistics. - operationId: getSsl - produces: - - application/json - responses: - '200': - description: Success - schema: - $ref: '#/definitions/NginxSSLObject' - parameters: - - in: query - name: fields - type: string - description: Limits which fields of SSL statistics will be output. - delete: - tags: - - SSL - - Method DELETE - summary: Reset SSL statistics - description: Resets counters of SSL handshakes and session reuses. - operationId: deleteSslStat - responses: - '204': - description: Success /slabs/: get: tags: @@ -175,7 +147,7 @@ type: string description: Limits which fields of slab zones will be output. If the “fields” value is empty, - then only zone names are output. + then only zone names will be output. responses: '200': description: Success @@ -298,7 +270,7 @@ type: string description: Limits which fields of server zones will be output. If the “fields” value is empty, - then only server zone names are output. + then only server zone names will be output. responses: '200': description: Success @@ -353,6 +325,79 @@ description: Method disabled (*MethodDisabled*) schema: $ref: '#/definitions/NginxError' + /http/location_zones/: + get: + tags: + - HTTP Location Zones + - Method GET + summary: Return status of all HTTP location zones + description: Returns status information for each HTTP + [location zone](https://nginx.org/en/docs/http/ngx_http_api_module.html#status_zone_location). + operationId: getHttpLocationZones + produces: + - application/json + parameters: + - in: query + name: fields + type: string + description: Limits which fields of location zones will be output. + If the “fields” value is empty, + then only zone names will be output. + responses: + '200': + description: Success + schema: + $ref: '#/definitions/NginxHTTPLocationZonesMap' + '/http/location_zones/{httpLocationZoneName}': + parameters: + - name: httpLocationZoneName + in: path + description: The name of an HTTP [location zone](https://nginx.org/en/docs/http/ngx_http_api_module.html#status_zone_location). + type: string + required: true + get: + tags: + - HTTP Location Zones + - Method GET + summary: Return status of an HTTP location zone + description: Returns status of a particular + HTTP [location zone](https://nginx.org/en/docs/http/ngx_http_api_module.html#status_zone_location). + operationId: getHttpLocationZone + produces: + - application/json + parameters: + - name: fields + in: query + type: string + description: Limits which fields of the location zone will be output. + responses: + '200': + description: Success + schema: + $ref: '#/definitions/NginxHTTPLocationZone' + '404': + description: Location zone not found (*LocationZoneNotFound*) + schema: + $ref: '#/definitions/NginxError' + delete: + tags: + - HTTP Location Zones + - Method DELETE + summary: Reset statistics for a location zone. + description: Resets statistics of accepted and discarded requests, responses, + received and sent bytes in a particular location zone. + operationId: deleteHttpLocationZoneStat + responses: + '204': + description: Success + '404': + description: Location zone not found (*LocationZoneNotFound*) + schema: + $ref: '#/definitions/NginxError' + '405': + description: Method disabled (*MethodDisabled*) + schema: + $ref: '#/definitions/NginxError' /http/caches/: get: tags: @@ -371,7 +416,7 @@ type: string description: Limits which fields of cache zones will be output. If the “fields” value is empty, - then only names of cache zones are output. + then only names of cache zones will be output. responses: '200': description: Success @@ -442,7 +487,7 @@ type: string description: Limits which fields of upstream server groups will be output. If the “fields” value is empty, - only names of upstreams are output. + only names of upstreams will be output. responses: '200': description: Success @@ -743,7 +788,7 @@ in: query type: string description: If the “fields” value is empty, - then only HTTP keyval zone names are output. + then only HTTP keyval zone names will be output. responses: '200': description: Success @@ -800,17 +845,25 @@ description: A key-value pair is specified in the JSON format. Several key-value pairs can be entered if the HTTP keyval shared memory zone is empty. + Expiration time in milliseconds can be specified for a key-value pair + with the *expire* parameter + which overrides the [*timeout*](https://nginx.org/en/docs/http/ngx_http_keyval_module.html#keyval_timeout) + parameter of the + keyval_zone + directive. required: true schema: - $ref: '#/definitions/NginxHTTPKeyvalZone' + $ref: '#/definitions/NginxHTTPKeyvalZonePostPatch' responses: '201': description: Created '400': description: | - Key required (*KeyvalFormatError*), - only one key can be added (*KeyvalFormatError*), - nested object or list (*KeyvalFormatError*) + Invalid JSON (*KeyvalFormatError*), + invalid key format (*KeyvalFormatError*), + key required (*KeyvalFormatError*), + keyval timeout is not enabled (*KeyvalFormatError*), + only one key can be added (*KeyvalFormatError*) schema: $ref: '#/definitions/NginxError' '404': @@ -834,12 +887,19 @@ - HTTP Keyvals - Method PATCH summary: Modify a key-value or delete a key - description: Changes the value of the selected key in the key-value pair - or deletes a key by setting the key value to null. + description: Changes the value of the selected key in the key-value pair, + deletes a key by setting the key value to null, + changes expiration time of a key-value pair. If synchronization of keyval zones in a cluster is enabled, deletes a key only on a target cluster node. + Expiration time in milliseconds can be specified for a key-value pair + with the *expire* parameter + which overrides the [*timeout*](https://nginx.org/en/docs/http/ngx_http_keyval_module.html#keyval_timeout) + parameter of the + keyval_zone + directive. operationId: patchHttpKeyvalZoneKeyValue produces: - application/json @@ -849,15 +909,16 @@ description: A new value for the key is specified in the JSON format. required: true schema: - $ref: '#/definitions/NginxHTTPKeyvalZone' + $ref: '#/definitions/NginxHTTPKeyvalZonePostPatch' responses: '204': description: Success '400': description: | - Key required (*KeyvalFormatError*), - only one key can be updated (*KeyvalFormatError*), - nested object or list (*KeyvalFormatError*) + Invalid JSON (*KeyvalFormatError*), + key required (*KeyvalFormatError*), + keyval timeout is not enabled (*KeyvalFormatError*), + only one key can be updated (*KeyvalFormatError*) schema: $ref: '#/definitions/NginxError' '404': @@ -928,7 +989,7 @@ type: string description: Limits which fields of server zones will be output. If the “fields” value is empty, - then only server zone names are output. + then only server zone names will be output. responses: '200': description: Success @@ -1002,7 +1063,7 @@ type: string description: Limits which fields of upstream server groups will be output. If the “fields” value is empty, - only names of upstreams are output. + only names of upstreams will be output. responses: '200': description: Success @@ -1307,7 +1368,7 @@ in: query type: string description: If the “fields” value is empty, - then only stream keyval zone names are output. + then only stream keyval zone names will be output. responses: '200': description: Success @@ -1364,17 +1425,25 @@ description: A key-value pair is specified in the JSON format. Several key-value pairs can be entered if the stream keyval shared memory zone is empty. + Expiration time in milliseconds can be specified for a key-value pair + with the *expire* parameter + which overrides the [*timeout*](https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html#keyval_timeout) + parameter of the + keyval_zone + directive. required: true schema: - $ref: '#/definitions/NginxStreamKeyvalZone' + $ref: '#/definitions/NginxStreamKeyvalZonePostPatch' responses: '201': description: Created '400': description: | - Key required (*KeyvalFormatError*), - only one key can be added (*KeyvalFormatError*), - nested object or list (*KeyvalFormatError*) + Invalid JSON (*KeyvalFormatError*), + invalid key format (*KeyvalFormatError*), + key required (*KeyvalFormatError*), + keyval timeout is not enabled (*KeyvalFormatError*), + only one key can be added (*KeyvalFormatError*) schema: $ref: '#/definitions/NginxError' '404': @@ -1399,12 +1468,19 @@ - Stream Keyvals - Method PATCH summary: Modify a key-value or delete a key - description: Changes the value of the selected key in the key-value pair - or deletes a key by setting the key value to null. + description: Changes the value of the selected key in the key-value pair, + deletes a key by setting the key value to null, + changes expiration time of a key-value pair. If synchronization of keyval zones in a cluster is enabled, deletes a key only on a target cluster node. + Expiration time is specified in milliseconds + with the *expire* parameter + which overrides the [*timeout*](https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html#keyval_timeout) + parameter of the + keyval_zone + directive. operationId: patchStreamKeyvalZoneKeyValue produces: - application/json @@ -1414,15 +1490,16 @@ description: A new value for the key is specified in the JSON format. required: true schema: - $ref: '#/definitions/NginxStreamKeyvalZone' + $ref: '#/definitions/NginxStreamKeyvalZonePostPatch' responses: '204': description: Success '400': description: | - Key required (*KeyvalFormatError*), - only one key can be updated (*KeyvalFormatError*), - nested object or list (*KeyvalFormatError*) + Invalid JSON (*KeyvalFormatError*), + key required (*KeyvalFormatError*), + keyval timeout is not enabled (*KeyvalFormatError*), + only one key can be updated (*KeyvalFormatError*) schema: $ref: '#/definitions/NginxError' '404': @@ -1478,6 +1555,108 @@ description: Success schema: $ref: '#/definitions/NginxStreamZoneSync' + /resolvers/: + get: + tags: + - Resolvers + - Method GET + summary: Return status for all resolver zones + description: Returns status information for each + [resolver zone](https://nginx.org/en/docs/http/ngx_http_core_module.html#resolver_status_zone). + operationId: getResolverZones + produces: + - application/json + responses: + '200': + description: Success + schema: + $ref: '#/definitions/NginxResolverZonesMap' + parameters: + - in: query + name: fields + type: string + description: Limits which fields of resolvers statistics will be output. + '/resolvers/{resolverZoneName}': + parameters: + - name: resolverZoneName + in: path + description: The name of a resolver zone. + required: true + type: string + get: + tags: + - Resolvers + - Method GET + summary: Return statistics of a resolver zone + description: Returns statistics stored in a particular resolver + [zone](https://nginx.org/en/docs/http/ngx_http_core_module.html#resolver_status_zone). + operationId: getResolverZone + produces: + - application/json + parameters: + - name: fields + in: query + type: string + description: Limits which fields of the resolver zone will be output + (requests, responses, or both). + responses: + '200': + description: Success + schema: + $ref: '#/definitions/NginxResolverZone' + '404': + description: | + Resolver zone not found (*ResolverZoneNotFound*) + schema: + $ref: '#/definitions/NginxError' + delete: + tags: + - Resolvers + - Method DELETE + summary: Reset statistics for a resolver zone. + description: Resets statistics in a particular resolver zone. + operationId: deleteResolverZoneStat + responses: + '204': + description: Success + '404': + description: Resolver zone not found (*ResolverZoneNotFound*) + schema: + $ref: '#/definitions/NginxError' + '405': + description: Method disabled (*MethodDisabled*) + schema: + $ref: '#/definitions/NginxError' + /ssl: + get: + tags: + - SSL + - Method GET + summary: Return SSL statistics + description: Returns SSL statistics. + operationId: getSsl + produces: + - application/json + responses: + '200': + description: Success + schema: + $ref: '#/definitions/NginxSSLObject' + parameters: + - in: query + name: fields + type: string + description: Limits which fields of SSL statistics will be output. + delete: + tags: + - SSL + - Method DELETE + summary: Reset SSL statistics + description: Resets counters of SSL handshakes and session reuses. + operationId: deleteSslStat + responses: + '204': + description: Success ### ###DEFINITIONS ### @@ -1836,6 +2015,100 @@ example: processing: 1 requests: 706690 + responses: + 1xx: 0 + 2xx: 699482 + 3xx: 4522 + 4xx: 907 + 5xx: 266 + total: 705177 + discarded: 1513 + received: 172711587 + sent: 19415530115 + NginxHTTPLocationZonesMap: + title: HTTP Location Zones + description: | + Status data for all HTTP + location zones. + type: object + additionalProperties: + $ref: '#/definitions/NginxHTTPLocationZone' + example: + site1: + requests: 736395 + responses: + 1xx: 0 + 2xx: 727290 + 3xx: 4614 + 4xx: 934 + 5xx: 1535 + total: 734373 + discarded: 2020 + received: 180157219 + sent: 20183175459 + site2: + requests: 185307 + responses: + 1xx: 0 + 2xx: 112674 + 3xx: 45383 + 4xx: 2504 + 5xx: 4419 + total: 164980 + discarded: 20326 + received: 51575327 + sent: 2983241510 + NginxHTTPLocationZone: + title: HTTP Location Zone + type: object + properties: + requests: + type: integer + description: The total number of client requests received from clients. + responses: + description: The total number of responses sent to clients and the + number of responses with status codes + “1xx”, “2xx”, “3xx”, + “4xx”, and “5xx”. + type: object + readOnly: true + properties: + 1xx: + type: integer + description: The number of responses with “1xx” status codes. + readOnly: true + 2xx: + type: integer + description: The number of responses with “2xx” status codes. + readOnly: true + 3xx: + type: integer + description: The number of responses with “3xx” status codes. + readOnly: true + 4xx: + type: integer + description: The number of responses with “4xx” status codes. + readOnly: true + 5xx: + type: integer + description: The number of responses with “5xx” status codes. + readOnly: true + total: + type: integer + description: The total number of responses sent to clients. + readOnly: true + discarded: + type: integer + description: The total number of + requests completed without sending a response. + received: + type: integer + description: The total number of bytes received from clients. + sent: + type: integer + description: The total number of bytes sent to clients. + example: + requests: 706690 responses: 1xx: 0 2xx: 699482 @@ -2602,12 +2875,25 @@ NginxHTTPKeyvalZone: title: HTTP Keyval Shared Memory Zone description: | - Contents of an HTTP keyval shared memory zone. + Contents of an HTTP keyval shared memory zone + when using the GET method. type: object example: key1: value1 key2: value2 key3: value3 + NginxHTTPKeyvalZonePostPatch: + title: HTTP Keyval Shared Memory Zone + description: | + Contents of an HTTP keyval shared memory zone + when using the POST or PATCH methods. + type: object + example: + key1: value1 + key2: value2 + key3: + value: value3 + expire: 30000 NginxStreamServerZonesMap: title: Stream Server Zones description: | @@ -3140,12 +3426,24 @@ NginxStreamKeyvalZone: title: Stream Keyval Shared Memory Zone description: | - Contents of a stream keyval shared memory zone. + Contents of a stream keyval shared memory zone when using the GET method. type: object example: key1: value1 key2: value2 key3: value3 + NginxStreamKeyvalZonePostPatch: + title: Stream Keyval Shared Memory Zone + description: | + Contents of a stream keyval shared memory zone + when using the POST or PATCH methods. + type: object + example: + key1: value1 + key2: value2 + key3: + value: value3 + expire: 30000 NginxStreamZoneSync: title: Stream Zone Sync Node type: object @@ -3200,6 +3498,126 @@ records_total: type: integer description: The total number of records stored in the shared memory zone. + NginxResolverZonesMap: + title: Resolver Zones + description: | + Status data for all + resolver zones. + type: object + additionalProperties: + $ref: '#/definitions/NginxResolverZone' + example: + resolver_zone1: + requests: + name: 25460 + srv: 130 + addr: 2580 + responses: + noerror: 26499 + formerr: 0 + servfail: 3 + nxdomain: 0 + notimp: 0 + refused: 0 + timedout: 243 + unknown: 478 + resolver_zone2: + requests: + name: 325460 + srv: 1130 + addr: 12580 + responses: + noerror: 226499 + formerr: 0 + servfail: 283 + nxdomain: 0 + notimp: 0 + refused: 0 + timedout: 743 + unknown: 1478 + NginxResolverZone: + title: Resolver Zone + description: | + Statistics of DNS requests and responses per particular + resolver zone. + type: object + properties: + requests: + type: object + readOnly: true + properties: + name: + type: integer + description: The total number of requests + to resolve names to addresses. + readOnly: true + srv: + type: integer + description: The total number of requests + to resolve SRV records. + readOnly: true + addr: + type: integer + description: The total number of requests + to resolve addresses to names. + readOnly: true + responses: + type: object + readOnly: true + properties: + noerror: + type: integer + description: The total number of successful responses. + readOnly: true + formerr: + type: integer + description: The total number of + FORMERR (Format error) responses. + readOnly: true + servfail: + type: integer + description: The total number of + SERVFAIL (Server failure) responses. + readOnly: true + nxdomain: + type: integer + description: The total number of + NXDOMAIN (Host not found) responses. + readOnly: true + notimp: + type: integer + description: The total number of + NOTIMP (Unimplemented) responses. + readOnly: true + refused: + type: integer + description: The total number of + REFUSED (Operation refused) responses. + readOnly: true + timedout: + type: integer + description: The total number of timed out requests. + readOnly: true + unknown: + type: integer + description: The total number of requests + completed with an unknown error. + readOnly: true + example: + resolver_zone1: + requests: + name: 25460 + srv: 130 + addr: 2580 + responses: + noerror: 26499 + formerr: 0 + servfail: 3 + nxdomain: 0 + notimp: 0 + refused: 0 + timedout: 243 + unknown: 478 NginxError: title: Error description: | diff -r 21f1376238b0 -r dd3ac7eefeed yaml/yaml2xml.py --- a/yaml/yaml2xml.py Thu Aug 22 23:00:31 2019 +0300 +++ b/yaml/yaml2xml.py Mon Sep 02 14:12:20 2019 +0300 @@ -44,7 +44,7 @@ def pretty_endpoint(ep): - return ep.replace('/',' ').replace('_',' ') + return ep.replace('/slabs/','slabs').replace('/resolvers/','resolvers').replace('/http/','HTTP ').replace('/stream/','stream ').replace('s/','s').replace('_',' ') # human-readable html element id based on path