@@ -16,7 +16,7 @@ import (
1616
1717const (
1818 // APIVersion is the default version of NGINX Plus API supported by the client.
19- APIVersion = 6
19+ APIVersion = 7
2020
2121 pathNotFoundCode = "PathNotFound"
2222 streamContext = true
@@ -25,7 +25,7 @@ const (
2525)
2626
2727var (
28- supportedAPIVersions = versions {4 , 5 , 6 }
28+ supportedAPIVersions = versions {4 , 5 , 6 , 7 }
2929
3030 // Default values for servers in Upstreams.
3131 defaultMaxConns = 0
@@ -273,6 +273,7 @@ type StreamZoneSyncStatus struct {
273273
274274// Responses represents HTTP response related stats.
275275type Responses struct {
276+ Codes HTTPCodes
276277 Responses1xx uint64 `json:"1xx"`
277278 Responses2xx uint64 `json:"2xx"`
278279 Responses3xx uint64 `json:"3xx"`
@@ -281,6 +282,50 @@ type Responses struct {
281282 Total uint64
282283}
283284
285+ // HTTPCodes represents HTTP response codes
286+ type HTTPCodes struct {
287+ HTTPContinue uint64 `json:"100,omitempty"`
288+ HTTPSwitchingProtocols uint64 `json:"101,omitempty"`
289+ HTTPProcessing uint64 `json:"102,omitempty"`
290+ HTTPOk uint64 `json:"200,omitempty"`
291+ HTTPCreated uint64 `json:"201,omitempty"`
292+ HTTPAccepted uint64 `json:"202,omitempty"`
293+ HTTPNoContent uint64 `json:"204,omitempty"`
294+ HTTPPartialContent uint64 `json:"206,omitempty"`
295+ HTTPSpecialResponse uint64 `json:"300,omitempty"`
296+ HTTPMovedPermanently uint64 `json:"301,omitempty"`
297+ HTTPMovedTemporarily uint64 `json:"302,omitempty"`
298+ HTTPSeeOther uint64 `json:"303,omitempty"`
299+ HTTPNotModified uint64 `json:"304,omitempty"`
300+ HTTPTemporaryRedirect uint64 `json:"307,omitempty"`
301+ HTTPBadRequest uint64 `json:"400,omitempty"`
302+ HTTPUnauthorized uint64 `json:"401,omitempty"`
303+ HTTPForbidden uint64 `json:"403,omitempty"`
304+ HTTPNotFound uint64 `json:"404,omitempty"`
305+ HTTPNotAllowed uint64 `json:"405,omitempty"`
306+ HTTPRequestTimeOut uint64 `json:"408,omitempty"`
307+ HTTPConflict uint64 `json:"409,omitempty"`
308+ HTTPLengthRequired uint64 `json:"411,omitempty"`
309+ HTTPPreconditionFailed uint64 `json:"412,omitempty"`
310+ HTTPRequestEntityTooLarge uint64 `json:"413,omitempty"`
311+ HTTPRequestURITooLarge uint64 `json:"414,omitempty"`
312+ HTTPUnsupportedMediaType uint64 `json:"415,omitempty"`
313+ HTTPRangeNotSatisfiable uint64 `json:"416,omitempty"`
314+ HTTPTooManyRequests uint64 `json:"429,omitempty"`
315+ HTTPClose uint64 `json:"444,omitempty"`
316+ HTTPRequestHeaderTooLarge uint64 `json:"494,omitempty"`
317+ HTTPSCertError uint64 `json:"495,omitempty"`
318+ HTTPSNoCert uint64 `json:"496,omitempty"`
319+ HTTPToHTTPS uint64 `json:"497,omitempty"`
320+ HTTPClientClosedRequest uint64 `json:"499,omitempty"`
321+ HTTPInternalServerError uint64 `json:"500,omitempty"`
322+ HTTPNotImplemented uint64 `json:"501,omitempty"`
323+ HTTPBadGateway uint64 `json:"502,omitempty"`
324+ HTTPServiceUnavailable uint64 `json:"503,omitempty"`
325+ HTTPGatewayTimeOut uint64 `json:"504,omitempty"`
326+ HTTPInsufficientStorage uint64 `json:"507,omitempty"`
327+ }
328+
284329// Sessions represents stream session related stats.
285330type Sessions struct {
286331 Sessions2xx uint64 `json:"2xx"`
0 commit comments