openapi: 3.2.0
info:
version: '9.0'
title: NGINX Plus REST HTTP Location Zones API
description: NGINX Plus REST API provides access to NGINX Plus status information, on-the-fly configuration of upstream servers and key-value pairs management for http and stream.
servers:
- url: /api/9
tags:
- name: HTTP Location Zones
paths:
/http/location_zones/:
get:
tags:
- HTTP Location Zones
summary: Return status of all HTTP location zones
description: Returns status information for each HTTP location zone.
operationId: getHttpLocationZones
parameters:
- in: query
name: fields
description: Limits which fields of location zones will be output. If the “fields” value is empty, then only zone names will be output.
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/NginxHTTPLocationZonesMap'
'404':
description: Unknown version (*UnknownVersion*)
content:
application/json:
schema:
$ref: '#/components/schemas/NginxError'
/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).
required: true
schema:
type: string
get:
tags:
- HTTP Location Zones
summary: Return status of an HTTP location zone
description: Returns status of a particular HTTP location zone.
operationId: getHttpLocationZone
parameters:
- name: fields
in: query
description: Limits which fields of the location zone will be output.
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/NginxHTTPLocationZone'
'404':
description: 'Location zone not found (*LocationZoneNotFound*),
unknown version (*UnknownVersion*)
'
content:
application/json:
schema:
$ref: '#/components/schemas/NginxError'
delete:
tags:
- HTTP Location Zones
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*),
unknown version (*UnknownVersion*)
'
content:
application/json:
schema:
$ref: '#/components/schemas/NginxError'
'405':
description: Method disabled (*MethodDisabled*)
content:
application/json:
schema:
$ref: '#/components/schemas/NginxError'
components:
schemas:
NginxHTTPLocationZonesMap:
title: HTTP Location Zones
description: 'Status data for all HTTP
location zones.
'
type: object
additionalProperties:
$ref: '#/components/schemas/NginxHTTPLocationZone'
example:
site1:
requests: 736395
responses:
1xx: 0
2xx: 727290
3xx: 4614
4xx: 934
5xx: 1535
codes:
200: 727290
301: 4614
404: 934
503: 1535
total: 734373
discarded: 2020
received: 180157219
sent: 20183175459
site2:
requests: 185307
responses:
1xx: 0
2xx: 112674
3xx: 45383
4xx: 2504
5xx: 4419
codes:
200: 112674
301: 45383
404: 2504
503: 4419
total: 164980
discarded: 20326
received: 51575327
sent: 2983241510
NginxError:
title: Error
description: 'nginx error object.
'
type: object
properties:
error:
type: object
properties:
status:
type: integer
description: HTTP error code.
text:
type: string
description: Error description.
code:
type: string
description: Internal nginx error code.
request_id:
type: string
description: The ID of the request, equals the value of the $request_id variable.
href:
type: string
description: Link to reference documentation.
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, the number of responses with status codes “1xx”, “2xx”, “3xx”, “4xx”, and “5xx”, and the number of responses per each status code.
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
codes:
type: object
description: The number of responses per each status code.
readOnly: true
properties:
codeNumber:
type: integer
description: The number of responses with this particular status code.
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
3xx: 4522
4xx: 907
5xx: 266
codes:
200: 112674
301: 4522
404: 2504
503: 266
total: 705177
discarded: 1513
received: 172711587
sent: 19415530115