From 42f6b278e418c751066f1e6d82cfa8c4d9b5b5b6 Mon Sep 17 00:00:00 2001 From: Chris Goller Date: Sun, 26 Aug 2018 12:54:12 -0500 Subject: [PATCH] docs(http): add 422 response for writes where points outside of RP --- http/swagger.yml | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/http/swagger.yml b/http/swagger.yml index a542166714..f255b85603 100644 --- a/http/swagger.yml +++ b/http/swagger.yml @@ -81,7 +81,7 @@ paths: '204': description: write data is correctly formatted and accepted for writing to the bucket. '400': - description: line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. + description: line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written. content: application/json: schema: @@ -99,11 +99,17 @@ paths: schema: $ref: "#/components/schemas/Error" '413': - description: write has been rejected because the payload is too large. Error message returns max size supported. + description: write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written. content: application/json: schema: $ref: "#/components/schemas/LineProtocolLengthError" + '422': + description: write has been rejected because the because one or more lines contain timestamps older than retentionPeriod. Response has the retentionPeriod and the line that is too old. All data in body was rejected and not written. + content: + application/json: + schema: + $ref: "#/components/schemas/LineProtocolRetentionPolicyError" '429': description: token is temporarily over quota. The Retry-After header describes when to try the write again. headers: @@ -1511,7 +1517,7 @@ components: type: string line: readOnly: true - description: line within sent body containing malformed data + description: first line within sent body containing malformed data type: integer format: int32 required: [code, message, op, err] @@ -1532,7 +1538,30 @@ components: description: max length in bytes for a body of line-protocol. type: integer format: int32 - required: [code, message, op, err] + required: [code, message, maxLength] + LineProtocolRetentionPolicyError: + properties: + code: + description: code is the machine-readable error code. + readOnly: true + type: string + enum: + - invalid + message: + readOnly: true + description: message is a human-readable message. + type: string + line: + readOnly: true + description: first line within sent body containing data outside of retentionPeriod. + type: integer + format: int32 + retentionPeriod: + readOnly: true + description: describes the maximum duration in nanoseconds in the past a point is acceptable without rejection. + type: integer + format: int64 + required: [code, message, line, retentionPeriod] InfluxQLResults: properties: error: