Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_api_module.xml @ 2768:9dd8c203a54a
Updated docs for the upcoming NGINX Plus release.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Wed, 22 Sep 2021 13:47:23 +0300 |
parents | 2b494b8ff72d |
children | 8bd6f772005f |
comparison
equal
deleted
inserted
replaced
2767:c56adb7148a4 | 2768:9dd8c203a54a |
---|---|
108 </example> | 108 </example> |
109 All API requests include | 109 All API requests include |
110 a supported API <link id="api_version">version</link> in the URI. | 110 a supported API <link id="api_version">version</link> in the URI. |
111 Examples of API requests with this configuration: | 111 Examples of API requests with this configuration: |
112 <example> | 112 <example> |
113 http://127.0.0.1/api/6/ | 113 http://127.0.0.1/api/7/ |
114 http://127.0.0.1/api/6/nginx | 114 http://127.0.0.1/api/7/nginx |
115 http://127.0.0.1/api/6/connections | 115 http://127.0.0.1/api/7/connections |
116 http://127.0.0.1/api/6/http/requests | 116 http://127.0.0.1/api/7/http/requests |
117 http://127.0.0.1/api/6/http/server_zones/server_backend | 117 http://127.0.0.1/api/7/http/server_zones/server_backend |
118 http://127.0.0.1/api/6/http/caches/cache_backend | 118 http://127.0.0.1/api/7/http/caches/cache_backend |
119 http://127.0.0.1/api/6/http/upstreams/backend | 119 http://127.0.0.1/api/7/http/upstreams/backend |
120 http://127.0.0.1/api/6/http/upstreams/backend/servers/ | 120 http://127.0.0.1/api/7/http/upstreams/backend/servers/ |
121 http://127.0.0.1/api/6/http/upstreams/backend/servers/1 | 121 http://127.0.0.1/api/7/http/upstreams/backend/servers/1 |
122 http://127.0.0.1/api/6/http/keyvals/one?key=arg1 | 122 http://127.0.0.1/api/7/http/keyvals/one?key=arg1 |
123 http://127.0.0.1/api/6/stream/ | 123 http://127.0.0.1/api/7/stream/ |
124 http://127.0.0.1/api/6/stream/server_zones/server_backend | 124 http://127.0.0.1/api/7/stream/server_zones/server_backend |
125 http://127.0.0.1/api/6/stream/upstreams/ | 125 http://127.0.0.1/api/7/stream/upstreams/ |
126 http://127.0.0.1/api/6/stream/upstreams/backend | 126 http://127.0.0.1/api/7/stream/upstreams/backend |
127 http://127.0.0.1/api/6/stream/upstreams/backend/servers/1 | 127 http://127.0.0.1/api/7/stream/upstreams/backend/servers/1 |
128 </example> | 128 </example> |
129 </para> | 129 </para> |
130 | 130 |
131 </section> | 131 </section> |
132 | 132 |
153 | 153 |
154 <para id="api_version"> | 154 <para id="api_version"> |
155 All API requests should contain a supported API version in the URI. | 155 All API requests should contain a supported API version in the URI. |
156 If the request URI equals the location prefix, | 156 If the request URI equals the location prefix, |
157 the list of supported API versions is returned. | 157 the list of supported API versions is returned. |
158 The current API version is “<literal>6</literal>”. | 158 The current API version is “<literal>7</literal>”. |
159 </para> | 159 </para> |
160 | 160 |
161 <para> | 161 <para> |
162 The optional “<literal>fields</literal>” argument in the request line | 162 The optional “<literal>fields</literal>” argument in the request line |
163 specifies which fields of the requested objects will be output: | 163 specifies which fields of the requested objects will be output: |
164 <example> | 164 <example> |
165 http://127.0.0.1/api/6/nginx?fields=version,build | 165 http://127.0.0.1/api/7/nginx?fields=version,build |
166 </example> | 166 </example> |
167 </para> | 167 </para> |
168 | 168 |
169 </directive> | 169 </directive> |
170 | 170 |
204 | 204 |
205 <section id="compatibility" name="Compatibility"> | 205 <section id="compatibility" name="Compatibility"> |
206 | 206 |
207 <para> | 207 <para> |
208 <list type="bullet"> | 208 <list type="bullet"> |
209 | |
210 <listitem> | |
211 The <literal>codes</literal> data | |
212 in <literal>responses</literal> for each HTTP | |
213 <link id="def_nginx_http_upstream">upstream</link>, | |
214 <link id="def_nginx_http_server_zone">server zone</link>, and | |
215 <link id="def_nginx_http_location_zone">location zone</link> | |
216 were added in <link id="api_version">version</link> 7. | |
217 </listitem> | |
209 | 218 |
210 <listitem> | 219 <listitem> |
211 The <link id="stream_limit_conns_">/stream/limit_conns/</link> data | 220 The <link id="stream_limit_conns_">/stream/limit_conns/</link> data |
212 were added in <link id="api_version">version</link> 6. | 221 were added in <link id="api_version">version</link> 6. |
213 </listitem> | 222 </listitem> |
2282 The total number of client requests received from clients. | 2291 The total number of client requests received from clients. |
2283 </tag-desc> | 2292 </tag-desc> |
2284 <tag-name> | 2293 <tag-name> |
2285 <literal>responses</literal></tag-name> | 2294 <literal>responses</literal></tag-name> |
2286 <tag-desc> | 2295 <tag-desc> |
2287 The total number of responses sent to clients and the number of responses with status codes “<literal>1xx</literal>”, “<literal>2xx</literal>”, “<literal>3xx</literal>”, “<literal>4xx</literal>”, and “<literal>5xx</literal>”.<list type="tag"> | 2296 The total number of responses sent to clients, the number of responses with status codes “<literal>1xx</literal>”, “<literal>2xx</literal>”, “<literal>3xx</literal>”, “<literal>4xx</literal>”, and “<literal>5xx</literal>”, and the number of responses per each status code.<list type="tag"> |
2288 <tag-name> | 2297 <tag-name> |
2289 <literal>1xx</literal> (<literal>integer</literal>) | 2298 <literal>1xx</literal> (<literal>integer</literal>) |
2290 </tag-name> | 2299 </tag-name> |
2291 <tag-desc> | 2300 <tag-desc> |
2292 The number of responses with “<literal>1xx</literal>” status codes. | 2301 The number of responses with “<literal>1xx</literal>” status codes. |
2312 <tag-name> | 2321 <tag-name> |
2313 <literal>5xx</literal> (<literal>integer</literal>) | 2322 <literal>5xx</literal> (<literal>integer</literal>) |
2314 </tag-name> | 2323 </tag-name> |
2315 <tag-desc> | 2324 <tag-desc> |
2316 The number of responses with “<literal>5xx</literal>” status codes. | 2325 The number of responses with “<literal>5xx</literal>” status codes. |
2326 </tag-desc> | |
2327 <tag-name> | |
2328 <literal>codes</literal></tag-name> | |
2329 <tag-desc> | |
2330 The number of responses per each status code.<list type="tag"> | |
2331 <tag-name> | |
2332 <literal>codeNumber</literal> (<literal>integer</literal>) | |
2333 </tag-name> | |
2334 <tag-desc> | |
2335 The number of responses with this particular status code. | |
2336 </tag-desc> | |
2337 </list> | |
2317 </tag-desc> | 2338 </tag-desc> |
2318 <tag-name> | 2339 <tag-name> |
2319 <literal>total</literal> (<literal>integer</literal>) | 2340 <literal>total</literal> (<literal>integer</literal>) |
2320 </tag-name> | 2341 </tag-name> |
2321 <tag-desc> | 2342 <tag-desc> |
2351 "1xx" : 0, | 2372 "1xx" : 0, |
2352 "2xx" : 699482, | 2373 "2xx" : 699482, |
2353 "3xx" : 4522, | 2374 "3xx" : 4522, |
2354 "4xx" : 907, | 2375 "4xx" : 907, |
2355 "5xx" : 266, | 2376 "5xx" : 266, |
2377 "codes" : { | |
2378 "200" : 699482, | |
2379 "301" : 4522, | |
2380 "404" : 907, | |
2381 "503" : 266 | |
2382 }, | |
2356 "total" : 705177 | 2383 "total" : 705177 |
2357 }, | 2384 }, |
2358 "discarded" : 1513, | 2385 "discarded" : 1513, |
2359 "received" : 172711587, | 2386 "received" : 172711587, |
2360 "sent" : 19415530115 | 2387 "sent" : 19415530115 |
2370 The total number of client requests received from clients. | 2397 The total number of client requests received from clients. |
2371 </tag-desc> | 2398 </tag-desc> |
2372 <tag-name> | 2399 <tag-name> |
2373 <literal>responses</literal></tag-name> | 2400 <literal>responses</literal></tag-name> |
2374 <tag-desc> | 2401 <tag-desc> |
2375 The total number of responses sent to clients and the number of responses with status codes “<literal>1xx</literal>”, “<literal>2xx</literal>”, “<literal>3xx</literal>”, “<literal>4xx</literal>”, and “<literal>5xx</literal>”.<list type="tag"> | 2402 The total number of responses sent to clients, the number of responses with status codes “<literal>1xx</literal>”, “<literal>2xx</literal>”, “<literal>3xx</literal>”, “<literal>4xx</literal>”, and “<literal>5xx</literal>”, and the number of responses per each status code.<list type="tag"> |
2376 <tag-name> | 2403 <tag-name> |
2377 <literal>1xx</literal> (<literal>integer</literal>) | 2404 <literal>1xx</literal> (<literal>integer</literal>) |
2378 </tag-name> | 2405 </tag-name> |
2379 <tag-desc> | 2406 <tag-desc> |
2380 The number of responses with “<literal>1xx</literal>” status codes. | 2407 The number of responses with “<literal>1xx</literal>” status codes. |
2400 <tag-name> | 2427 <tag-name> |
2401 <literal>5xx</literal> (<literal>integer</literal>) | 2428 <literal>5xx</literal> (<literal>integer</literal>) |
2402 </tag-name> | 2429 </tag-name> |
2403 <tag-desc> | 2430 <tag-desc> |
2404 The number of responses with “<literal>5xx</literal>” status codes. | 2431 The number of responses with “<literal>5xx</literal>” status codes. |
2432 </tag-desc> | |
2433 <tag-name> | |
2434 <literal>codes</literal></tag-name> | |
2435 <tag-desc> | |
2436 The number of responses per each status code.<list type="tag"> | |
2437 <tag-name> | |
2438 <literal>codeNumber</literal> (<literal>integer</literal>) | |
2439 </tag-name> | |
2440 <tag-desc> | |
2441 The number of responses with this particular status code. | |
2442 </tag-desc> | |
2443 </list> | |
2405 </tag-desc> | 2444 </tag-desc> |
2406 <tag-name> | 2445 <tag-name> |
2407 <literal>total</literal> (<literal>integer</literal>) | 2446 <literal>total</literal> (<literal>integer</literal>) |
2408 </tag-name> | 2447 </tag-name> |
2409 <tag-desc> | 2448 <tag-desc> |
2438 "1xx" : 0, | 2477 "1xx" : 0, |
2439 "2xx" : 699482, | 2478 "2xx" : 699482, |
2440 "3xx" : 4522, | 2479 "3xx" : 4522, |
2441 "4xx" : 907, | 2480 "4xx" : 907, |
2442 "5xx" : 266, | 2481 "5xx" : 266, |
2482 "codes" : { | |
2483 "200" : 112674, | |
2484 "301" : 4522, | |
2485 "404" : 2504, | |
2486 "503" : 266 | |
2487 }, | |
2443 "total" : 705177 | 2488 "total" : 705177 |
2444 }, | 2489 }, |
2445 "discarded" : 1513, | 2490 "discarded" : 1513, |
2446 "received" : 172711587, | 2491 "received" : 172711587, |
2447 "sent" : 19415530115 | 2492 "sent" : 19415530115 |
2845 </tag-name> | 2890 </tag-name> |
2846 <tag-desc> | 2891 <tag-desc> |
2847 The number of responses with “<literal>5xx</literal>” status codes. | 2892 The number of responses with “<literal>5xx</literal>” status codes. |
2848 </tag-desc> | 2893 </tag-desc> |
2849 <tag-name> | 2894 <tag-name> |
2895 <literal>codes</literal></tag-name> | |
2896 <tag-desc> | |
2897 The number of responses per each status code.<list type="tag"> | |
2898 <tag-name> | |
2899 <literal>codeNumber</literal> (<literal>integer</literal>) | |
2900 </tag-name> | |
2901 <tag-desc> | |
2902 The number of responses with this particular status code. | |
2903 </tag-desc> | |
2904 </list> | |
2905 </tag-desc> | |
2906 <tag-name> | |
2850 <literal>total</literal> (<literal>integer</literal>) | 2907 <literal>total</literal> (<literal>integer</literal>) |
2851 </tag-name> | 2908 </tag-name> |
2852 <tag-desc> | 2909 <tag-desc> |
2853 The total number of responses obtained from this server. | 2910 The total number of responses obtained from this server. |
2854 </tag-desc> | 2911 </tag-desc> |
3004 "1xx" : 0, | 3061 "1xx" : 0, |
3005 "2xx" : 666310, | 3062 "2xx" : 666310, |
3006 "3xx" : 0, | 3063 "3xx" : 0, |
3007 "4xx" : 915, | 3064 "4xx" : 915, |
3008 "5xx" : 6, | 3065 "5xx" : 6, |
3066 "codes" : { | |
3067 "200" : 666310, | |
3068 "404" : 915, | |
3069 "503" : 6 | |
3070 }, | |
3009 "total" : 667231 | 3071 "total" : 667231 |
3010 }, | 3072 }, |
3011 "sent" : 251946292, | 3073 "sent" : 251946292, |
3012 "received" : 19222475454, | 3074 "received" : 19222475454, |
3013 "fails" : 0, | 3075 "fails" : 0, |
3036 "1xx" : 0, | 3098 "1xx" : 0, |
3037 "2xx" : 0, | 3099 "2xx" : 0, |
3038 "3xx" : 0, | 3100 "3xx" : 0, |
3039 "4xx" : 0, | 3101 "4xx" : 0, |
3040 "5xx" : 0, | 3102 "5xx" : 0, |
3103 "codes" : { | |
3104 }, | |
3041 "total" : 0 | 3105 "total" : 0 |
3042 }, | 3106 }, |
3043 "sent" : 0, | 3107 "sent" : 0, |
3044 "received" : 0, | 3108 "received" : 0, |
3045 "fails" : 0, | 3109 "fails" : 0, |