@@ -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,49 @@ type Responses struct {
281282 Total uint64
282283}
283284
285+ type HTTPCodes struct {
286+ HTTPContinue uint64 `json:"100,omitempty"`
287+ HTTPSwitchingProtocols uint64 `json:"101,omitempty"`
288+ HTTPProcessing uint64 `json:"102,omitempty"`
289+ HTTPOk uint64 `json:"200,omitempty"`
290+ HTTPCreated uint64 `json:"201,omitempty"`
291+ HTTPAccepted uint64 `json:"202,omitempty"`
292+ HTTPNoContent uint64 `json:"204,omitempty"`
293+ HTTPPartialContent uint64 `json:"206,omitempty"`
294+ HTTPSpecialResponse uint64 `json:"300,omitempty"`
295+ HTTPMovedPermanently uint64 `json:"301,omitempty"`
296+ HTTPMovedTemporarily uint64 `json:"302,omitempty"`
297+ HTTPSeeOther uint64 `json:"303,omitempty"`
298+ HTTPNotModified uint64 `json:"304,omitempty"`
299+ HTTPTemporaryRedirect uint64 `json:"307,omitempty"`
300+ HTTPBadRequest uint64 `json:"400,omitempty"`
301+ HTTPUnauthorized uint64 `json:"401,omitempty"`
302+ HTTPForbidden uint64 `json:"403,omitempty"`
303+ HTTPNotFound uint64 `json:"404,omitempty"`
304+ HTTPNotAllowed uint64 `json:"405,omitempty"`
305+ HTTPRequestTimeOut uint64 `json:"408,omitempty"`
306+ HTTPConflict uint64 `json:"409,omitempty"`
307+ HTTPLengthRequired uint64 `json:"411,omitempty"`
308+ HTTPPreconditionFailed uint64 `json:"412,omitempty"`
309+ HTTPRequestEntityTooLarge uint64 `json:"413,omitempty"`
310+ HTTPRequestURITooLarge uint64 `json:"414,omitempty"`
311+ HTTPUnsupportedMediaType uint64 `json:"415,omitempty"`
312+ HTTPRangeNotSatisfiable uint64 `json:"416,omitempty"`
313+ HTTPTooManyRequests uint64 `json:"429,omitempty"`
314+ HTTPClose uint64 `json:"444,omitempty"`
315+ HTTPRequestHeaderTooLarge uint64 `json:"494,omitempty"`
316+ HTTPSCertError uint64 `json:"495,omitempty"`
317+ HTTPSNoCert uint64 `json:"496,omitempty"`
318+ HTTPToHTTPS uint64 `json:"497,omitempty"`
319+ HTTPClientClosedRequest uint64 `json:"499,omitempty"`
320+ HTTPInternalServerError uint64 `json:"500,omitempty"`
321+ HTTPNotImplemented uint64 `json:"501,omitempty"`
322+ HTTPBadGateway uint64 `json:"502,omitempty"`
323+ HTTPServiceUnavailable uint64 `json:"503,omitempty"`
324+ HTTPGatewayTimeOut uint64 `json:"504,omitempty"`
325+ HTTPInsufficientStorage uint64 `json:"507,omitempty"`
326+ }
327+
284328// Sessions represents stream session related stats.
285329type Sessions struct {
286330 Sessions2xx uint64 `json:"2xx"`
0 commit comments