Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_api_module_head.xml @ 2206:5cacd6fffade
Eliminated some examples of unsafe prefix locations.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Fri, 27 Apr 2018 09:59:51 +0300 |
parents | f6e578b1b02d |
children | 45a2b90247ad |
rev | line source |
---|---|
2028
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 <!-- |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
4 Copyright (C) Nginx, Inc. |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
5 --> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 <module name="Module ngx_http_api_module" |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 link="/en/docs/http/ngx_http_api_module.html" |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 lang="en" |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
12 rev="1"> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
13 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 <section id="summary"> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 <para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 The <literal>ngx_http_api_module</literal> module (1.13.3) provides REST API |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 for accessing various status information, |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 configuring upstream server groups on-the-fly, and managing |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 <link doc="ngx_http_keyval_module.xml">key-value pairs</link> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 without the need of reconfiguring nginx. |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 </para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 <para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 <note> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 The module supersedes the |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 <link doc="ngx_http_status_module.xml">ngx_http_status_module</link> and |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 <link doc="ngx_http_upstream_conf_module.xml">ngx_http_upstream_conf_module</link> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 modules. |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 </note> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 </para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 <para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 <note> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 This module is available as part of our |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 <commercial_version>commercial subscription</commercial_version>. |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 </note> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 </para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 </section> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 <section id="example" name="Example Configuration"> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 <para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 <example> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 http { |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 upstream backend { |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 zone http_backend 64k; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
50 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 server backend1.example.com weight=5; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 server backend2.example.com; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 } |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 proxy_cache_path /data/nginx/cache_backend keys_zone=cache_backend:10m; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 server { |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 server_name backend.example.com; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 location / { |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 proxy_pass http://backend; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 proxy_cache cache_backend; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 health_check; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 } |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 status_zone server_backend; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 } |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 keyval_zone zone=one:32k state=one.keyval; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 keyval $arg_text $text zone=one; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
72 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 server { |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 listen 127.0.0.1; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 location /api { |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 <emphasis>api</emphasis> write=on; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 allow 127.0.0.1; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 deny all; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 } |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 } |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 } |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 stream { |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 upstream backend { |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 zone stream_backend 64k; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
88 server backend1.example.com:12345 weight=5; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
89 server backend2.example.com:12345; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
90 } |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
91 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
92 server { |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
93 listen 127.0.0.1:12345; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 proxy_pass backend; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
95 status_zone server_backend; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 health_check; |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 } |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
98 } |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
99 </example> |
2082
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
100 All API requests include |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
101 a supported API <link id="api_version">version</link> in the URI. |
2028
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 Examples of API requests with this configuration: |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 <example> |
2139
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
104 http://127.0.0.1/api/3/ |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
105 http://127.0.0.1/api/3/nginx |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
106 http://127.0.0.1/api/3/connections |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
107 http://127.0.0.1/api/3/http/requests |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
108 http://127.0.0.1/api/3/http/server_zones/server_backend |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
109 http://127.0.0.1/api/3/http/caches/cache_backend |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
110 http://127.0.0.1/api/3/http/upstreams/backend |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
111 http://127.0.0.1/api/3/http/upstreams/backend/servers/ |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
112 http://127.0.0.1/api/3/http/upstreams/backend/servers/1 |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
113 http://127.0.0.1/api/3/http/keyvals/one?key=arg1 |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
114 http://127.0.0.1/api/3/stream/ |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
115 http://127.0.0.1/api/3/stream/server_zones/server_backend |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
116 http://127.0.0.1/api/3/stream/upstreams/ |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
117 http://127.0.0.1/api/3/stream/upstreams/backend |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
118 http://127.0.0.1/api/3/stream/upstreams/backend/servers/1 |
2028
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
119 </example> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
120 </para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
121 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
122 </section> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
123 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
124 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
125 <section id="directives" name="Directives"> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
126 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
127 <directive name="api"> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
128 <syntax> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
129 [<literal>write</literal>=<literal>on</literal>|<literal>off</literal>]</syntax> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
130 <default/> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
131 <context>location</context> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
132 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
133 <para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
134 Turns on the REST API interface in the surrounding location. |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
135 Access to this location should be |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
136 <link doc="ngx_http_core_module.xml" id="satisfy">limited</link>. |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
137 </para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
138 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
139 <para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
140 The <literal>write</literal> parameter determines whether the API |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
141 is read-only or read-write. |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
142 By default, the API is read-only. |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
143 </para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
144 |
2082
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
145 <para id="api_version"> |
2028
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
146 All API requests should contain a supported API version in the URI. |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
147 If the request URI equals the location prefix, |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
148 the list of supported API versions is returned. |
2139
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
149 The current API version is “<literal>3</literal>”. |
2028
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
150 </para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
151 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
152 <para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
153 The optional “<literal>fields</literal>” argument in the request line |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
154 specifies which fields of the requested objects will be output: |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
155 <example> |
2139
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
156 http://127.0.0.1/api/3/nginx?fields=version,build |
2028
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
157 </example> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
158 </para> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
159 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
160 </directive> |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
161 |
5c55b7054b58
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
162 </section> |
2082
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
163 |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
164 <section id="compatibility" name="Compatibility"> |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
165 |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
166 <para> |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
167 <list type="bullet"> |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
168 |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
169 <listitem> |
2139
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
170 The <link id="stream_zone_sync_">/stream/zone_sync/</link> data |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
171 were added in <link id="api_version">version</link> 3. |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
172 </listitem> |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
173 |
f6e578b1b02d
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2082
diff
changeset
|
174 <listitem> |
2082
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
175 The <link id="def_nginx_http_upstream_conf_server">drain</link> parameter |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
176 was added in <link id="api_version">version</link> 2. |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
177 </listitem> |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
178 |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
179 <listitem> |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
180 The <link id="stream_keyvals_">/stream/keyvals/</link> data |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
181 were added in <link id="api_version">version</link> 2. |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
182 </listitem> |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
183 |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
184 </list> |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
185 </para> |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
186 |
fee7627f6a5a
Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
2028
diff
changeset
|
187 </section> |